@Fabio, if you have already constructed where your link should go using the ‘Extended Portlet URL’ control, then you should be able to get that control and retrieve the url to redirect to from it.
For example, something like this:
/**
* Getter method for the control with id='defaultForm:extendedPortletUrl'
*/
public com.webmethods.caf.faces.component.portleturl.ExtendedPortletUrl getExtendedPortletUrl() {
return (com.webmethods.caf.faces.component.portleturl.ExtendedPortletUrl) findComponentInRoot("defaultForm:extendedPortletUrl");
}
public String testAction() {
try {
com.webmethods.caf.portlet.IPortletURL portletUrl = getExtendedPortletUrl().getPortletUrl();
getFacesContext().getExternalContext().redirect(portletUrl.toString());
return OUTCOME_OK;
} catch (Throwable t) {
error(t);
return OUTCOME_ERROR;
}
}
Or, alternatively, you could just construct the url directly from the java code (see the javadocs), like this.
public String testAction2() {
try {
com.webmethods.caf.portlet.IPortletURL renderUrl = createRenderUrl();
//TODO: add/update the url here via the java APIs
getFacesContext().getExternalContext().redirect(renderUrl.toString());
return OUTCOME_OK;
} catch (Throwable t) {
error(t);
return OUTCOME_ERROR;
}
}
#webMethods-BPMS#webMethods#MWS-CAF-Task-Engine