You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Christian Kaltepoth (JIRA)" <de...@myfaces.apache.org> on 2008/08/09 13:44:44 UTC

[jira] Created: (MYFACES-1902) Allow to use different ExpressionFactory implementation

Allow to use different ExpressionFactory implementation
-------------------------------------------------------

                 Key: MYFACES-1902
                 URL: https://issues.apache.org/jira/browse/MYFACES-1902
             Project: MyFaces Core
          Issue Type: New Feature
          Components: Extension Feature
    Affects Versions: 1.2.4-SNAPSHOT
            Reporter: Christian Kaltepoth


It should be possible to use a different ExpressionFactory implementation. This feature is required
to use 3rd party EL implementations like JBoss EL. Mojarra already supports this with the
'com.sun.faces.expressionFactory' context parameter.

MyFaces Core 1.2.x already supports a context parameter 'org.apache.myfaces.EXPRESSION_FACTORY'
but it is only evaluated in a JSP 2.0 environment (see MYFACES-1693 for details).

It should be possible to use this parameter with JSP 2.1 as well. The corresponding code
should be refactored from Jsp20FacesInitializer to AbstractFacesInitializer to be usable in both
JSP 2.0 and 2.1.

Discussion on myfaces-users:

http://www.nabble.com/Replacing-expression-factory-td18867420.html


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


[jira] Updated: (MYFACES-1902) Allow to use different ExpressionFactory implementation

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe updated MYFACES-1902:
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.7-SNAPSHOT
         Assignee: Leonardo Uribe  (was: Matthias Weßendorf)
           Status: Resolved  (was: Patch Available)

I have checked the patch and it is fine, so I'll commit it.

Thanks to Christian Kaltepoth for provide this patch

> Allow to use different ExpressionFactory implementation
> -------------------------------------------------------
>
>                 Key: MYFACES-1902
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1902
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: Extension Feature
>    Affects Versions: 1.2.4-SNAPSHOT
>            Reporter: Christian Kaltepoth
>            Assignee: Leonardo Uribe
>             Fix For: 1.2.7-SNAPSHOT
>
>         Attachments: MYFACES-1902-webapp.zip, MYFACES-1902.patch
>
>
> It should be possible to use a different ExpressionFactory implementation. This feature is required
> to use 3rd party EL implementations like JBoss EL. Mojarra already supports this with the
> 'com.sun.faces.expressionFactory' context parameter.
> MyFaces Core 1.2.x already supports a context parameter 'org.apache.myfaces.EXPRESSION_FACTORY'
> but it is only evaluated in a JSP 2.0 environment (see MYFACES-1693 for details).
> It should be possible to use this parameter with JSP 2.1 as well. The corresponding code
> should be refactored from Jsp20FacesInitializer to AbstractFacesInitializer to be usable in both
> JSP 2.0 and 2.1.
> Discussion on myfaces-users:
> http://www.nabble.com/Replacing-expression-factory-td18867420.html

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


[jira] Commented: (MYFACES-1902) Allow to use different ExpressionFactory implementation

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631771#action_12631771 ] 

Matthias Weßendorf commented on MYFACES-1902:
---------------------------------------------

So? Even if JBoss EL is not compatible, why should myfaces not allow a hook?
That doesn't mean we should use J Boss EL as default. This would have two major problems:
-we can't use JBoss stuff @Apache, b/c of license
-if it is really incompatible, we don't pass the TCK

However, if customers want to use it in myfaces instead of the "original" one, why not?`

> Allow to use different ExpressionFactory implementation
> -------------------------------------------------------
>
>                 Key: MYFACES-1902
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1902
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: Extension Feature
>    Affects Versions: 1.2.4-SNAPSHOT
>            Reporter: Christian Kaltepoth
>            Assignee: Matthias Weßendorf
>
> It should be possible to use a different ExpressionFactory implementation. This feature is required
> to use 3rd party EL implementations like JBoss EL. Mojarra already supports this with the
> 'com.sun.faces.expressionFactory' context parameter.
> MyFaces Core 1.2.x already supports a context parameter 'org.apache.myfaces.EXPRESSION_FACTORY'
> but it is only evaluated in a JSP 2.0 environment (see MYFACES-1693 for details).
> It should be possible to use this parameter with JSP 2.1 as well. The corresponding code
> should be refactored from Jsp20FacesInitializer to AbstractFacesInitializer to be usable in both
> JSP 2.0 and 2.1.
> Discussion on myfaces-users:
> http://www.nabble.com/Replacing-expression-factory-td18867420.html

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


[jira] Commented: (MYFACES-1902) Allow to use different ExpressionFactory implementation

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631656#action_12631656 ] 

Leonardo Uribe commented on MYFACES-1902:
-----------------------------------------

Checking the documentation of jboss el here

http://docs.jboss.com/seam/latest/reference/en-US/html/elenhancements.html

it says that JBoss EL is incompatible with jsp 2.1, so enable this param in this case is useless.

Is there another ExpressionFactory implementation available that gives some features? if that so this issue has sense to be solved but if not.....

> Allow to use different ExpressionFactory implementation
> -------------------------------------------------------
>
>                 Key: MYFACES-1902
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1902
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: Extension Feature
>    Affects Versions: 1.2.4-SNAPSHOT
>            Reporter: Christian Kaltepoth
>            Assignee: Matthias Weßendorf
>
> It should be possible to use a different ExpressionFactory implementation. This feature is required
> to use 3rd party EL implementations like JBoss EL. Mojarra already supports this with the
> 'com.sun.faces.expressionFactory' context parameter.
> MyFaces Core 1.2.x already supports a context parameter 'org.apache.myfaces.EXPRESSION_FACTORY'
> but it is only evaluated in a JSP 2.0 environment (see MYFACES-1693 for details).
> It should be possible to use this parameter with JSP 2.1 as well. The corresponding code
> should be refactored from Jsp20FacesInitializer to AbstractFacesInitializer to be usable in both
> JSP 2.0 and 2.1.
> Discussion on myfaces-users:
> http://www.nabble.com/Replacing-expression-factory-td18867420.html

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


[jira] Updated: (MYFACES-1902) Allow to use different ExpressionFactory implementation

Posted by "Christian Kaltepoth (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Kaltepoth updated MYFACES-1902:
-----------------------------------------

    Status: Patch Available  (was: Open)

> Allow to use different ExpressionFactory implementation
> -------------------------------------------------------
>
>                 Key: MYFACES-1902
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1902
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: Extension Feature
>    Affects Versions: 1.2.4-SNAPSHOT
>            Reporter: Christian Kaltepoth
>            Assignee: Matthias Weßendorf
>         Attachments: MYFACES-1902-webapp.zip, MYFACES-1902.patch
>
>
> It should be possible to use a different ExpressionFactory implementation. This feature is required
> to use 3rd party EL implementations like JBoss EL. Mojarra already supports this with the
> 'com.sun.faces.expressionFactory' context parameter.
> MyFaces Core 1.2.x already supports a context parameter 'org.apache.myfaces.EXPRESSION_FACTORY'
> but it is only evaluated in a JSP 2.0 environment (see MYFACES-1693 for details).
> It should be possible to use this parameter with JSP 2.1 as well. The corresponding code
> should be refactored from Jsp20FacesInitializer to AbstractFacesInitializer to be usable in both
> JSP 2.0 and 2.1.
> Discussion on myfaces-users:
> http://www.nabble.com/Replacing-expression-factory-td18867420.html

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


[jira] Commented: (MYFACES-1902) Allow to use different ExpressionFactory implementation

Posted by "Christian Kaltepoth (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689197#action_12689197 ] 

Christian Kaltepoth commented on MYFACES-1902:
----------------------------------------------

Since I am very interested in this feature I have developed a fix for the issue. Find attached the patch against core12 trunk.

The changes can be summarized as follows. The existing code for loading the custom ExpressionFactory has been moved from Jsp20FacesInitializer to AbstractFacesInitializer. Both AbstractFacesInitializer implementations now check for a custom ExpressionFactory by calling getUserDefinedExpressionFactory() before they proceed with their default behavior for finding the ExpressionFactory.

I attached a small webapp for a proof of concept. The webapp can be started either in a JSP 2.1 or JSP 2.0 container by using different maven profiles. The demo shows basic features of JBossEL. See the webapp's source for details.

Tomcat 6.0 (JSP 2.1) environment:

# mvn -Ptomcat60 clean package cargo:start

Tomcat 5.5 (JSP 2.0) environment:

# mvn -Ptomcat55 clean package cargo:start

The demo webapp can be accessed with this url:

http://localhost:8080/eldemo/


> Allow to use different ExpressionFactory implementation
> -------------------------------------------------------
>
>                 Key: MYFACES-1902
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1902
>             Project: MyFaces Core
>          Issue Type: New Feature
>          Components: Extension Feature
>    Affects Versions: 1.2.4-SNAPSHOT
>            Reporter: Christian Kaltepoth
>            Assignee: Matthias Weßendorf
>         Attachments: MYFACES-1902-webapp.zip, MYFACES-1902.patch
>
>
> It should be possible to use a different ExpressionFactory implementation. This feature is required
> to use 3rd party EL implementations like JBoss EL. Mojarra already supports this with the
> 'com.sun.faces.expressionFactory' context parameter.
> MyFaces Core 1.2.x already supports a context parameter 'org.apache.myfaces.EXPRESSION_FACTORY'
> but it is only evaluated in a JSP 2.0 environment (see MYFACES-1693 for details).
> It should be possible to use this parameter with JSP 2.1 as well. The corresponding code
> should be refactored from Jsp20FacesInitializer to AbstractFacesInitializer to be usable in both
> JSP 2.0 and 2.1.
> Discussion on myfaces-users:
> http://www.nabble.com/Replacing-expression-factory-td18867420.html

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