Results 1 to 5 of 5

Thread: problem with popup view

  1. #1
    Join Date
    Dec 2008
    Posts
    4

    Default problem with popup view

    Hi all,

    I want to display a view in a popup dialogue without using javascript, so I create my cview as following :

    <view-state id="confirmation" view="popupView" model="popupForm" popup="true">
    <transition on="confirm" to="anotherState"/>
    <transition on="cancel" to="currentStae" />
    </view-state>

    I create a jsp file that I declared in the tiles def files with the id "popView"

    The problem is that when I call this state, my jsp "popupView " is displayed in the same window but not in a popup dialogue. Is there any thing missing ? since I havnt find any complete example.

    any help will be appreciated,
    bizertin.

  2. #2
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default

    This is the intended behavior. You cannot display something in a popup without using JavaScript, so if you have JavaScript turned off, it gracefully degrades to using full page refreshes.
    Jeremy Grelle

    Staff Engineer, Web Products Team
    SpringSource

  3. #3
    Join Date
    Dec 2008
    Posts
    4

    Default

    Thank you for the reply, but I don't inderstand exactly what you mean by "so if you have JavaScript turned off, it gracefully degrades to using full page refreshes". Should I enable JavaScript on the browser level or by anther way. Is ther any simple but complete example ?

    Thanks,
    bizerte

  4. #4

    Default

    I am having the same problem with my popup opening in the same window but not in a popup dialogue. I have javascript enabled in my Firefox version 2.0.0.12. I am attempting to do this in a subflow
    Code:
    <view-state id="viewPopup" popup="true">
      <transition....>
      <transition....>
    </view-state>

    Solution for JSF, Trinidad, and Facelets:
    I found the pieces for my solution in another thread http://forum.springframework.org/showthread.php?t=65710, specifically,
    1) Invoke the popup with: <sf:commandLink /> and not a JSF or trinidad commandLink (this also required <h:form> around the <sf:commandLink />)
    2) For any view-state that is rendered as a popup, you MUST DECLARE AN ON-ENTRY SECTION that displays the fragment you want shown (see sample code), therefore, I also needed to add <ui:fragment id="popupFragment"> around my popup page components.
    Code:
    <view-state id="viewPopup" popup="true" >
        <on-entry>
    	<render fragments="popupFragment" />
         </on-entry>
        <transition on="cancel" to="popupCancel" />
     </view-state>
    Last edited by kmsheph; Feb 5th, 2009 at 09:22 AM. Reason: Solution

  5. #5
    Join Date
    Nov 2007
    Location
    Vienna
    Posts
    21

    Default

    Hi!

    Has anybody try to display a pop-up when the application throws an exception?

    Code:
    <transition on-exception="CustomException" to="customView" />
    In my case I am redirected to the customView, but in the browser not in a pop-up.
    I tested it with sf : commandLink and it works

Posting Permissions

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