That worked. ( I was probably looking at some old code snippets that has the
action specified in the form itself.) 

Cool. 

Thanks.

-----Original Message-----
From: Mark Orciuch [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 07, 2003 12:51 PM
To: Jetspeed Users List
Subject: RE: Strange behaviour from the JSPAction class that uses
setTempl ate


You should associate JspPortlet with its action via registry, i.e. you don't
need:

<INPUT TYPE="hidden" NAME="action" VALUE="portlets.Ex2Action"/>

... but rather:

        <portlet-entry name="yourPortlet" hidden="true" type="ref"
parent="JSP"
application="false">
                <parameter name="template" value="yourTemplate.jsp"
hidden="true"/>
                <parameter name="action" value="portlets.Ex2Action"
hidden="true"/>
        </portlet-entry>

The JspPortlet will automatically execute your action.

Best regards,

Mark Orciuch - [EMAIL PROTECTED]
Jakarta Jetspeed - Enterprise Portal in Java
http://jakarta.apache.org/jetspeed/

> -----Original Message-----
> From: Damle, Nikhil [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 07, 2003 2:43 PM
> To: 'Jetspeed Users List'
> Subject: RE: Strange behaviour from the JSPAction class that uses
> setTempl ate
>
>
> After building the new code, the form actions on the JSP page dont seem to
> work.
>
> Ex:
> <form action="<jetspeed:uriLookup type="Home"/>" method="post">
>       <input type="text" name="lname"/>
>       <INPUT TYPE="hidden" NAME="action" VALUE="portlets.Ex2Action"/>
>       <INPUT TYPE="hidden" NAME="js_peid" VALUE="<%= jspeid %>"/>
>       <input type="submit" name="eventSubmit_doShowname" value="List"/>
> </form>
>
> It skips the call to doShowname() method in the Action class. I
> had to write
> an "if" statement within the buildNormalContext method to get it to work.
>
> Code:
>       public void buildNormalContext(Portlet portlet, RunData rundata){
>               String action =
> rundata.getParameters().getString("eventSubmit_doShowname");
>             if (action.equals("List"))
>                       this.doShowname(rundata, portlet);
>       }
>
>
>
> Any thoughts ?
>
> Nikhil
>
> -----Original Message-----
> From: Damle, Nikhil [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 06, 2003 4:18 PM
> To: 'Mark Orciuch'; Jetspeed Users List
> Subject: RE: Strange behaviour from the JSPAction class that uses
> setTempl ate
>
>
> Hi Mark,
>
> I got the new code from CVS. Built it and deployed it to the
> server. And the
> news is that my code now works fine. Thanks for fixing the bug promptly.
>
> I will be expanding my application soon and will let you know about my
> progress from time to time.
>
> Thanks again,
>
> Nikhil
>
> -----Original Message-----
> From: Mark Orciuch [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 06, 2003 8:24 AM
> To: Jetspeed Users List
> Cc: [EMAIL PROTECTED]
> Subject: RE: Strange behaviour from the JSPAction class that uses
> setTemplate
>
>
> Nikhil,
>
> I just checked in a new version of setTemplate. Please note new method
> signature and session scope. Give it a try and let me know if
> that works for
> you.
>
> Best regards,
>
> Mark Orciuch - [EMAIL PROTECTED]
> Jakarta Jetspeed - Enterprise Portal in Java
> http://jakarta.apache.org/jetspeed/
> > -----Original Message-----
> > From: Damle, Nikhil [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, January 31, 2003 4:23 PM
> > To: 'Jetspeed Users List'
> > Subject: RE: Strange behaviour from the JSPAction class that uses
> > setTemplate
> >
> >
> > They dont share the same "js_peid". Does that help ?
> >
> > Nikhil
> >
> > -----Original Message-----
> > From: Mark Orciuch [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, January 31, 2003 2:18 PM
> > To: Jetspeed Users List
> > Subject: RE: Strange behaviour from the JSPAction class that uses
> > setTemplate
> >
> >
> > Ooops! All the JspPortlets on the page share the same request
> > attribute now?
> > I guess we'll have to use another means of storing the template.
> > I'll try to
> > work on this Monday.
> >
> > Best regards,
> >
> > Mark Orciuch - [EMAIL PROTECTED]
> > Jakarta Jetspeed - Enterprise Portal in Java
> > http://jakarta.apache.org/jetspeed/
> >
> > > -----Original Message-----
> > > From: Damle, Nikhil [mailto:      ]
> > > Sent: Friday, January 31, 2003 1:56 PM
> > > To: 'Jetspeed Users List'
> > > Subject: Strange behaviour from the JSPAction class that uses
> > > setTemplate
> > >
> > >
> > > Starting off a new thread here.
> > >
> > > I was encountering problems using the setTemplate method within the
> > > JSPAction subclass. Thanks to the fix that Mark Orciuch made,
> > > setTemplate(..) works fine.
> > >
> > > However, the problem now is that all the JSPPortlets on the
> page use the
> > > same template, even the JSP1_1andJetspeedTagLib.  By that I mean the
> > > contents within all the JSP portlets on the page are exactly
> > the same. Did
> > > anyone ever encounter this problem ? How can I fix this ?
> > >
> > > Thanks,
> > >
> > > Nikhil
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to