[jboss-user] [JBoss Portal] - Re: Url : how to define MyPortal as the default portal.

Antoine_h do-not-reply at jboss.com
Sat Jul 19 20:29:46 EDT 2008


Hello,

I don't remember exactly what I did for the class in the jira.
I surely modified it to provide it to the portal.
mine is a little bit different, for specific thing of my portal.

however, here the main part of the code of it, that must be changed.
this is working in my portal, with JBP 2.6.4.

			// orginal code : Portal portal = ctx.getDefaultPortal();
  | 			PortalObject portalObject = ctx.getChild(getDefaultPortalName());
  | 			if (portalObject == null) {
  | 				throw new IllegalStateException(
  | 						"PortalObject as Default Portal is not found. Default Portal name is defined to : "
  | 								+ getDefaultPortalName());
  | 			}
  | 			Portal portal = null;
  | 			if (portalObject instanceof Portal) {
  | 				portal = (Portal) portalObject;
  | 			} else {
  | 				throw new IllegalStateException(
  | 						"Can't find PortalObject with default portal name : "
  | 								+ getDefaultPortalName());
  | 			}
  | // (.... here the rest of the code of the method)
  | 

The whole class is quite simple.
the thing to do (modify) is to find the default portal from the name you want, and then make the same process as the original class, with that "portal" instance.

look at the code and make it work your way.
that the most simple thing I believe I can tell for helping you do it.

hope it helps.


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

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



More information about the jboss-user mailing list