[ 
https://issues.apache.org/jira/browse/TOMAHAWK-1331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631977#action_12631977
 ] 

Leonardo Uribe commented on TOMAHAWK-1331:
------------------------------------------

 I'm testing it with pluto, myfaces portlet bridge and myfaces core 1.2 and 
works as expected.

 The code is fine. In this part of the code, we don't have an ExternalContext 
instance, so we have to test is based on the request and context object.

It is supposed that on context var it receives a javax.portlet.PortletConfig 
instance. This method was added to tomahawk ExternalContextUtils (not present 
in commons 1.1 ExternalContextUtils version)



> ExternalContextUtils.getRequestType() doesn't work in a portlet environment
> ---------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1331
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1331
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Portlet_Support
>    Affects Versions: 1.1.7
>         Environment: WebSphere Portal 6.0
> MyFaces 1.1.6
> Tomahawk 1.1.7
> Portals Bridges 1.0.4
>            Reporter: Romain Seguy
>
> ExternalContextUtils.getRequestType(Object config, Object request) signature 
> doesn't correspond to what's used in 
> TomahawkFacesContextFactory.getFacesContext(): The called method requires a 
> config and a request while it's invoked using a context and a request.
> ==> This always leads to a ClassCastException at 
> TomahawkFacesContextFactory.getFacesContext()#64.
> The invoked method seems to have to be fixed something like this:
> class ExternalContextUtils:
> public static final RequestType getRequestType(Object context, Object 
> request) {
>         if(_PORTLET_CONTEXT_CLASS != null)
>         {
>             if (_PORTLET_CONTEXT_CLASS.isInstance(context))
>             {
>                 // blablabla
> }

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

Reply via email to