[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-2289) Provide no-arg constructor for SeamExpressionFactory

Florent Guilllaume (JIRA) jira-events at lists.jboss.org
Tue Mar 11 14:26:57 EDT 2008

    [ http://jira.jboss.com/jira/browse/JBSEAM-2289?page=comments#action_12402201 ] 
Florent Guilllaume commented on JBSEAM-2289:

In Nuxeo EP we use the Seam EL with our own subclass of FaceletViewHandler.


To do that we to override createCompiler and pass info to create it based on SeamExpressionFactory.
There doesn't seem to be any other API than using setFeature on the compiler to do that, and it needs a factory. Thus my problem.

Today I have had to add the below class to Nuxeo EP to work around that.


Having a public constructor would avoid this hack and wouldn't harm anyone. And it would make SeamExpressionFactory obey the implicit contract required by com.sun.facelets.compiler.Compiler (see createExpressionFactory & featureInstance).


> Provide no-arg constructor for SeamExpressionFactory
> ----------------------------------------------------
>                 Key: JBSEAM-2289
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2289
>             Project: JBoss Seam
>          Issue Type: Feature Request
>          Components: EL
>    Affects Versions: 2.0.0.GA
>            Reporter: Florent Guilllaume
>            Priority: Minor
> I'd like a public no-arg constructor to SeamExpressionFactory:
>     public SeamExpressionFactory() {
>         super(INSTANCE);
>     }
> The reason is that I want a facelet view handler extending FaceletViewHandler with the Seam expression factory. To do that I would use:
>     @Override
>     protected Compiler createCompiler() {
>         Compiler compiler = super.createCompiler();
>         compiler.setFeature(Compiler.EXPRESSION_FACTORY, "org.jboss.seam.el.SeamExpressionFactory");
>         return compiler;
>     }
> But a Compiler.EXPRESSION_FACTORY expects a class with a no-arg constructor (see com.sun.facelets.compiler.Compiler#createExpressionFactory and #featureInstance).
> As a workaround I can use my own subclass of SeamExpressionFactory but the super constructor     SeamExpressionFactory(ExpressionFactory expressionFactory), which I need to call, is package-private. So I have to use the package org.jboss.seam.el just to call that constructor, which is not nice.
> Just having a no-arg constructor would simplify all this.

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