Results 1 to 10 of 18

Thread: popup in Spring Webflow 2.0.2

Hybrid View

  1. #1

    Arrow popup in Spring Webflow 2.0.2

    Hi,

    I have been trying to make use of the pop-up given by the JavaScript framework supported by Spring webflow (see 4.12 in , http://static.springframework.org/sp...l#el-variables)


    Here, the instead of a pop-up, I get the page in the same window.

    I need to call a pop-up window, and on submitting the pop-up window form, navigate to a separate page, keepin the commandObject i session.

    Please give a pointer.

    DeepEdward

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    If you want to use the popup feature without jsf/facelets you need to specify it in the jsp in the javascript element (popup : 'true'). That is also shown in the booking sample without JSF.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Arrow

    Hi Marten,

    Is there anything that i missed out, for the pop-up to display, as I have no clue where I went wrong here!
    I saw the booking-mvc app and made appropriate changes, still no luck..

    I have the following configuration;

    JSP:
    In the JSP, I have a submit button which for which I have the javascript:

    Code:
    <!-- Imported the following in the jsp-->
    
    <script type="text/javascript" src="<c:url value="/resources/dojo/dojo.js" />"> </script>
    <script type="text/javascript" src="<c:url value="/resources/spring/Spring.js" />"> </script>
    <script type="text/javascript" src="<c:url value="/resources/spring/Spring-Dojo.js" />"> </script>
    
    <link type="text/css" rel="stylesheet" href="<c:url value="/resources/dijit/themes/tundra/tundra.css" />" />
    
    JSP FIELD:
    
    <input id="popUp" name="_eventId_callPopUp"
    	type="submit" class="bigbutt2"
    	value="Display PopUp" />
    	
         <script type="text/javascript">
          Spring.addDecoration(new Spring.AjaxEventDecoration({	  	                           
          elementId: "popUp",
          event: "onclick",
          popup: true,
          params: {fragments: "popUpPage"}
       }));
    </script>

    Is the pop-up attribute in the view-state required when giving the javascript in the jsp? when I set that attribute to true, even then the pop-up is not displayed, as the pop-up page is displayed in a separate page(and not a separate window)

    Please put in some light to it!

    Regards,
    Edward
    Last edited by DeepEdward; Aug 12th, 2008 at 10:48 AM.

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    In guess the issue here might be that you are applying it to a submit button. Any special reason for doing so?
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  5. #5

    Default

    I get a form in the pop-up, for which i need to submit the form and proceed to another page(not the first page from where the pop-up originated).

    Edward
    Last edited by DeepEdward; Aug 12th, 2008 at 10:56 AM.

  6. #6

    Arrow

    No Marten,

    I don't think that the problem is with the submit button.
    I tried the the same using hyperlink, but no pop-up, it just navigated to next page in the same window.

    Regards,
    Edward

  7. #7
    Join Date
    Jul 2008
    Location
    Medellín, Colombia
    Posts
    135

    Default

    Quote Originally Posted by Marten Deinum View Post
    If you want to use the popup feature without jsf/facelets you need to specify it in the jsp in the javascript element (popup : 'true'). That is also shown in the booking sample without JSF.
    I've seen that example but it apears that I need to use tiles to make this work with JSP + JSF + SWF 2.0.3

    is that correct?

  8. #8
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    is that correct?
    No.

    For plain JSP you need Tiles to make it work. For JSF you can use either Tiles or Facelets (the jsf templating stuff).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  9. #9

    Default

    I just want to mention that the popups feature (with JSF/facelets) does not work if you have the following setting:

    <webflow:flow-execution-attributes>
    <webflow:always-redirect-on-pause value="false"/>
    </webflow:flow-execution-attributes>

    in flow-executor.

    I had forgotten this setting in my configuration and struggled to find it. So I thought it might be helpful to post.

Posting Permissions

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