Hi there,
I am trying to get a popup in Spring Webflow working but just can't seem to get it right.
I am currently working with JSF 2.0, Webflow 2.3.0 CI-29 (although I also tried the same with v2.2.1) and primefaces 2.2 RC2.
The problem is that nothing happens when I click the commandLink that is supposed to open the popup view. When I specify a non-existing page fragment for the on-entry event then a popup window appears with the stack trace and the respective error message that the element can not be found however when I use a (seemingly) valid element then simply nothing happens.
I simplified by example to just the popup element so I can illustrate my problem. Below is the code of the index page, the popup page and the respective flow definition:
HTML Code:<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:sf="http://www.springframework.org/tags/faces" xmlns:p="http://primefaces.prime.com.tr/ui"> <h:head></h:head> <h:body style="background-color: gray"> <p> <h:form> Indexpage<br/> <p:commandLink action="openPopup" value="Open Popup" ajax="true" /> </h:form> </p> </h:body> </html>
HTML Code:<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:sf="http://www.springframework.org/tags/faces" xmlns:p="http://primefaces.prime.com.tr/ui"> <h:form id="popupFragment"> <h:outputText id="baz" value="test" /> </h:form> </html>I also tried to use <sf:commandLink/> instead of <p:commandLink/> but the result appears to be the same.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="indexPage" view="indexPage.xhtml" > <transition on="openPopup" to="popupPage" > </transition> <transition on="cancel" to="cancel"/> </view-state> <view-state id="popupPage" popup="true" view="popupPage.xhtml"> <on-entry> <render fragments="popupFragment" /> </on-entry> <transition to="indexPage" /> </view-state> <end-state id="cancel" /> </flow>
I am a bit lost now and don't know why nothing is shown (not even any error message), so any help would be much appreciated.
Thanks, Frederik


Reply With Quote
