You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Dominik Böhm <do...@dbedv.de> on 2007/10/28 11:04:27 UTC

Using nullValue-properties with Shale Tiger

Hello,

I am doing my first steps with Shale and ran into some problems with 
Shale Tiger. I think the @Property-annotation has the same semantics as 
the managed-property thing in the faces-config.xml. Main difference 
seems to be that @Property only supports non-null values whereas 
managed-property also has a subproperty "null-value". I had a look at 
the ManagedPropertyConfig.class in the Tiger source code and found out 
that there actually is also a nullValue-property for Tiger-Managed 
properties. But how can I tell with a @Property annotation that I want 
that property to start with a null value? I tried the following:

1.    @Property(name="newUser", value=null)
    private User newUser;

That doesn't work as java tells me that "value must be a constant 
expression".

2.     @Property(name="newUser", value="")
    private User newUser;

That doesn't work as shale searches for a converter from String to User 
but cannot find one. That results in a null pointer exception.

Maybe I am missing something but it seems that shale tiger is not able 
to work wih nullValue-properties if I'd like to define them using 
annotations.

I hope someone can help me find out how to use tiger here.

Thanks a lot in advance and best regards
Dominik