2 Replies Latest reply on Nov 25, 2008 8:53 AM by Sverker Abrahamsson

    Seam based portlet to do redirect to other portal page

    Sverker Abrahamsson Newbie

      Hi,
      I'm developing a set of seam based portlets, used with the Jboss portlet bridge on Liferay. So far it has worked quite well but I've got stuck on an issue:


      I want that when I execute a certain operation then the user is redirected to another portal page but I can't find how to do that. Some tries are as follows
      - the code: FacesManager.instance().redirectToExternalURL(http://www.jboss.org);
      - in pages.xml:

      
             <navigation from-action="#{helloWorld.operation}">
                           <redirect url="http://www.jboss.org"/>
              </navigation>
      


      Anybody who knows how to proceed from here???

        • 1. Re: Seam based portlet to do redirect to other portal page
          Tobias Hill Newbie

          Hi Sverker,


          How do you mean proceed from there? Your redirect directive looks absolutely fine to me. We do this in our application without any problems or additional code. If you don't see a redirect I doubt that the from-action="#{helloWorld.operation}" is being picked up correctly.


          And speaking of that ... here comes something far fetched: Are you by any chance calling this action from an s:link? We have had problems with actions being called from s:links to be picked up by from-action-clauses. Especially so since 2.1 ... if this is the case try a h:commandLink instead.


          Good luck (or Lycka till) and keep us posted on your findings,



          Tobias




          • 2. Re: Seam based portlet to do redirect to other portal page
            Sverker Abrahamsson Newbie

            Indeed I use s:link as I've had problems with h:commandLink as it doesn't call the action at all. I think that is some issue between Liferay and the Jboss Portlet Bridge, I have another test project that use the ICEFaces portlet bridge (which gives other issues, that's why I wanted to test with Jboss Portlet Bridge) where h:commandLink work so I'll give that a try.


            Could very well be that the from-action-clause is not picked up. Do you know where to put breakpoints to check that?