[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1353) SeamExpressionFactory breaks custom ExpressionFactories

Mike Quilleash (JIRA) jira-events at lists.jboss.org
Thu Jun 7 13:36:11 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-1353?page=comments#action_12364570 ] 
            
Mike Quilleash commented on JBSEAM-1353:
----------------------------------------

I have a custom ApplicationFactory that uses the standard chaining mechanism (single arg constructor of ApplicationFactory) and then an Application class like this...

public class ApplicationImpl extends ApplicationWrapper
{
    public ApplicationImpl( Application other )
    {
        super( other );
    }

    @Override
    public ExpressionFactory getExpressionFactory()
    {
        ExpressionFactory expressionFactory = super.getExpressionFactory();

        return new ExpressionFactoryImpl( expressionFactory );
    }
}


ApplicationWrapper just delegates all calls down to the "other" Application.  I followed a similar pattern for the ExpressionFactory.  The ExpressionFactoryImpl delegates most functionality down to the passed in "expressionFactory" but it does some checks and creates custom ValueExpressions for a couple of cases.

You're probably right, I've never come across a spec for nesting ExpressionFactories like this.


You can get the JSF RI 1.2 to use an el of your choosing by putting this in web.xml

  <!-- define the EL library to use -->
  <context-param>
    <param-name>com.sun.faces.expressionFactory</param-name>
    <param-value>org.apache.el.ExpressionFactoryImpl</param-value>
  </context-param>

Although of course that is more configuration that has to be done.


If I could change the application nesting so it was this...

My Application -> Seam Application -> Default JSF Application

then it would be fine, my application would get first look in when getExpressionFactory() is called.  But at the moment the nesting is like this

Seam Application -> My Application -> Default JSF Application

so the call to getExpressionFactory() never gets delegated to My Application so it can add the custom expression factory.


Hope that explains my issue.

> SeamExpressionFactory breaks custom ExpressionFactories
> -------------------------------------------------------
>
>                 Key: JBSEAM-1353
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1353
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: EL
>    Affects Versions: 1.3.0.ALPHA
>         Environment: Any
>            Reporter: Mike Quilleash
>         Assigned To: Gavin King
>            Priority: Blocker
>             Fix For: 1.3.0.ALPHA
>
>         Attachments: expressionfactory.patch
>
>
> Trying out the current CVS and the modifications to the SeamExpressionFactory have broken my application.  In the old version SeamExpressionFactory used to wrap the ExpressionFactory facelets would've created by default (getApplication().getExpressionFactory()) but now it just wraps a jboss EL ExpressionFactory.
> I have a custom ExpressionFactory which i need to create custom ValueExpressions in certain circumstances.  The above change circumvents my ExpressionFactory when facelets is compiling.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list