On Aug 21, 2008, at 6:48 AM, z w wrote:


Hi,

In a portal, we must integrate an application doing a search then showing a result page.
This application should be implemented as a portlet.

Assuming we have 3 pages in the portlet:
Page 1: Simple search: a form with a single text field, whose action is launching a search, this page contains also a link to Page 2 who corresponds to Advanced search. Page 2: Advanced search: a form with multiple fields, whose action is also launching a search. Page 3: list of results, who is used for displaying results of Page 1 and Page 2.

On the portal's permanent menu, a small region shows always the Page 1 (Simple search). The central zone of the portal initially shows information from other portlets. When one click on the link of the Page 1, the central zone of the portal must display the Page 2 (Advanced search). When one type a name and submit the form of the Page 1 (Simple Search), the central zone of the portal displays the Page 3 (List of results). When one type in information and submit the form of the Page 2 (Advanced search), the central zone displays the Page 3 (List of results).

Beeing new to portlet, I've quite a few questions:
1) should Page 1 be defined as a portlet and the central zone as another portlet ?

This is a hard one to answer, as it depends on your user requirements etc. I have implemented a search form for a medical database search application. In that case, I think I made the advanced search expand out in a hidden div.
Its really up to you


2) if so, both portlets can be the same war ?

yes, of course


3) how can I show the portal page containg Page 2 (Advanced Search) when I click on the link inside Page 1 (how to specify the good URL inside my JSP) ?

you can make a link to a page by hardcoding it "/jetspeed/portal/ advancedSearch.psml"


4) is similar to 3), how can I trigger processAction() of my portlet when submit the form from Page 1 (Simple Search) and at the same time instruct the portal to switch to the page containing the Page 3 (List of results) ?

You have to send back to your own portlet for the processAction(), and then redirect to Page 2 using the portlet api in your processAction. The portlet api disallows calling the process action of another portlet from your portlet (on the current or any page)

I usually do this with a redirect in the action such as

        response.sendRedirect("/jetspeed/portal/search.psml");



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

Reply via email to