NavigationResource Constructor have to init SiteType attribute
--------------------------------------------------------------
Key: GTNPORTAL-2179
URL:
https://issues.jboss.org/browse/GTNPORTAL-2179
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Hai Nguyen
Priority: Minor
When using this constructor:
{code:xml}
public NavigationResource(String siteName)
{
this(null, siteName, null);
}
{code}
the siteType isn't initialized.
So when using this contructor like here:
{code:xml}
RequestContext ctx = RequestContext.getCurrentInstance();
NodeURL nodeURL = ctx.createURL(NodeURL.TYPE);
NavigationResource resource = new NavigationResource("classic");
return nodeURL.setResource(resource).toString();
{code}
You 'll get a NullPointerException:
{code:xml}
Caused by: java.lang.NullPointerException
at org.exoplatform.web.url.navigation.NodeURL.getParameterValue(NodeURL.java:90)
at org.exoplatform.portal.url.PortalURLContext.render(PortalURLContext.java:135)
at org.exoplatform.web.url.PortalURL.toString(PortalURL.java:307)
{code}
caused by the non intialized siteType attribute.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira