Hello Vijay,
at first thank you very much that you try to help me!!
The xhtml page, on which I try to open the popup looks like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
...
template="templates/template.xhtml">
<ui:define name="title">
Title Welcome
</ui:define>
<ui:define name="content">
<h:form id="form">
<p:commandButton
action="selectLanguage"
process="@form"
update="form:panelPopupContent"
oncomplete="popupDialog.show()"
value="#{label.lbl_select_language}" />
<p:dialog id="popupDialog" widgetVar="popupDialog" modal="false">
<p:outputPanel id="panelPopupContent" />
</p:dialog>
</h:form>
</ui:define>
</ui:composition>
The template is only responsible for the layout, so there's nothing special inside.
The flow which controlls this page looks like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
<view-state id="welcome" view="/WEB-INF/views/welcome.xhtml">
<transition on="selectLanguage" to="subflowSelectLanguage" />
</view-state>
<subflow-state id="subflowSelectLanguage" subflow="language-flow" >
<input name="mode" value="'embedded'"/>
<transition on="finish" to="welcome" />
</subflow-state>
<end-state id="finish" />
</flow>
The subflow which is called when the button is pressed to open the popup (see above):
Code:
<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
<view-state id="selectLanguage" view="/WEB-INF/views/language.xhtml">
<transition on="selectLang" />
<transition on="close" to="finish">
</transition>
</view-state>
<end-state id="finish" />
</flow>
Now the xhtml which should be rendered in popup:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
...
template="templates/template.xhtml">
<ui:define name="content">
<h:form id="form">
<p:panel id="panelPopupContent">
<p:commandButton value="#{label.lbl_lang_german}" action="selectLang" style="clear:both;float:left;" >
<f:param name="language" value="DE" />
</p:commandButton>
<p:commandButton value="#{label.lbl_lang_english}" action="selectLang" style="clear:both;float:left;" >
<f:param name="language" value="EN" />
</p:commandButton>
<p:commandButton value="close" action="close" />
</p:panel>
</h:form>
</ui:define>
</ui:composition>
When I press the button to open the popup, the popup opens and I can see it for a moment, but the content is empty. The content is shown instead my actual browser window. I hope you have any idea??
Thanks a lot for an answer...