kwrobel

PrimeFaces Mobile Multi-Page Dialogs Broken

Oct 22nd, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml"
  3. xmlns:h="http://java.sun.com/jsf/html"
  4. xmlns:f="http://java.sun.com/jsf/core"
  5. xmlns:ui="http://java.sun.com/jsf/facelets"
  6. xmlns:p="http://primefaces.org/ui"
  7. xmlns:pm="http://primefaces.org/mobile">
  8.  
  9. <f:view renderKitId="PRIMEFACES_MOBILE"/>
  10.  
  11. <h:head>
  12. </h:head>
  13.  
  14. <h:body>
  15. <pm:page id="welcomePage">
  16. <pm:header title="Welcome Page"/>
  17. <pm:content>
  18. <h:form id="welcomeForm">
  19. <p:commandButton value="Next page" onclick="PF('confirmDialog').show()"/>
  20. <p:dialog id="dialog" widgetVar="confirmDialog" header="Confirmation">
  21. <p>Do you really want to go to the next page?</p>
  22. <p:commandButton value="yes" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" onsuccess="PF('confirmDialog').hide()" action="pm:nextPage"/>
  23. <p:commandButton value="no" styleClass="ui-confirmdialog-no" icon="ui-icon-close" onclick="PF('confirmDialog').hide()"/>
  24. </p:dialog>
  25.  
  26. </h:form>
  27.  
  28. </pm:content>
  29. </pm:page>
  30.  
  31. <pm:page id="nextPage">
  32. <pm:header title="Next Page">
  33. <p:button styleClass="ui-btn-left ui-btn-inline" value="Back" icon="ui-icon-arrow-l" outcome="pm:welcomePage"/>
  34. </pm:header>
  35. <pm:content>
  36. <h:form id="nextForm">
  37. <p>This is the next page. Glad you made it.</p>
  38. <p:commandButton value="Another page" onclick="PF('confirm2Dialog').show()"/>
  39. <p:dialog id="dialog2" widgetVar="confirm2Dialog" header="Confirmation">
  40. <p>Do you really want to go to another page?</p>
  41. <p:commandButton value="yes" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" onsuccess="PF('confirm2Dialog').hide()" action="pm:anotherPage"/>
  42. <p:commandButton value="no" styleClass="ui-confirmdialog-no" icon="ui-icon-close" onclick="PF('confirm2Dialog').hide()"/>
  43. </p:dialog>
  44. </h:form>
  45. </pm:content>
  46. </pm:page>
  47.  
  48. <pm:page id="anotherPage">
  49. <pm:header title="Another Page">
  50. <p:button styleClass="ui-btn-left ui-btn-inline" value="Back" icon="ui-icon-arrow-l" outcome="pm:nextPage"/>
  51. </pm:header>
  52. <pm:content>
  53. <p>This is another page. There is nowhere to go from here.</p>
  54. </pm:content>
  55. </pm:page>
  56.  
  57.  
  58. </h:body>
  59.  
  60. </html>
Advertisement
Add Comment
Please, Sign In to add comment