Timo Rantalaiho wrote:
The problem being, I need some logic, wether one or both of the fields in question changed and it needs to be independent of the order of these two fields being evaluated. Do you propose to use a custom PropertyModel for both with an overridden setObject() method which accesses the RadioGroup and DropDownChoice? Then I'd need a second reallySetObject() method which actually does the setting as both setObject() would have that logic inside.... arghh...On Tue, 14 Oct 2008, Matthias Keller wrote:What i'd need would be something that's called after all fields have converted but before they're stored anywhere... Which I don't think exists.It does, "stored anywhere" means setObject(Object) on themodel of the FormComponent, and there you can do what you need.
Do you understand my problem? The Problem is, that there are two components of which the order in the HTML nor in the classes is NOT fixed and which might both change together or also just one. (wicket doesn't call setObject() when the selection didn't change)
Kludge or not - it's also just NOT possible as the Form updates every component after the validation anyway so whatever I do in a validator will be overwritten anywayConverters aren't really meant to be dependent from other fields as you never know if the other field even converted its value up to now - order matters and can ruin your day then....Nope. For validation of related fields you have IFormValidator,but I repeat that using validators for this would be a kludge :
Matt -- [EMAIL PROTECTED] +41 44 268 83 98 Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich http://www.ergon.ch ______________________________________________________________ e r g o n smart people - smart software
smime.p7s
Description: S/MIME Cryptographic Signature