You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Pramod Jain <pr...@indent.org> on 2003/11/01 18:01:04 UTC

RE: One Panel with 3 JSP Portlets

The problem you seem to be having is with caching of JSP pages.  To "submit"
only one page and retrieve the other two from cache you may want to look at
this message I posted

http://www.mail-archive.com/jetspeed-user@jakarta.apache.org/msg09847.html

It is extremely simple to implement.

pramod

-----Original Message-----
From: troppfigo@excite.it [mailto:troppfigo@excite.it]
Sent: Thursday, October 30, 2003 5:35 AM
To: jetspeed-user@jakarta.apache.org
Subject: One Panel with 3 JSP Portlets


I have a panel with 3 portlet (a,b,c), every portlet is a very simple jsp
portlet which use org.apache.jetspeed.portal.portlets.JspPortlet
and its action class (JspPortletActionA,JspPortletActionB,JspPortletActionC)

Example of portletb.xreg

<?xml version="1.0" encoding="UTF-8"?>
<registry>
    <portlet-entry name="portletb" hidden="false" type="ref"
        parent="JSP" application="false">
        <meta-info>
            <title>Prova JSP B</title>
            <description>esempio di applicazione jsp B</description>
        </meta-info>

<classname>org.apache.jetspeed.portal.portlets.JspPortlet</classname>
        <parameter name="template" value="portletb/b.jsp"
            hidden="false" cachedOnName="true" cachedOnValue="true"/>
        <parameter name="action"
            value="portlets.JspPortletActionB" hidden="true"
            cachedOnName="true" cachedOnValue="true"/>
        <media-type ref="html"/>
        <url cachedOnURL="true"/>
    </portlet-entry>
</registry>

a,b,c jsp contain a form like this

Example b.jsp

<form method="post" action="<jetspeed:dynamicUri/>">
<input type="hidden" name="js_peid" value="<%=jspeid%>">
Insert your name: <INPUT TYPE=TEXT NAME=username SIZE=20>
<P>
<input type="submit" name="eventSubmit_doDetailsb" value="Save"/>
</form>


Example JspPortletActionB

public class JspPortletActionB extends JspPortletAction  {

    public void buildNormalContext(Portlet portlet, RunData rundata)
    {
    }
    public void doDetailsb(RunData data, Portlet portlet) throws Exception
    {
        setTemplate(data, "ContactB.jsp");
    }

}

When I click the submit in one of the 3 portlet there is a refresh of the
page of the portal and all portlets in a page (panel) are going to
actionClass
all the time! Is possible to refresh only the portlet where I click the
submit without influence
other jsp portlet in the same panel? Can you post some code to adjust this
problem?
[What I want to do is :
a form in a portletA where user insert some data and he submit ,
then a new jsp page is load with data inserted in portletA. After when user
insert data in portletB and there is a submit i dont want to loose the jsp
page loaded in portletA]

I hope that what I have written is clear, excused for my bad English :-)
thanks in advance to anyone answers to me.






__________________________________________________________________
Accesso Internet Gratis per utenti Excite! Attivalo subito!
http://www.excite.it/hitech/accesso

Il Mio Excite. Personalizza la tua Home page Excite come vuoi tu!
http://www.excite.it

AAA/Relazioni. Sfoglia gli annunci e trova la tua anima gemella
http://www.excite.it/relazioni




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org