jboive

XSP.partialRefreshGet

May 31st, 2012
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xp:view
  3. xmlns:xp="http://www.ibm.com/xsp/core">
  4. <xp:button
  5. value="Label"
  6. id="button1">
  7. <xp:eventHandler
  8. event="onclick"
  9. submit="true"
  10. refreshMode="partial"
  11. refreshId="refreshMe">
  12. <xp:this.script><![CDATA[var mySubmitValue='whatYouWantToSendHere';
  13. XSP.partialRefreshGet("#{id:refreshMe}", {
  14. params: {
  15. '$$xspsubmitvalue': mySubmitValue
  16. },
  17. onStart: function () {
  18. alert('starting');
  19. },
  20. onComplete: function () {
  21. alert('boo-yah!');
  22. },
  23. onError: function () {
  24. alert("aww shucks cletus, it done don't worked");
  25. }
  26. },{});]]></xp:this.script>
  27. </xp:eventHandler>
  28. </xp:button>
  29. <xp:br></xp:br>
  30. <xp:panel id="refreshMe">
  31.  
  32. </xp:panel>
  33. </xp:view>
Advertisement
Add Comment
Please, Sign In to add comment