Hello,

As a novice Jetspeed user, I'm trying to understand its characteristics but ran
into a situation that broke many of my early assumptions. I would appreciate
your help to try to understand the following:

I copied the example HelloVelocity portlet definition to make a new portlet with
the same parent (CustomizerVelocity), template (hello.vm) and action
(HelloAction), but with different portlet name ("MyHello"), meta-info and text.

My reasoning was that, apparently, the following code in the action was
resposible for storing the text to be shown:

VelocityPortlet portlet = (VelocityPortlet)context.get("portlet");
portlet.setAttribute("text",text,data);

so, VelocityPortlet (a superclass of both portlets) would update the
corresponding portlet instance text. In this way I expected to get a different
portlet with the same behaviour but its own identification, set of properties,
etc.

I added it to a user home page and it worked fine; indeed, I could see its entry
in the user default.psml.

The disturbing situation arouse when I put both portlets (HelloVelocity and
MyHello) into the same home page. Both were displayed OK, each with its own
name, own initial text, etc, but when I changed the text in ONE of them, BOTH
showed the same new text. In the user .psml, the entries were both there and had
the same (new) text.

This knocked out my previous believes.

Trying to understand, I examined the html font of the home page in the
navigator, expecting to see that the $jlink variable in the Velocity template
had produced a different URL, one for each portlet. But I found that both
portlets had the same form with the same action:

action="http://127.0.0.1:8080/jetspeed/portal/template/Home";

with no parameter, hidden or otherwise, discriminating each of the two.

Is this the way it should be? Did I do something wrong, or is it just that I
plainly don't understand portlets?

Thanks for any help.

Pere Torrodellas



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

Reply via email to