2 Replies Latest reply on Sep 7, 2009 10:52 PM by philip puthenvila

    Redirect not working

    philip puthenvila Newbie
      Hi
      I have a problem,
      <page view-id="/pages/sharoo/confirm.xhtml" conversation-required="true"
                login-required="true">
                <description>Confirm booking: #{bookBooking.name}</description>
                <navigation from-action="#{bookBookingAction.confirm}">
      <redirect  viewid="/pages/sharoo/sharooMain.xhtml">
      <message>Redirected</message>
      </redirect>
      </navigation>
      </page>

      It is done by looking HotelBooking example.But the redirecting not working, after the save the the main page is not diplaying the new list of booking, the method is not get called when redirected to sharooMain.xhtml.
      Regards
      Philip
        • 1. Re: Redirect not working
          Khaled Yousfi Newbie

          there is a syntax error in your pages.xml file. yous should use


          view-id



          instead of viewid.


          possibly correct code:




          <page view-id="/pages/sharoo/confirm.xhtml" conversation-required="true"
            login-required="true">
            <description>Confirm booking: #{bookBooking.name}</description>
            <navigation from-action="#{bookBookingAction.confirm}">
          <redirect view-id="/pages/sharoo/sharooMain.xhtml">
          <message>Redirected</message>
          </redirect>
          </navigation>
          </page>



          • 2. Re: Redirect not working
            philip puthenvila Newbie

            Hi
            Thanks for that,
            actually my question is when we use redirect in Struts or Spring the data will reflect the new changes. But in SEAM even if it is redircted the new data is not loaded, showing the cached data, but in HotelBooking example it is achieved by firing a event and getBookings() method anotated with @Observer so that method is also get called, and the new bookings is loaded, my question is, is that only the way to do , or simple redirect can fetch new data.