JSF2.1でPrimefaces 3.4.2を使用しています。いくつかのレイアウトユニットに分割されたページを作成しました。右側のレイアウト ユニットには、accordionPanel と作成された動的メニューがあり、中央中央のレイアウトは ui:include で構成され、ページがレイヤーに読み込まれます。リンクをクリックすると、動的ページを含むダイアログが開きます。右側のレイアウトでアクションを実行せずにダイアログを開いたり閉じたりすると、中央中央のレイアウトが機能しなくなります。見ることはできますが、入力テキストをクリックします何も入力できず、他のコンポーネントをクリックしても何も起こりません!!! 問題は何ですか?これに対する解決策はありますか?
メニュー項目をクリックしてダイアログを開くと他のページが含まれ、ツリーノードの中央レイアウトの変更をクリックすると、ダイアログで開くページはうまく機能しますが、ダイアログを閉じると、中央のレイアウトボタンと入力が機能しなくなり、他のレイアウトコンポーネントがうまく機能します!
私の新しいコード:
<p:layoutUnit id="right" position="east" size="145" style="text-align:center;direction: ltr!important;padding: 0px!important;">
<h:form prependId="false">
<script type="text/javascript">
function test(id,url,title){
document.getElementById('h1').value=id;
document.getElementById('h2').value=url;
document.getElementById('h3').value=title;
salamm.jq.click();
}
</script>
<h:inputHidden id="h1" value="#{adminC.nclose}" />
<h:inputHidden id="h2" value="#{adminC.nurl}"/>
<h:inputHidden id="h3" value="#{adminC.ntitle}"/>
<p:commandButton actionListener="#{adminC.addTab()}" id="salam" widgetVar="salamm" update=":dlgpanel" onstart="waitDialogmain.show()" style="display: none" oncomplete="waitDialogmain.hide();dlg1.show()"/>
<p:accordionPanel style="text-align: center;font-family: tahoma!important" activeIndex="#{menuGen.activeIndex}">
<p:tab title="connections" id="t0" rendered="#{menuGen.menuList1.length()>0}" >
<center>
<h:outputText escape="false" value="#{menuGen.menuList1}"/>
</center>
<br/>
</p:tab>
<p:tab title="manage" id="t1" rendered="#{menuGen.menuList2.length()>0}" >
<center>
<h:outputText value="#{menuGen.menuList2}" escape="false"/>
</center>
<br/>
</p:tab>
</p:accordionPanel>
</h:form>
</p:layoutUnit>
<p:layoutUnit id="center" style="padding: 0px!important;" position="center">
<p:layout widgetVar="mkh">
<p:layoutUnit id="middleright" position="east" size="170" collapsible="true" style="padding: 0px;direction: ltr" >
<h:form prependId="false">
<p:tree value="#{treeC.root}" var="node" dynamic="true" style="width: 165px;border: none;direction: rtl!important;text-align: right;font-family: tahoma;font-weight: bold" selectionMode="single" selection="#{treeC.selectedNode}">
<p:ajax event="select" listener="#{treeC.onNodeSelect}" onstart="waitDialogmain.show()" oncomplete="waitDialogmain.hide()" />
<p:treeNode >
<h:outputText value="#{node}"/>
</p:treeNode>
</p:tree>
<p:commandButton onclick="mkh.toggle('east')" icon="ui-icon-triangle-1-e" title="ctr+shift+right arrow" style="width: 6px;height: 80px;position: absolute;top: 50%;" type="button"/>
</h:form>
</p:layoutUnit>
<p:layoutUnit id="middlecenter" style="padding: 0px!important;" position="center">
<p:layout style="text-align: center">
<p:layoutUnit id="middlecenter1" style="padding: 0px!important;" position="center" resizable="true" >
<p:outputPanel autoUpdate="true" id="dlgpanelcenter">
<center>
<ui:include src="./../users/networkReport.xhtml" />
</center>
</p:outputPanel>
</p:layoutUnit>
<p:layoutUnit id="middleBottom" size="100" style=" padding: 0px!important" position="south" resizable="true" >
</p:layoutUnit>
</p:layout>
</p:layoutUnit>
</p:layout>
</p:layoutUnit>
</p:layout>
<p:dialog id="dlg" resizable="false" maximizable="true" modal="true" draggable="true" height="400" widgetVar="dlg1" style="background-color: white!important;text-align: center!important;direction: ltr">
<p:outputPanel style="direction: rtl" id="dlgpanel" >
<center>
<ui:include src="#{adminC.url}" />
</center>
</p:outputPanel>
</p:dialog>
</h:body>
</f:view>
</html>
これは、ダイアログ内で開く 1 つのページです。
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
template="./../template/masterTemplate.xhtml"
xmlns:p="http://primefaces.org/ui"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:sec="http://www.springframework.org/security/tags">
<ui:define name="top">
</ui:define>
<ui:define name="content">
<h:form id="regChannel" prependId="false" style="text-align: right;float: none!important">
........
</h:form>
</ui:define>
<ui:define name="bottom">
</ui:define>