Hi,

I've got the following problem: I have a list of relatively complex
data objects that I need to edit, which leads to the following form:

        <t:form t:id="cform">
                <t:submit value="Save"/>
                <t:loop source="constraints" value="constraint" 
encoder="constraintEncoder">
                        <t:myconstraint constraint="constraint" />
                </t:loop>
        </t:form>

So far so great, but I'm having real problems with the MyConstraint
class, as the only form event that trickles down is 'validate'. This
creates problem with the initialisation of some data structures, which
I would usually do in onPrepare, and also with the updating of data
structures when saving (onSuccess).

I've managed to work around the initialisation problems by
initialising everything in the getter methods and liberal use of
@Cached (neat, that!). This works, but is different from the way I
initialise other forms.

Saving is a bigger issue, as I need to update some data structures. I
can do this in 'onValidate', but that is just plain wrong.

Am I trying to do something that I should not be doing? Or have I just
overlooked something? Anybody got a pattern for dealing with this type
of thing?

Thanks!

Adriaan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to