4 Replies Latest reply on Jun 28, 2010 11:43 PM by Trong Tran

    XmlPortletRequest supported ?

    Alex Cloud Newbie

      Dear all,

       

      Does GateIn Portal support XmlPortletRequest ?

      or is there any way to use XmlPortletRequest in GateIn Portal?

      I searched this forum and didn't get any information.

       

      Thank you very much.

        • 1. Re: XmlPortletRequest supported ?
          Trong Tran Master

          Yes ( if I understand well what you are talking about XmlPortletRequest :-) )

           

          I have also been trying to make a sample portlet using Ajax with Richfaces and Portlet Bridge and it worked well with GateIn

          • 2. Re: XmlPortletRequest supported ?
            Alex Cloud Newbie

            Thanks to Trong Tran for such quick response.

            Would you mind telling me more details of how to use XmlPortletRequest in GateIn?

            I knew that Liferay and IBM websphere portal provide XmlPortletRequest for developers to use.

            I wonder if GateIn provides or I need to write my own XmlPortletRequest...

             

            I am using struts2 portlet for my MVC, and using ajax call to implement partal updating (like a div) of a certain portlet on a page.

            I am having problem that responseText is the html of whole page but I want only the response html of the portlet.

            I searched and found that using XmlPortletRequest can get the response of a certain portlet.

            I tried to use XmlPortletRequest.js I found online and then run into the problem that I need JSON response from portal server.

             

            If anyone can tell me some hints or other better solutions, that will be very helpful.

            appreciated.

            • 3. Re: XmlPortletRequest supported ?
              Trong Tran Master

              I think you need to write your own XmlPortletRequest and I can provide you with few information that may be useful to implement it

               

              In a request, GateIn bases on a special paramater "ajaxRequest=true" to determine if the response is expecting some specific html blocks ( portal components or portlets v.v.. ) but not whole portal page. the returned html structure will look like :

               

              {PortalResponse}
                   |
                   |--->{PortletResponse}
                   |
                   |--->{PortletResponse}
                   |          |-->{portletId}
                   |          |
                   |          |-->{PortletResponseData}
                   |                 |
                   |                 |--->{BlockToUpdate}
                   |                 |         |-->{BlockToUpdateId}
                   |                 |         |-->{BlockToUpdateData}
                   |                 |
                   |                 |--->{BlockToUpdate}
                   |
                   |--->{PortalResponseData}
                   |      |
                   |      |--->{BlockToUpdate}
                   |      |         |-->{BlockToUpdateId}
                   |      |         |-->{BlockToUpdateData}
                   |      |
                   |      |--->{BlockToUpdate}
                   |--->{PortalResponseScript}
              

               

              you could have some experiments on this to see clearly. For example, if it's a portlet request then the response would contains that portlet's html block only. One more think you can have a look is the similar ajax update mechanism in GateIn http://anonsvn.jboss.org/repos/gatein/portal/tags/3.0.0-GA/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js

               

              BTW, you could make a JIRA for the XmlPortletRequest stuff support in GateIn and please describe your ideas and expections as details as possible. That would be cool stuff indeed