I'm having a similar problem and modifying the setter doesn't work for me.
In my use case, i have a Double property in a page. This property is
bound to the value of a TextField. If i submit with the textfield an
empty a "0.0" value shows up, instead of the submitted value that was null.
I've
Hi Nick,
Using a setter does work, right?
Nick Westgate wrote:
>
> Getters/setters are only required for JavaBean conformity, e.g. to use
> prop.
>
> I've just tested this on 5.0.5 (maybe 5.0.6 later if I get time) ...
> There is a bug - setting the property to null doesn't work.
>
> If some
Getters/setters are only required for JavaBean conformity, e.g. to use prop.
I've just tested this on 5.0.5 (maybe 5.0.6 later if I get time) ...
There is a bug - setting the property to null doesn't work.
If someone can verify this on 5.0.6 before I do, please log a JIRA.
Cheers,
Nick.
Josh
>
> if I have an attribute, I should use a setter to assign it? like this:
>
Hmm... looking at javassist, it looks like there is the ability to modify
field level access within a method. Perhaps, if changing to the setter
worked then this should be filed as a defect, if it isn't already.
Josh
On
Hi,
You are correct. this does bring up a question:
if I have an attribute, I should use a setter to assign it? like this:
private String id;
void onActivate() {
id = "myid"; // wrong
setId("myid"); // correct ?
if (id == "myid"); // wrong
if (getId() == "myid"); // correct?
>
> even i set uid to null, it is still not null next time when the page is
> activated, why? what's the correct way of setting a persisted variable
> null?
>
I would guess that the right way to do it would be to use the setter method
for the attribute. I haven't looked, but I would guess that Tap