Announcement Announcement Module
Collapse
No announcement yet.
Webflow + Primefaces + Popup Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Webflow + Primefaces + Popup

    Hi all,

    I'm trying to display a subflow in popup. I have read many threads on this forum about that topic, but I haven't found the solution yet.

    This is the code:

    Main flow:
    Code:
    <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" parent="parent-flow" start-state="list">
    <!-- Filter used only when security module is enabled -->
    <secured attributes="ROLE_USER"/>
    ...
    <view-state id="popup" view="../views/componentPopup.xhtml">
        <on-entry>
            <evaluate expression="statsService.getSqlStats()" result="flowScope.statsSql"/>
        </on-entry>
        <transition on="showPopup" to="askPopup"/>
    </view-state>
    
    <subflow-state id="askPopup" subflow="flowPopup">
        <input name="mode" value="'embedded'"/>
        <transition on="endAssociateFlow" to="list"/>
    </subflow-state>
    ...
    </flow>
    Subflow:
    Code:
    <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" parent="parent-flow" start-state="list">
    <!-- Filter used only when security module is enabled -->
    <secured attributes="ROLE_USER"/>
    
    <view-state id="list" view="../views/popupContent.xhtml" redirect="true" popup="true">
        <on-entry>
            <render fragments="bodyContenedor"/>
            <evaluate expression="statsService.getSqlStats()" result="flowScope.statsSql"/>
        </on-entry>
        <transition on="reset" to="list">
            <evaluate expression="statsService.resetSqlStats()"/>
        </transition>
    </view-state>
    
    </flow>
    Main view:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    	xmlns:h="http://java.sun.com/jsf/html"
    	xmlns:f="http://java.sun.com/jsf/core"
    	xmlns:ui="http://java.sun.com/jsf/facelets"
    	xmlns:p="http://primefaces.org/ui"
    	xmlns:sf="http://www.springframework.org/tags/faces">
    
    <ui:composition template="/core/desktop/desktop.xhtml">
    
    	<ui:define name="body" style="color:#FFFFFF">
    
    
    		<h:form prependId="false">
    
    			<p:dialog widgetVar="panelPopupDialog" modal="false" height="500"
    				width="900">
    				<p:outputPanel id="panelPopupContent">
    				</p:outputPanel>
    			</p:dialog>
    
    			<h:panelGrid columns="1" cellpadding="5">
    
    				<p:commandButton action="showPopup" update="panelPopupContent"
    					ajax="true" process="@form" oncomplete="panelPopupDialog.show()"
    					image="iconSearch" title="search" value="Show Popup" />
    				
    			</h:panelGrid>
    		</h:form>
    
    	</ui:define>
    </ui:composition>
    </html>
    Subflow view:
    Code:
    <!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"
    	xmlns:ui="http://java.sun.com/jsf/facelets"
    	xmlns:h="http://java.sun.com/jsf/html"
    	xmlns:f="http://java.sun.com/jsf/core"
    	xmlns:p="http://primefaces.org/ui"
    	template="/core/desktop/desktop.xhtml">
    
    	<ui:define name="notes">
    		<hr />
    	</ui:define>
    
    	<ui:define name="content">
    		<div id="bodyContenedor">
    			<h:form id="form">
    				<p:panel id="panelPopupContent">
    					<h1>asdasd</h1>
    				</p:panel>
    			</h:form>
    		</div>
    	</ui:define>
    
    </ui:composition>
    I'm using:
    SWF 2.3.1
    Primefaces 3.3

    Thanks!

  • #2
    Up! Nothing??

    Comment

    Working...
    X