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 "ihepda@libero.it" <ih...@libero.it> on 2003/05/14 17:07:19 UTC

Multi actions

Hi,
I've in my page 2 portlets:
1) filter
2) DataBaseBrowser
In filter i've an input text to filter book title
<Form name='bookFilter' action='$jslink' method='POST'>
Title to search : <input type='text' name='title' value='$!data.session.getAttribute("title")' />
<input type=hidden name="js_peid" value="204" />
<Input type=submit name="eventSubmit_doRefresh" value="Search" />
</FORM>
Where the js_peid 204 is the DataBaseBrowser.
when I insert a title in the filter the DataBaseBrowser save in the session the attribute title and execute the search. But the filter don't view the attribute title in the session becouse the filter.vm execute first of the DataBaseBrowser action.

Can I generete 2 action (one for the filter and one for the DataBaseBrowser) with a submit?




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


Re: Multi actions

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Wednesday, May 14, 2003, at 08:07  AM, ihepda@libero.it wrote:

> Hi,
> I've in my page 2 portlets:
> 1) filter
> 2) DataBaseBrowser
> In filter i've an input text to filter book title
> <Form name='bookFilter' action='$jslink' method='POST'>
> Title to search : <input type='text' name='title' 
> value='$!data.session.getAttribute("title")' />
> <input type=hidden name="js_peid" value="204" />
> <Input type=submit name="eventSubmit_doRefresh" value="Search" />
> </FORM>
> Where the js_peid 204 is the DataBaseBrowser.
> when I insert a title in the filter the DataBaseBrowser save in the 
> session the attribute title and execute the search. But the filter 
> don't view the attribute title in the session becouse the filter.vm 
> execute first of the DataBaseBrowser action.
>
The "title" will be in the post params, not in the session.
You can get post parameters with 
rundata.getParameters().getString("title")
If you want to execute an action on the Filter portlet, specify it in 
your action="$jslink.setAction("portlets.MyAction")

> Can I generete 2 action (one for the filter and one for the 
> DataBaseBrowser) with a submit?
>
No only one action per request, however you can easily chain actions 
yourself.

I believe that you simply want to refresh your database browser with 
the new query string provided in the 'title' query parameter?
If so, I would recommend extending the DatabaseBrowserAction, and 
overriding the getQueryString method which can check for the presence 
of that query param when building the new query string
This way you don't need another action and can use the doRefresh event 
that is built in

--
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
+01 707 773-4646



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