#37 Closure binding don't create ManagedBean

closed-fixed
Ponder
5
2009-03-14
2009-03-13
No

I'm using Gracelets 2.0 beta5 and have...

faces-config.xml

<managed-bean>
<managed-bean-name>mbean</managed-bean-name>
<managed-bean-class>control.ManagedBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>

index.groovy
...
h.inputText(value: Value {mbean.texto})
h.commandButton("OK", action: {mbean.actionTeste()})
...

its throw
java.lang.NullPointerException: Could not get Binding[mbean].texto, Binding[mbean] is null

however if I change index.groovy to
...
h.inputText(value: "#{mbean.texto}")
h.commandButton("OK", action: {mbean.actionTeste()})
...

all work fine.
After an EL create the ManagedBean, others closure bindings work fine too.

Discussion

  • Ponder
    Ponder
    2009-03-14

    Great find! Yeah, I know exactly what is causing that, there is not enough backwards testing with EL. I will get this in the next beta release.

     
  • Ponder
    Ponder
    2009-03-14

    • labels: --> Core - Context Resolution
    • assigned_to: nobody --> ponderator
     
  • Ponder
    Ponder
    2009-03-14

    This fix will be available in the next release (Milestone, Beta or Stable)

     
  • Ponder
    Ponder
    2009-03-14

    • status: open --> closed-fixed