"emuckenhuber" wrote : Although i still think doing
managedProperty.setValue(null); should not replace it with a default value.
|
Ok, so what should we use?
In use case 1) we need to specify "I want to use the default" and in use case 3)
we need to specify "I want to use null/nothing/blank".
So maybe for use case 1) we have
managedProperty.setDefaultValue()
and for 3) we have
managedProperty.setValue(null)
or alternatively (but this seems even more of a hack)
1) managedProperty.setValue(null);
3) managedProperty.setValue("");
Because the template will specify an actual value for the default, e.g. 20, its of no use
to us when the user wants to persist the "default value" since the "default
value" may change over time. This is exactly analogous to the case of defining the
resources configuration via xml. If you had a template with every xml element specified in
there and persisted that, it would be a different value than if you just included the xml
elements you wanted to specify, letting the server set the other ones as it saw fit.
Cheers
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222081#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...