Guest User

Untitled

a guest
May 12th, 2010
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.10 KB | None | 0 0
  1. <h:form id="form" prependId="false">
  2.  
  3.     <h:commandLink id="button2"
  4.                   onclick="$('#myDialog').dialog('destroy');$('#myDialog').remove(); jsf.ajax.request(this,event,{execute:'@this', render:'myDialog_placeHolder'} ); return false;"
  5.                   action="#{myBean2.doSearch}" value="press me for next ajax"
  6.            >
  7.     </h:commandLink>
  8.  
  9.  
  10. </h:form>
  11.  
  12. <h:panelGroup id="myDialog_placeHolder">
  13.  
  14.     <h:panelGroup styleClass="myDlg" id="myDialog">
  15.         <h:form id="form2" prependId="false">
  16.             <h:panelGroup id="content">
  17.                 #{myBean2.refresh}
  18.  
  19.                 <h:commandLink id="submitMe" value="Press me for more action" action="#{myBean2.doSearch}">
  20.                     <f:ajax executed="@this" render="content" />
  21.                 </h:commandLink>
  22.             </h:panelGroup>
  23.         </h:form>
  24.     </h:panelGroup>
  25.     <script type="text/javascript">
  26.         /**
  27.          * we delay the dialog buildup slightly
  28.          * that way everything should be updated in the dom
  29.          */
  30.         $("#myDialog").dialog();
  31.     </script>
  32.  
  33. </h:panelGroup>
Advertisement
Add Comment
Please, Sign In to add comment