Reinhard Poetz schrieb: > Carsten Ziegeler wrote: >> Is there any way of adding a ProcessingPhaseListener to the form apart >> from using the Java API. Can I configure such a listener in the form >> model? If not, can anyone point me to the location where to add such a >> thing? > > IIRC it's not possible. What's your use case? > We have forms where some fields are only requried if other fields have a specific value or if a specific submit button is pressed. Currently we are solving this with a custom mechanism using validators. This approach is in fact very ugly and requires some changes in the cforms.
I think a clean way would be to define these "rules" on the form and process them after the values have been read from the request. So basically I would like to have a configuration in the model like: <required required-id="a-widget" source-id="some-other-widget" source-value="some-value"/> or <required required-id="a-widget" submit-id="some-submit-id"/> (Don't quote me on the correct syntax or the names used) Carsten -- Carsten Ziegeler - Open Source Group, S&N AG http://www.s-und-n.de http://www.osoco.org/weblogs/rael/
