See below:


From: "Archana Turaga" <[EMAIL PROTECTED]>
Reply-To: "Jetspeed Users List" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: RE: JSP action question
Date: Mon, 23 Feb 2004 14:38:05 -0600

Thanks for the response... I do have some questions.

I have to look at a GenericMVCPortlet...no idea how that can be done. I was always assuming that following the JSP portlet explaination in the tutorial will get me around...So there is absolutely no way to get it work still using JSP portlet? I have most of my portlets in JSP and do you think it will be a lot of work converting all those to GenericMVCPortlet?

You can still use JSP portlet. It you look at JspPortlet, it derives from GenericMVCPortlet.


I don't think it would be alot of work to switch to GenericMVCPortlet though. Just change the parent in the XREG to GenericMVCPortlet and change the base class in your code to the same. Also, add <parameter name="viewtype" value="JSP"/> to the xreg entry. For examples, look at the admin's registry browsers, like the PortletBrowser.



You said:
"Using this portlet, when running the action events, you can switch
templates. This will changes the template used during the render phase of
the portlet. Basically, when using the GenericMVCPortlet/Action, actions
will be executed first, where you can perform logic and add things to the
context. Then, the template will be rendered. The template rendered will
be the one set in the xreg file or the one set by the setTemplate function."


If i understood you correct this will be like a master portlet executing all the actions. So if i have a button that maps to an action or a link that needs an action in the link then this action needs to extend GenericMVCAction not JSPPortletAction. Is that correct? Can you help me here with a sample?..will really appreciate it.

JspPortletAction derives from GenericMVCAction, so your code does not need to change.
Basically, this portlet action would have all of the action events needed. Again, look at the admin's PortletBrowser for an example. Basically, by using the JSP versions of the GenericMVC, the only thing that is different is that you can't switch to velocity templates by simply changing the viewtype parameter.





You said:
"When using setTemplate, you will always need to have another method to send
you back to the original template. Or, you can always log out."


This means that if i say "setTemplate" from Configuration.jsp to addNode.jsp then i need something in AddNodejsp's context setting the page back to Configuration.jsp. Is that what u meant? that is what i was doing in the doCancel of AddNodeJSP in the example i gave you.

Thanks again,

Regards,
Archana



>>> [EMAIL PROTECTED] 02/23/04 02:21PM >>>
Hopefully, this will answer some of your questions.

First, create a portlet whose parent is GenericMVCPortlet.  This portlet
will set the parameter "viewtype" to JSP.  Second, create an action which
derives from GenericMVCAction.

Using this portlet, when running the action events, you can switch
templates.  This will changes the template used during the render phase of
the portlet.  Basically, when using the GenericMVCPortlet/Action, actions
will be executed first, where you can perform logic and add things to the
context.  Then, the template will be rendered.  The template rendered will
be the one set in the xreg file or the one set by the setTemplate function.

When using setTemplate, you will always need to have another method to send
you back to the original template.  Or, you can always log out.

Jeremy Ford
[EMAIL PROTECTED]

>From: "Archana Turaga" <[EMAIL PROTECTED]>
>Reply-To: "Jetspeed Users List" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: JSP action question
>Date: Mon, 23 Feb 2004 14:04:13 -0600
>
>Hi,
> I have tried asking this question in all sorts of ways but never got a
>response...:-).. Possibly the way i word it..;-)
>
>I will try again and see if i can explain my problem to you all and see if
>someone on the mailing list will answer this.
>
>My requirement is very similar to the "Add User" capability in the add user
>form (which is velocity). When a user goes to the user browser and clicks
>"Add User" he is directed to a another velocity form where the data can be
>entered. This form just replaces the "User list" form (which shows the
>current users and a "Add User" link..basically within the same pane with
>all the other components within the portal visible). The form is not
>maximised but in the restored format. If i see the code i see that
>"GetpaneByName" being used to redirect to this page.
>
>My questions:
>1) Is it possible for me to achieve the same effect in JSP? I used
>jetspeed:dyanmicUri to redirect it to the template i wish..it displays the
>form but in a maximised format. I want to just replace my first templates
>view...so that the other components in the portal are still visible...just
>like the velocity example i specified above.


>2) Can anyone point me to a place where information about jetspeed tags are
>given? the current JSPTAG lib example is not all self explanatory?
>3)Are there any Jetspeed powered JSP potlet websites commercially available
>so that we can view to see what is possible with JSP portlets? There are
>some sample sites listed on the jetspeed page....but i do not know if any
>of them are JSP.
>4)Right now i have a mickey-mouse solution for this. Please let me know if
>this is the correct approach. I have a page with a href link "configure".
>This link looks like this:
>
> <a
>href="<jetspeed:dynamicUri/>?eventSubmit_doConfigure=configure&js_peid=<%=jspeid%>">Configure</a>
>
>In the doConfigure function i do: setTemplate (data,
>"AddNodePage.jsp");//Direct it to //the target page
>Frankly i do not understand completely what exactly happens here to cause
>it display in the same view without maximising the portlet. When i hit
>cancel i have a doCancel that does the following (this is redirected to the
>original page i was using):
>setTemplate (data, "Configuration.jsp");
> Do i need to do this in the Cancel approach or there is something more
>simpler?
> What is special about this function setTemplate which i cannot do using
>the regular jetspeed tags?
>
>5) Can someone explain the JSP action model? what source code in jetspeed
>can i look at to get a clear understanding of how these pages are rendered?
>
>Please help. I really need to get a grasp of what is going on here....it
>serves our purpose...but i'm not comfortable because i do not know what
>exactly is going on in the background here.
>
>Thanks in advance for your time and patience.
>Regards,
>Archana


_________________________________________________________________
Click, drag and drop. My MSN is the simple way to design your homepage.
http://click.atdmt.com/AVE/go/onm00200364ave/direct/01/


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

_________________________________________________________________
Get fast, reliable access with MSN 9 Dial-up. Click here for Special Offer! http://click.atdmt.com/AVE/go/onm00200361ave/direct/01/



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



Reply via email to