Hi Anthony,

On 02/11/2011 12:06, Anthony wrote:
Does the parent_id have to persist across multiple requests? If so, then
storing in session is probably the way to go. If you don't want to have
the value appear in the form, you could either use an onvalidation
function to populate the value after the form is validated, or you could
make it a computed field if you know it will always be populated via a
session and/or request variable.


No, it doesn't need to persist - that's part of my reason for feeling that this is inelegant.

In fact, I have to set the session value in each request, to ensure that the "fresh" value is used and not one from a previous request. This app uses nested components, so there may be more than one of these structures in a single page load.

I'll experiment with "onvalidation", which seems cleaner. Failing that "compute" (which I hadn't even considered) seems more natural than "default" here.


--

Regards,

PhilK


'a bell is a cup...until it is struck'

Reply via email to