[jboss-user] [JBoss Portal] - Re: bookmarkable portlet urls

seidler2547 do-not-reply at jboss.com
Tue Jan 2 05:19:16 EST 2007


With the MyFaces bridge it's quite easy
Links look like
/portal/index.html?ctrl:cmd=render&ctrl:window=default.order.OrderPortletWindow&org.apache.myfaces.portlet.MyFacesGenericPortlet.VIEW_ID=/showOrder.jsp&orderNr=1234
an they can be rendered through
JBoss[Render|Action]Request.getPortalNode();
  | // navigate to the Node you need using PortalNode.getParent()/.resolve()
  | JBoss[Render|Action]Response.create[Render|Action]Url(PortalNode);
It is important to render Window links, not page links, because only Window Links will pass the additional parameters on to the portlet. Within your app there are two ways to access the params:
In the Bean:
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("orderNr");
In the JSP:
<h:outputText value="#{param.orderNr}"/>
or
<h:outputText value="#{param['orderNr']}"/>

Have fun ;)

Stefan

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997200#3997200

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997200



More information about the jboss-user mailing list