You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
| Online: | 9 Members of 4090 |
| Forum: Seam Users |
17. Apr 2008, 15:39 CET | Link |
UISeamCommandBase.isPortletRequest() check the external context's request's instance wich the javax.portlet.PortletRequest, it's a problem when some portal(such as jetspeed) has there portlet request implemented with extending HttpServletRequest.
so this cause the s:link,s:button's action attribute problems in these container, because the url generated has been urlencoded.
here is the discuss: some PC have their portletRequest extending the HttpServletRequest
any ideas?
then, how can i control url encode behavior manually?
org.jboss.seam.ui.component.UISeamCommandBase :
private static Class PORTLET_REQUEST; static { try { PORTLET_REQUEST = Class.forName("javax.portlet.PortletRequest"); } catch (Exception e) {} } private static boolean isPortletRequest(FacesContext facesContext) { return PORTLET_REQUEST !=null && PORTLET_REQUEST.isInstance( facesContext.getExternalContext().getRequest() ); } public String getUrl() throws UnsupportedEncodingException { ... ViewUrlBuilder url = new ViewUrlBuilder(viewId, getFragment(), !isPortletRequest(getFacesContext())); ... }I don't understand, they must still implement PortletRequest. What patch would fix this?
Read about how to report a bug.
for example, add an attribute to s:button and s:link, the url encoding behavior should execute according to this attribute.