Hello,
maybe it is a architecture problem in our appliaction, but sometimes we
use following construction (example):
// managed bean that has null property:
public class TestBean {
private String name;
public String getName() {
return name;
}
// Not-initialized bean
Martin,
When your bean is constructed this way, what are the results of
calling:
- ValueBinding.getValue()
- ValueBinding.setValue()
- ValueBinding.getType()
-- Adam
On 10/7/06, Martin Koci [EMAIL PROTECTED] wrote:
Hello,
maybe it is a architecture problem in our appliaction, but sometimes
- ValueBinding.getValue(): null
- ValueBinding.setValue() : javax.faces.el.PropertyNotFoundException:
Base is null: .nullTestBean
- ValueBinding.getType() : javax.faces.el.PropertyNotFoundException:
Base is null: .nullTestBean
Same result with RI and MyFaces.
Exception with getType() is a
Thanks! Wow, that's some bizarro EL behavior. Can't imagine
why it got specified that way (if it is, in fact, specified to
do that). I don't know why you should be able to get a value,
but not find out if it's read-only or get its type. IMO, if
getValue() returns safely, isReadOnly() and
On 10/7/06, Martin Koci [EMAIL PROTECTED] wrote:
- ValueBinding.getValue(): null
- ValueBinding.setValue() : javax.faces.el.PropertyNotFoundException:
Base is null: .nullTestBean
- ValueBinding.getType() : javax.faces.el.PropertyNotFoundException:
Base is null: .nullTestBean
Same result with
I agree with Adam,
I think an Exception while calling any of the methods on ValueBinding
(except for the setValue method) should be considered a bug in the
application and logged at
level WARNING.
And in this case, we should return true
to indicate that the binding is readOnly (opt for the more