It occurred to me after I typed this that my assumptions were probably wrong, so please disregard.
Apologies, Les Baker On Fri, Aug 3, 2012 at 4:04 AM, robert baker <les.baker1...@gmail.com> wrote: > Hi, > > I've stumbled on an interesting problem in trying to upgrade to 5.3.4 > that I am stumped. I am getting a "null term in property expression" > exception with some template markup that looks like the following: > > ... > <t:hidden t:id="primaryCodeKey" value="primaryCode" /> > <t:textfield t:id="primaryCode" value="primaryCode.code" /> > ... > > Just to be clear: the "primaryCode" object is wired up in the page > class and has a getCode method. There is also an appropriate > ValueEncoder contributed to the ValueEncoderSource service, it is > getting instantiated, and in its toValue() method, the encoder will > try to retrieve the object from a DAO and return a "blank object" > (non-null) otherwise. > > After doing some digging, the toValue method on the above ValueEncoder > doesn't get called (in time). Looking at the sources for the TextField > and Hidden components: > * The ComponentAction in the TextField that writes to its value > parameter during form submission gets queued up during the SetupRender > phase (see corelib/base/AbstractField.java line 164), however > * The ComponentAction in the Hidden component that restores its value > parameter gets queued up during BeginRender (see > corelib/components/Hidden.java line 121). Therefore, > * During form submission, the TextField's Action executes before the > Hidden's Action, but it should execute in the opposite order. > > Is this an unintended consequence, or something that I am missing? > This can be worked around, but it seems like it would be a common use > case. > > Thanks, > Les Baker --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org