Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: popup in Spring Webflow 2.0.2

  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,625

    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,625

    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
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    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).
    EHrm now you confuse me. You totally lost me.

    Here, the instead of a pop-up, I get the page in the same window.
    The first post states you don't get a popup and now you state you get one. Which is it?!
    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

  8. #8

    Arrow

    In guess the issue here might be that you are applying it to a submit button. Any special reason for doing so?
    My reply to your post was what my current requirement is, which says i need to submit the form from the pop-up(which in my case never happens).


    I tried the the same using hyperlink, but no pop-up, it just navigated to next page in the same window.
    Here what I mean is, I dont get the pop-up(which is supposed to come in a separate browser window), but the pop-up page appears in the same parents window. I hope this makes my explanation much clear

    Regards,
    Edward
    Last edited by DeepEdward; Aug 12th, 2008 at 11:41 PM.

  9. #9
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    No it doesn't make anything clearer. Because I'm now completly lost, first you don't get a popup, you show code which should trigger the popup. Then you state you get a popup and say that the submit button is from the page inside the popup.

    So currently I have no clue what you get, what is wrong and what does work.
    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

  10. #10

    Arrow

    Ok,
    Let me put everything once again:

    Requirement:

    Say from page A, the user clicks on the register button, which opens another window, say page B,(which I call a POP-UP). In this page the user enters the details and clicks on the submit button,which saves the data and goes to page C.
    The above is the requirement, which is the way it is supposed to work.
    But what I get is, from the code I pasted in the earlier post is:

    Problem
    I start from page A, click on register button, which instead of opening a pup-up(i.e. in a separate window)simply navigates to page B in the same window(Now, this is the problem, I Don't see a pop-up, i.e. a separate window).
    I think in my previous posts, the requirement and the problem might have got mixed up, which got you confused i guess.

    I hope this explanation makes it quite clear.

    I saw the running booking-mvc application (see link, http://spring.ervacon.com/swf-bookin...execution=c2v2)
    Even here I don't see any pop-up.

    Regards,
    Edward
    Last edited by DeepEdward; Aug 13th, 2008 at 06:09 AM.

Posting Permissions

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