Redirect in CAF


how can i redirect to different views depending on the output of a web service?

I have the same question.could somenone help on this.Thanks a lot!

Redirection can done in multiple ways depending form where you want to re direct user to different views or different portlet. Btw, are you sure you want to redirect user, or just send him on different page ?

In any case if you want to take user to different views in the same project you can use inbuilt JSF navigation. This is the easiest way. Other way would be using MWS API something like goToPage(String viewID). Other way would be using import template and you can change the views to be imported on different condition.

In case you want to take user to different MWS page ( different portlet ), can you use extended portlet URL control along with command link from palatte and give alias of the MWS page and portlet.

If you want to redirect user on different condition you can use Portlet URL class something like this.
if(condition 1) {
pageAlias =
portletAlias = project.home.portlet
}else {
pageAlias =
portletAlias = project.overview.portlet

IPortletURL portletURL = PortletURLFactory.createRenderUrl(getFacesContext());

check out below site . you might find some examples.