Announcement Announcement Module
Collapse
No announcement yet.
popup in Spring Webflow 2.0.2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment


    • #3
      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, 11:48 AM.

      Comment


      • #4
        In guess the issue here might be that you are applying it to a submit button. Any special reason for doing so?

        Comment


        • #5
          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, 11:56 AM.

          Comment


          • #6
            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

            Comment


            • #7
              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?!

              Comment


              • #8
                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 13th, 2008, 12:41 AM.

                Comment


                • #9
                  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.

                  Comment


                  • #10
                    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, 07:09 AM.

                    Comment


                    • #11
                      Hi Marten,

                      Thanks for the patience for replying my queries.

                      The problem was that I was not able to make out where the popup is! That's because the JavaScript framework (dojo) that you use represents the pop-up in such a way. It just shades the background and displays the pop-up screen, which is partially transparent, where for the user it appears to be the same screen.

                      Anyway, thanks once again

                      Cheers,
                      DeepEdward

                      Comment


                      • #12
                        Eh....

                        How did you solve this?

                        Please share your solution...

                        Comment


                        • #13
                          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?

                          Comment


                          • #14
                            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).

                            Comment


                            • #15
                              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.

                              Comment

                              Working...
                              X