You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org> on 2007/10/24 09:31:50 UTC
[jira] Resolved: (MYFACES-1748)
facesContext.getExternalContext().encodeActionURL must not be called for
URLs from the ViewHandler
[ https://issues.apache.org/jira/browse/MYFACES-1748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Marinschek resolved MYFACES-1748.
----------------------------------------
Resolution: Invalid
Assignee: Scott O'Bryan
> facesContext.getExternalContext().encodeActionURL must not be called for URLs from the ViewHandler
> --------------------------------------------------------------------------------------------------
>
> Key: MYFACES-1748
> URL: https://issues.apache.org/jira/browse/MYFACES-1748
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 1.1.5
> Environment: Portlet environment using a WSRP portlet implemented with MyFaces
> Reporter: Dirk Schaube
> Assignee: Scott O'Bryan
>
> In org.apache.myfaces.shared_impl.renderkit.html.HtmlFormRendererBase.encodeBegin (and maybe other classes rendering action URLs) you find the following code segment:
> String actionURL = getActionUrl(facesContext, htmlForm);
> ...
> writer.writeURIAttribute(HTML.ACTION_ATTR,
> facesContext.getExternalContext().encodeActionURL(actionURL),
> null);
> and the method getActionUrl in HtmlRenderer says:
> return viewHandler.getActionURL(facesContext, viewId);
> So what's wrong with it? The Method viewHandler.getActionURL returns a URL that is suitable for rendering (see the JavaDoc). This URL may not be a normal URL as in my case with a wsrp portlet rendered on the producer server where the URL look like this: wsrp_rewrite?wsrp-urlType=blockingAction&wsrp-mode=wsrp%3Aview...
> If you call encodeActionURL with such a URL the method javax.portlet.PortletResponse.encodeURL(url) is called. This method checks for either an absolute URL or full path URI. As both is not the case here, I get a IllegalArgumentException.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.