4 Replies Latest reply on Sep 18, 2008 9:44 AM by wesleyhales

    Render ONLY portlet content

    bryancan

      I have an ajax portlet in struts. It works on other portals that have a windowState of exclusive or solo. Jboss does not seem to have such a state and since my portlet will be deployed on many different JBoss portals, I do not have the luxury of customizing each one with this windowState customization.

      How can I have the following code return ONLY the result of this detail.jsp (the target of this url), so that it may be inserted into the div referenced ? :

      function refreshMe<portlet:namespace/>() {
       jQuery('body').css({cursor: "wait"});
       var url = "<portlet:renderURL><portlet:param name="_spage" value="detail" /></portlet:renderURL>";
       jQuery('div#<portlet:namespace/>targetDiv').load(url,{},
       function()
       {
       jQuery('body').css({cursor: "auto"})
       }
       );
       }
      


        • 1. Re: Render ONLY portlet content
          bryancan

          Wow, very helpful forum... No replies to anything... thx

          • 2. Re: Render ONLY portlet content
            wesleyhales

             

            How can I have the following code return ONLY the result of this detail.jsp (the target of this url), so that it may be inserted into the div referenced ? :


            You can't possibly expect us to get a return result of detail.jsp without having the code to run, can you? There are too many variables in your question for you to get a response.

            Have you actually ran this code on JBoss Portal, if so what are you seeing? It may benefit you to use our ajax solutions and not some unsupported/untested js wrapper framework.

            Read the documentation for more info

            • 3. Re: Render ONLY portlet content
              bryancan

              Desn't matter the contents of detail.jsp no matter what is in that jsp, the entire portal page, tabs and all, are rendered into the div on my page rather than just the contents of detail.jsp

              Are you saying that there is a Jboss ajax way to get only the contents returned from a struts action into a div on the portlet and not the entire page re-rendered along with it?
              That might have been something to include in your post...

              • 4. Re: Render ONLY portlet content
                wesleyhales

                The point I was trying to make is, your question was only what are the supported ways to make ajax work in JBoss Portal. Had you asked it like that, you would have probably gotten an immediate response. Just for future reference ;)

                http://docs.jboss.com/jbportal/v2.6.6/referenceGuide/html_single/#ajax