[
https://issues.apache.org/jira/browse/MYFACES-1748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536822
]
Scott O'Bryan commented on MYFACES-1748:
----------------------------------------
I don't know what we want to do for the JSF1.1.5 Bridge. But I know in the
JSR-301 Portlet Bridge the spec has a clarification on the
viewHandler.getActionURL method. According to 301, the
viewHandler.getActionURL must not get its content by calling the
RenderResponse.createActionURL() method and it needs to work in both the Action
as well as the Render Phase. It is expected that the encodeActionURL *WILL* be
called on the retrieved action URL and, at the time of the encoding, is when
the wsrp_rewrite tags will be added.
This would mean that from the perspective of the JSR-401 Bridge, the
HtmlFormRenderBase's behavior is correct and the bridge's code is wrong. One
thing I would suggest is NOT making a change that would pre-clude the renderkit
from working in a JSR-301 environment, but since JSR-301 is spec'd for a
minimum of MyFaces 1.2, we should definately have a solution that allows this
to work unless we don't want to claim WSRP support with the current MyFaces
Bridge.
See JSR-301 Section 2.2.1 in the latest Public Draft:
http://www.jcp.org/en/jsr/detail?id=301
> 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
>
> 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.