Hello,
Let’s say I have a Page component. On this page is a subcomponent, MyText, that looks like this in Page’s template:
<wo:MyText value="$item.content" />
And then MyText itself is just this:
<wo:text value="$^value"></wo:text>
Item.content is a String, and allowsNull is N in the model. So, obviously, it’s a candidate for automatic EOF property validation on form submission. When I leave the textarea blank and submit, validationFailedWithException() is called on the page—great.
But that’s not quite what MyText looks like—say I need to do other things with the bound string. So it actually looks like this:
<wo:text value="$value"></wo:text>
and has a couple of accessor methods instead:
public String value() { return stringValueForBinding("value"); }
public void setValue(String value) { setValueForBinding(value, "value"); }
Now, when I submit a blank textarea, validationFailedWithException() is _not_ called on the page. What’s going on here? What have I stomped on? How do I trigger automatic property validation with a component like this?
|