Quick OGNL question
Ondřej Čada <[email protected]> Tue, 21 Feb 2012 15:33:05 +0100
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello there,
among others, I'm exploring the WOOgnl power (quite nice stuff!)
Now I've got a subcomponent whose bindings are "auction" and "field". =
Auction has methods
// Auction -- the object to which the component's "auction" binding =
leads
String listFieldValue(Field field) { return .... }
void setListFieldValue(Field field, Strin val) { .... }
The subcomponents contains, among others,
<wo:textfield value =3D "~auction.listFieldValue(field)"/>
and I was rather surprised seeing the form gets created properly -- the =
OGNL thing is quite nice :)
Of course, as you probably guessed long ago, self-evidently the form =
can't save with this binding. Now, is there an OGNL trick to fix it in =
the HTML/WOD so that it does save all right, or do I have to implement =
glue code in my component and bind to that, like
// Component glue code
String listFieldValue() { auction.listFieldValue(field) }
void setListFieldValue(String val) { =
auction.setListFieldValue(field,val) }
<!-- and new binding -->
<wo:textfield value =3D "$listFieldValue"/>
Thanks and all the best,
---
Ondra =C4=8Cada
OCSoftware: [email protected] http://www.ocs.cz
private [email protected] http://www.ocs.cz/oc