Hi all,

I'm working with Portal 2.4, Seam, MyFaces, Facelets, JBoss4.0.4 and mySql 5.0.

I'm trying to build some JSF components that are specific to JSF usage in 
portlets (like the Portlet Tag Library, but for JSF). The simplest example is a 
version of HtmlOutputLink that will render a link that is relative to the 
portal that the portlet is part of.

My first question is: Is this the right approach or am I misunderstanding 
something about HtmlOutputLink that makes it not use Portal Container relative 
links ?

Secondly, I'm having some trouble in getting the Portal Request URL, and I 
think it comes down to a decision about the specification - as indicated by the 
comments in org.jboss.portal.portlet.impl.jsr168.PortletRequestImpl's 
getContextPath() method, as follows:


  |    // PLT.11.1.5
  | 
  |    public String getContextPath()
  |    {
  |       // Fixme : should use the incoming request ?
  |       return invocation.getContainer().getWebApp().getContextPath();
  |    }
  | 
  |    // PLT.11.1.6
  | 

I would be able to use this getContextPath() method in my subclass of 
HtmlOutputLink in order to form URLs relative to the Portal Container if it 
returned the URL Portal Container Contextpath (which it does for all portlets 
deployed in the Portal Container Application).

Unfortunately, what I get from this method now is the ContextPath of the web 
application that my portlet is deployed in. This is considerably less useful to 
me than that portal container path as I think I get this path from 
ExternalContext.getRequestContextPath or from other means anyway.

My question for the group is this : Is the spec ambiguous and so this is really 
a problem with the specification, or should the PortalRequest interface return 
properties that are relative to the Portal Container - making this a bug ?

I will work around it in the meantime, but I'd like to know if it is something 
that should be fixed.

Thanks.

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

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


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to