5 Replies Latest reply on Mar 9, 2009 4:00 PM by theute

    how to trigger a portlet render request?

    ghinwa

      Hi... I have a newbie question.
      How can I trigger a render request on a portlet without loading the entire page? suppose I have the windowId, I would like to get the undecorated output of the portlet...(say as the response to an AJAX call).
      Is this reasonably simple to do? Any pointers? All help appreciated
      (portal 2.6).

        • 2. Re: how to trigger a portlet render request?
          ghinwa

          thanks for the quick reply. I had read that section of the guide earlier, but wasn't clear on how it was supposed to work. It says: "By default it is enabled for action and render links [...]". Could you give an example of a render link? if all I have is a web page in the browser with access to a window Id, what link would cause the partial refresh to happen?
          Thank you again for answering my questions.

          • 3. Re: how to trigger a portlet render request?
            antoine_h

            mainly, configure your portlet so it is "Ajax enabled".
            then it may be called to refresh, alone without the all page refreshed.

            for details, look at the samples provided with the portal.
            there are plenty with Ajax features.
            look how they are programmed, how they work...
            sure you'll find the way to build these "render links"...

            • 4. Re: how to trigger a portlet render request?

              I didn't see any helpful samples.

              It would've been nice to have given some more direction.

              I'm trying to enable partial refresh of my portlet, which uses straight HTML/JSP/Javascript. For example, currently I have a button within a form inside my JSP:

              <form name="PlanViewForm" action="
              <%=renderResp.createActionURL().toString()%>" method="POST">
              <input NAME="RefreshButton" TYPE="SUBMIT">
              </form>
              


              Clicking on that button causes a full portal refresh, my portlet redraws with new user selected values. How can I make it so that just my portlet redraws instead of the whole portal? I would pay for a solution, this has been killing me for a week now and the JBOSS documentation doesn't provide a minimal working example or anything helpful to a web noob.

              • 5. Re: how to trigger a portlet render request?
                theute

                Chris gave you a link and there are partial refresh samples in the core-samples directory. (or binaries available in your downloaded file)

                cp -r jboss-portal-2.6.7.GA/samples/portal-basic-samples.sar/ jboss-portal-2.6.7.GA/server/default/deploy

                and you have Ajax samples running.