Looks like I should upgrade to Jetspeed-2 :-)
I am using Jetspeed 1.6-dev for the moment and there the action event is
not processed first (as far as I can tell).
The order of the build normal contex calls is irrelevant as long as the
action is processed first.
Thanks for the reply!
Med vennlig hilsen/Kind regards,
Bjorn Vidar Remme
Application Engineer
Paul Spencer <[EMAIL PROTECTED]>
11.07.2004 15:17
Please respond to "Jetspeed Users List"
To: Jetspeed Users List <[EMAIL PROTECTED]>
cc:
Subject: Re: Multiple portlet instances and action event
execution order
The Jetspeed-2/JSR-168 answer is:
The action, without the view (buildNormalContext), is called first
then each portlet's view (buildNormalContext) is called in a random
order. In short, after the action is called their is no defined
"execution order".
Paul Spencer
Bjorn Vidar Remme wrote:
> Tanks for the reply Jeremy.
>
> Now that I knew what I was looking for, I found a lot of documentation
> describing how to use $link & $jslink. Very useful indeed!
>
> But I still hva a problem with the executrion order of the action event
&
> build?context methods.
>
> As far as I can tell the behaviour is identical when using the following
> form actions:
> <form method="post" action="$jslink.getPortletById($portlet.ID)"
> name="RundataTest">
> <form method="get"
> action="$jslink.getAction("portlets.test.general.Rundata_TestAction",
> $portlet)" name="RundataTest">
>
> Still the order is BNC-1, AE-2, BNC-2 and not AE-2, BNC-1, BNC-2 (whree
> BNC is buildNormalContext and AE is the action event).
>
> In this case the action paramter is added as ?action=xxxx.
>
> Are the alternative ways to specify the action parameter in order to get
> the action event executed before any context builds?
>
>
>
>
> Med vennlig hilsen/Kind regards,
>
> Bjorn Vidar Remme
> Application Engineer
>
>
>
>
>
>
> "Jeremy Ford" <[EMAIL PROTECTED]>
> 08.07.2004 15:36
> Please respond to "Jetspeed Users List"
>
> To: [EMAIL PROTECTED]
> cc:
> Subject: RE: Multiple portlet instances and action event
> execution order
>
>
> See below:
>
>
>
>>From: Bjorn Vidar Remme <[EMAIL PROTECTED]>
>>Reply-To: "Jetspeed Users List" <[EMAIL PROTECTED]>
>>To: "Jetspeed Users List" <[EMAIL PROTECTED]>
>>Subject: Multiple portlet instances and action event execution order
>>Date: Thu, 8 Jul 2004 09:49:32 +0200
>>
>>Hi all,
>>
>>i have a pane with multiple portlets of the same type added. Works
>>perfectly now, this was a issue before, but it is solved nicely. Thanks
>
> to
>
>>the individuals who made that possible :
>>
>>The portlets are configured to behave differently, but the share some
>>common data. We store the common data in the RunData object. We can
store
>>data on three different levels: UserSace (rundata.getUser.setTemp()) ,
>>PortletgroupSpace (homebrewed) and PortletSpace (using the portlet id).
>>This also works perfectly.
>>
>>My problem now is how to handle the action events fired from these
>>portlets.
>>If I do the following (velocity):
>><form action="$jslink" name="RundataTest" method="POST">
>><input type="submit" name="eventSubmit_doBrowse_refresh" value="Refresh"
>>
>></form>
>>
>>the doBrowse_refresh() method is called for all the portlets on the page
>>with the same input values. This of course overwrites all the portlet
>>unique values in rundata. The events look like this:
>>- doBrowse_Refresh() for portlet 1
>>- buildNormalContext() for portlet 1
>>- doBrowse_Refresh() for portlet 2
>>- buildNormalContext() for portlet 2
>>
>>
>>I then modified the code to use the portlet id. This is based on the
HTML
>>source for the portlet controls. I manually add the portletid to the
>>context:
>>
>><form action="$jslink/js_peid/$!portletid" name="RundataTest"
>>method="POST">
>><input type="submit" name="eventSubmit_doBrowse_refresh" value="Refresh"
>>
>></form>
>>
>>Is there a equivalent to $jslink that would automatically do this?
>
>
>
> $jslink.getPortletById($portlet.ID)
>
>
>>The result was better but not as expected. Now it turned out that the
>>ordering on the pane was important. Lets say that we click on Portlet 2
>>which is the portlet on the left side of the pane.
>>The events then look like this:
>>- buildNormalContext() for portlet 1
>>- doBrowse_Refresh() for portlet 2
>>- buildNormalContext() for portlet 2
>>
>>
>>Almost what I want! The problem now is that portlet 1 is displaying old
>>data, because the global/group entires in rundata was updated after the
>>buildNormalContext() method was executed. If we click on Portel 1
>>everything works perfectly, because the events now look like:
>>- doBrowse_Refresh() for portlet 1
>>- buildNormalContext() for portlet 1
>>- buildNormalContext() for portlet 2
>>
>>
>>Is it possible to get the action event to always be handled first
>>regardless of which portlet the request was sent from, i.e. the events
>>after clicking on portlet 2 should be:
>>- doBrowse_Refresh() for portlet 2
>>- buildNormalContext() for portlet 1
>>- buildNormalContext() for portlet 2
>>
>>
>
>
>
> If you want your action to fire first before any portlets are rendered,
> you
> will need to specify the action parameter in the url. This will cause
> your
> event to fire first.
>
>
>
>>
>>Med vennlig hilsen/Kind regards,
>>
>>Bjorn Vidar Remme
>>Application Engineer
>>
>
>
>
> Jeremy Ford
> [EMAIL PROTECTED]
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's
FREE!
>
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
> ---------------------------------------------------------------------
> 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]