CompoundPropertyModel and FormComponent

2012-01-16 Thread Schlärmann , Bob
Hi list, I've created a reusable form component for editing an address, called AddressPanel. It inherits from FormComponent and consists of multiple text fields for inputting data, instances of the component get added to a Form instance. How do I use this component together with a CompoundProp

RE: CompoundPropertyModel and FormComponent

2012-01-16 Thread Schlärmann , Bob
Thanks for your reply. I've tried it but it still gave the same error. However I also tried the following modified version of your idea: In AddressPanel.java: @Override protected void onInitialize() { super.onInitialize(); Object o = getDefaultModelObject(); setDe

RE: CompoundPropertyModel and FormComponent

2012-01-16 Thread Schlärmann , Bob
> Yes, I think you are doing it "the Wicket way", but your snippet and > mine should work. Do you modify components' model somewhere else? No, I don't think so. The page to which the component is added is constructed as follows: CompoundPropertyModel model = new CompoundPropertyModel(this); For

RE: CompoundPropertyModel and FormComponent

2012-01-18 Thread Schlärmann , Bob
Thanks for your response. After some more debugging I've found the cause and also found a solution. The cause is that models of intermediate components, such as the Panel in my case, are never initialized if they do not already have a model. The parent's model is looked up in Component.initMod

FormTester and components contained in Border

2012-02-23 Thread Schlärmann , Bob
Hi list, I have a form with components each contained within an individual border. When testing the form with FormTester I have to specify the full component id including the intermediate component id's added by the border. Is there any easier way to do this, e.g. with wildcard paths or somethi

RE: FormTester and components contained in Border

2012-02-23 Thread Schlärmann , Bob
to the root (the form in this case). > > The second approach sounds good enough for me to be included in WicketTester > ... > > On Thu, Feb 23, 2012 at 1:05 PM, Schlärmann, Bob > wrote: > > Hi list, > > > > I have a form with components each contained within an i

Form submit event

2012-03-26 Thread Schlärmann , Bob
Hello List, I'm trying to set the enable state of some form component based on the outcome of another form component. This needs to be done after a form request is submitted but before the form submitting process is started. Are there any methods to do this? Best regards, Bob Think green -

RE: Form submit event

2012-03-26 Thread Schlärmann , Bob
essage- > From: Martin Grigorov [mailto:mgrigo...@apache.org] > Sent: maandag 26 maart 2012 14:13 > To: users@wicket.apache.org > Subject: Re: Form submit event > > Hi, > > Can you rephrase after what and before what? > > On Mon, Mar 26, 2012 at 1:48 PM, Schlä

Conditional validation without overriding isRequired

2012-06-05 Thread Schlärmann , Bob
Hello, A question about form processing: is it possible to do conditional form validation without overriding FormComponent#isRequired? I have a form with about 5 different form components (e.g. textfields, dropdown, radiobutton). These fields are only required if a RadioGroup has a certain val

RE: Conditional validation without overriding isRequired

2012-06-06 Thread Schlärmann , Bob
Thanks for your reply, > Argh, confused setVisible() with setRequired, my bad ;-) > But nevertheless: call setRequiered(condition) in onConfigure(). I've tried this but if I am correct isRequired() gets called before onConfigure() during the request cycle (at least this is the behaviour I see d

RE: Conditional validation without overriding isRequired

2012-06-06 Thread Schlärmann , Bob
rted input of the field. See > > https://cwiki.apache.org/WICKET/conditional-validation.html > > for inspirations. > > Sven > > "Schlärmann, Bob" schrieb: > > >Thanks for your reply, > > > >> Argh, confused setVisible() with setRequ