myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (ORCHESTRA-17) RequestParameterFacesContextFactory only works with HttpServletResponse
Date Thu, 15 Oct 2009 17:12:31 GMT

    [ https://issues.apache.org/jira/browse/ORCHESTRA-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766124#action_12766124
] 

Leonardo Uribe commented on ORCHESTRA-17:
-----------------------------------------

I have checked the patch available here and it do the same as ORCHESTRA-15, but in a different
way.

To make it work it does two things:

1. Wrap ExternalContext.encodeActionURL and ExternalContext.encodeResourceURL to include the
required params to make orchestra work.
2. Check if it is used jsf 1.1 or jsf 1.2 to wrap ExternalContext properly.

The problem with this approach is that set jsf 1.2 in orchestra pom.xml, so there is a risk
to program with jsf 1.2 specific api and make orchestra incompatible with jsf 1.1

The difference in ORCHESTRA-15 is that the wrapped methods that are jsf 1.2 specific are called
through reflection. This gives flexibility at cost of performance, but in the long term it
is preferred. My opinion is it is better to create a jsf 1.2 specific jar like in tomahawk
and fix the performance issue there.

In conclusion we can close this issue, because the solution a solution for this one was already
applied on ORCHESTRA-15. Checking this stuff in deep in liferay, I have found other issue
that will be committed in ORCHESTRA-15. Also, I have planned document portlet stuff better
so I'll commit the remaining stuff in ORCHESTRA-15 soon

> RequestParameterFacesContextFactory only works with HttpServletResponse
> -----------------------------------------------------------------------
>
>                 Key: ORCHESTRA-17
>                 URL: https://issues.apache.org/jira/browse/ORCHESTRA-17
>             Project: MyFaces Orchestra
>          Issue Type: Bug
>          Components: RequestParameterProvider
>    Affects Versions: 1.0, 1.1
>         Environment: Liferay Portlet Container
>            Reporter: Martin Marinschek
>            Assignee: Leonardo Uribe
>         Attachments: ORCHESTRA-17.patch
>
>
> The following snippet wrongly casts to HttpServletResponse, therefore portlet-environments
will not work:     
>    if (response instanceof HttpServletResponse)
>         {
>             HttpServletRequest httpServletRequest = (HttpServletRequest) request;
>             
>             // Wrap this request only if something else (eg a RequestParameterServletFilter)
has not already wrapped it.
>             if (!Boolean.TRUE.equals(httpServletRequest.getAttribute(RequestParameterServletFilter.REQUEST_PARAM_FILTER_CALLED)))
>             {
>        
> I will commit a solution very soon.
> regards,
> Martin

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message