Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 45

Thread: JSF + Webflow popup question

  1. #11
    Join Date
    Mar 2011
    Location
    Strasbourg,France
    Posts
    24

    Default

    I don't really don't think so if that would be binding on any developer to use specific ids.
    yeah that's what I thought

    where you use prependId. In that case you don't need to use form : panelPopupContent but only panelPopupContent
    yeah but I'm not using update="form : panelPopupContent" just update="panelPopupContent"

  2. #12

    Default

    hmm.. any luck?

  3. #13
    Join Date
    Mar 2011
    Location
    Strasbourg,France
    Posts
    24

    Default

    Hi, yeah actually the problem was the response sent by my subflow, it wasn't well formed once that modified, it worked like a charm

  4. #14
    Join Date
    Jul 2009
    Location
    Karlsruhe, Germany
    Posts
    13

    Default same problem: redirect instead popup

    Hello everyone!
    I have the same problem that the content of my popup-view opens in the current browser window instead in the popup. My xhtml looks like the solution of Nicolas, so I think that I have also an error in my flow definition.

    When I call the subflow for the popup (content), I set the input param
    Code:
    <input name="mode" value="'embedded'"/>
    In my (sub)flow I have only a view-state, which looks like this:
    Code:
    <view-state id="selectLanguage" view="/WEB-INF/views/language.xhtml">
    <transition on="...">
    ...
    </transition>
    </view-state>
    Does anybody know, if something is wrong or missing?

    Hope somebody can help me...

  5. #15

    Default

    Quote Originally Posted by ufasoli View Post
    Hi, yeah actually the problem was the response sent by my subflow, it wasn't well formed once that modified, it worked like a charm
    Good to hear that it now works like a charm

  6. #16

    Default

    Hi mfb,

    It would be easier to help you if you can put all your configuration files here, btw are you trying to use <p:dialog> or spring web flow pop up?

    Thanks,
    Vijay

  7. #17
    Join Date
    Jul 2009
    Location
    Karlsruhe, Germany
    Posts
    13

    Default

    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...

  8. #18
    Join Date
    Mar 2011
    Location
    Strasbourg,France
    Posts
    24

    Default

    Hi, could you try removing your template from the page containg your ajax response like so and perhaps wrapping your panel with an outputPanel with the ID panelPopupContent like so :

    PHP Code:
    <!DOCTYPE html 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:f="http://java.sun.com/jsf/core"
        
    xmlns:h="http://java.sun.com/jsf/html"
        
    xmlns:p="http://primefaces.prime.com.tr/ui"
       
    >
    <
    h:form id="form">
        <
    p:outputPanel id="panelPopupContent">
        <
    p:panel >
             <
    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>      
          </
    p:outputPanel>     
    </
    h:form>         

    </
    ui:composition

  9. #19
    Join Date
    Jul 2009
    Location
    Karlsruhe, Germany
    Posts
    13

    Default

    Hello ufasoli,
    thank you for your answer, but it's sadly not the solution. I've made the changes you've suggested, but it's still the same behaviour...
    I've send you a mail on thursday, because you've written in the forum "...the problem was the response sent by my subflow, it wasn't well formed once that modified...".
    What do you mean by this?

  10. #20
    Join Date
    Mar 2011
    Location
    Strasbourg,France
    Posts
    24

    Default

    Quote Originally Posted by mfb View Post
    Hello ufasoli,
    thank you for your answer, but it's sadly not the solution. I've made the changes you've suggested, but it's still the same behaviour...
    I've send you a mail on thursday, because you've written in the forum "...the problem was the response sent by my subflow, it wasn't well formed once that modified...".
    What do you mean by this?
    Hi there sorry about that I never got that email. What I meant was that the structure of my popup content wasn't the same one as the one on the page calling the popup. Once I changed that one it was OK.

    Your code seems OK now so it's weird you're getting the same behavior. Are you using SWF 2.3.0 and Primefaces 2.2.1?
    Have you tried starting your main flow in embedded mode??

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •