navigation issue

Hi,

I’ve checked the wm_wizard_sample about navigation and found that the browser’s history is only modified when the Link’s redirect property (on the faces-config.xml navigation rule part) is set to true.
try it yourself: deploy the sample as it is, open it and click on add item. It moves to another view, but the url stays the same and the browser’s history isn’t updated. Try click the back button on your browser and you’ll see it won’t move anywhere.
Then update the faces-config.xml by changing the additem link redirect property to true. Deploy it again and do as before. On click, the add item button will take you a complete different url, but without the portlet context.

How can I redirect to another view and stay on the same portlet context?

Thanks
Bruno

BasePortletPageBean.gotoPage() should be the API you are looking for. Here’s the javadocs: http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite8-2_ga/My_webMethods/8-2-SP1_CAF_and_MWS_Java_API_Reference/com/webmethods/caf/faces/bean/BasePortletPageBean.html

Let me know if that works for you.
Regards,
–mark

Hi,

The problem with the goto is that it doesn’t update the browser’s history and so the user cannot go back by clicking on the browser’s back button.

This was why I tried to use the technique on the samples for page navigation.

In my opinion the correct way for page navigation is the one shown on the samples but it just doesn’t work properly with portlets.

Best regards
Bruno

Fair enough. Trying to merge portlet standards and JSF hasn’t always been the smoothest process…

Do you have a workaround (like using extended urls and the redirect API?)
Regards,
–mark

Hi,

No, I don’t have a workaround. Do you have any?

Thanks
Bruno

Can you create a URL (using the IPortletURL apis) and pass that to the redirect() API of ExternalContext?


String redirectURL = <fill>;
getFacesContext().getExternalContext().redirect(redirectURL);

There are a few examples in the forums for using IPortletURL apis like this: http://tech.forums.softwareag.com/viewtopic.php?t=23408&highlight=IPortletURL&sid=46d78d9d5eb6400408636d13e3e51a48 You can also search for IPortletURL and you’ll find a few.

Hope this helps.
–mark