This content has been marked as final.
Show 2 replies
-
1. Re: portal help urgent
theute May 29, 2007 3:18 AM (in response to 05.shailesh)If you have urgent needs , please consider our professional support. This forum has no guarantee of answers
https://www.redhat.com/apps/store/jboss/portal.html -
2. Re: portal help urgent
rharari May 29, 2007 3:19 AM (in response to 05.shailesh)Hi Shailesh,
You can harcode a link to "/portal/yourpage" or walk into the portal hierarchy to find your pages.
Follows an example how to do that:import org.jboss.portal.api.node.PortalNode; import org.jboss.portal.api.node.PortalNodeURL; import org.jboss.portlet.JBossRenderRequest; import org.jboss.portlet.JBossRenderResponse; import org.jboss.portal.core.impl.api.node.PortalNodeImpl; .... protected void doView(RenderRequest request, RenderResponse response) throws PortletException, UnavailableException { .... String myPageName = "MyPageName"; // this is your page name that you´re looking for JBossRenderRequest req = (JBossRenderRequest) request; PortalNode currentNode = req.getPortalNode(); while (currentNode.getType() != PortalNode.TYPE_PORTAL) { currentNode = currentNode.getParent(); } for (Iterator i = currentNode.getChildren().iterator(); i.hasNext();) { PortalNode child = (PortalNode)i.next(); if (child.getType() == PortalNode.TYPE_PAGE) { if (child instanceof PortalNodeImpl) { if (child.getName().equals(myPageName)) { PortalNodeURL childURL = ((JBossRenderResponse)response).createRenderURL(child); System.out.println("url to mypage = " + childURL.toString()); break; } } } }
There is a good example with the source code.
Check out this portlet:
core\src\main\org\jboss\portal\core\portlet\catalog\CatalogPortlet.java
You can also verify if the user is allowed to access it before redirect.
Hope this help.
regards,
R.Harari