jsf - <p:blockUI> doesn't show up on second click of <p:menuitem> -
when click menuitem id "menuitemid" first time, blockui working when click menuitem again not working. there idea?
by way there tabs in content , if user clicks "menuitemid" tab1 renders, if user clicks "menuitemid2" tab2 renders , tab1 disappers.
here full page layout;
</p:layout> .... <p:layoutunit id="centerlayoutunit" position="center" style="border: none"> <ui:insert name="content">put default content here, if any.</ui:insert> </p:layoutunit> </p:layout>
my index page;
<ui:define name="west"> <h:form id="westform"> <p:panelmenu style="width:200px"> <p:submenu label="createuser"> <p:menuitem id="menuitemid" ..../> <p:menuitem id="menuitemid2"..../> <p:blockui block=":centerlayoutunit" trigger="menuitemid"> loading<br /> <p:graphicimage library="images" name="loading.gif"/> </p:blockui> </h:form> </ui:define> <ui:define name="content"> <p:panel id="contentpanel"> <p:tabview id="tabview" activeindex="#{mycontroller.activeindex}" widgetvar="tabviewwidget"> <p:tab title="tab1" rendered="#{mycontroller.tabrenders.get('renderpanel1')}"> <ui:include src="createuser.xhtml"/> </p:tab> <p:tab title="tab2" rendered="#{mycontroller.tabrenders.get('renderpanel2')}"> <ui:include src="createmanager.xhtml"/> </p:tab> </p:tabview> </p:panel> </ui:define>
may trigger not working correctly.
can try manually trigger it? not tested code! please try it!
<p:panelmenu style="width:200px"> <p:submenu label="createuser"> <p:menuitem id="menuitemid" onclick="bui.show()" oncomplete="bui.hide()"..../> <p:menuitem id="menuitemid2" onclick="bui.show()" oncomplete="bui.hide()"..../> <p:blockui block=":centerlayoutunit" widgetvar="bui"> loading<br /> <p:graphicimage library="images" name="loading.gif"/> </p:blockui>
Comments
Post a Comment