I recently change the my layout from <pe:layout> to <p:layout>
I assume the problem that I am facing is due to this change but I am not 100% sure (so if you have any ideas ...)
The problem:
In one of the internal jsf I am using <pe:codeMirror> in order to view xml files.
Apparently the codeMirorr is working only after I refresh the page or at the first time that I am pressing the button that will activate the dialog with codeMirror ,otherwise I will see the text area and the xml.
This functionality was working perfectly before changing the layout but then the main form wrap the center layout and the menu navigation was not done via ajax
Now I need to use 2 forms and I aso using ajax.
This is my main jsf:
Code: Select all
<p:layout fullPage="true">
<p:layoutUnit position="north" size="60" resizable="fasle" closable="false" collapsible="false">
<ui:include src="header.xhtml"/>
</p:layoutUnit>
<p:layoutUnit header="Menu" position="west" size="200" resizable="true" closable="true" collapsible="true">
<h:form id="menuForm">
<ui:include src="menu_bar.xhtml"/>
</h:form>
</p:layoutUnit>
<p:layoutUnit position="center" >
<h:form id="mainForm">
<h:panelGroup rendered="#{navMenuBean.menuName == messages.OS_MENU}">
<ui:include src="os.xhtml"/>
</h:panelGroup>
...
..
.
Code: Select all
<p:panelGrid id="commandPanel" styleClass="buttonPanel" columns="1">
<p:row>
<p:commandButton id="rcButton"
oncomplete="rcWidgetVar.show()"
update=":mainForm:rcForm:rcXml"
style="float: left"/>
</p:row>
</p:panelGrid>
<p:dialog id="rcDialog"
widgetVar="rcWidgetVar"
position="left"
appendToBody="true"
dynamic="true">
<h:form id="rcForm">
<pe:codeMirror id="rcXml"
mode="xml"
readOnly="true"
theme="eclipse"
value="#{Bean.selectedOs.rc}"
lineNumbers="false"
lineWrapping="false"/>
</h:form>
</p:dialog>
Code: Select all
<p:slideMenu style="width:180px">
<p:menuitem value="#{messages.OS_MENU}" actionListener="#{navMenuBean.actionListener}" update=":mainForm" ajax="true"/>
...
..
.
Any ideas why and how can I update the codeMirror
Thanks