Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-22 Thread Sebastien
Hi Andrea, Thanks for this investigation, this is very interesting that nothing breaks! > I don't understand why the onFormSubmitted is called on the root form and not on the actually submitted one The question is "what form is really submitted/posted"? We know that only a real form - the root f

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-22 Thread Andrea Del Bene
Hi, playing with the quickstart I've noticed something strange that might help to solve this issue. Before rendering phase both the inner and outer form are marked as submitted (Form#isSubmitted returns true). This is quite strange as I would expect that only the inner form would be marked as

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-21 Thread Sven Meier
Hi, > 2) if the application needs to repaint any form which is not > processed then the application has to call #inputChanged() for > this form / form component this will break current applications. We can argue which approach is more consistent, but I don't think we should change this just be

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-21 Thread Sven Meier
Hi, > In most case, I agree, but sometime, there is no other choice: wizard > steps for instance. why do you have forms inside your wizard steps? Sven On 20.11.2015 17:12, Sebastien wrote: Hi, In most cases it's not necessary to include a form in panels In most case, I agree, but somet

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-20 Thread Martin Grigorov
On Fri, Nov 20, 2015 at 5:02 PM, Sven Meier wrote: > > When a nested form is submitted Wicket calls the processing methods > > only for the nested form. > > I don't see a reason why #inputChanged() should be an exception. > > The outer form is not processed, because we don't want validation error

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-20 Thread Sebastien
Hi, > In most cases it's not necessary to include a form in panels In most case, I agree, but sometime, there is no other choice: wizard steps for instance. Best regards, Sebastien On Fri, Nov 20, 2015 at 5:02 PM, Sven Meier wrote: > > When a nested form is submitted Wicket calls the process

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-20 Thread Patrick Davids
Hi both, ticket opened and quickstart attached. https://issues.apache.org/jira/browse/WICKET-6041 Concerning reuseing components. Yes, the clearInput() works, but the refreshed components, does not know anything about another component, which changes something. So, I got a dependency on behavio

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-20 Thread Sven Meier
> When a nested form is submitted Wicket calls the processing methods > only for the nested form. > I don't see a reason why #inputChanged() should be an exception. The outer form is not processed, because we don't want validation errors to appear. #inputChanged() is called, so that on a possibl

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-20 Thread Martin Grigorov
On Fri, Nov 20, 2015 at 4:37 PM, Sven Meier wrote: > > IMO the current behavior is wrong. > > I don't see anything wrong with the current nested form handling. Care to > elaborate? > The problem I see is that Wicket treats #inputChanged() differently than all other Form processing methods (like

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-20 Thread Sven Meier
> IMO the current behavior is wrong. I don't see anything wrong with the current nested form handling. Care to elaborate? It's rather unusual to have to formComponents for the same model on a single page. IMHO Patrick shouldn't use nested forms in the first place, I consider them an advanc

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-20 Thread Martin Grigorov
OK. I see what happens. At org.apache.wicket.markup.html.form.Form#onFormSubmitted(org.apache.wicket.markup.html.form.IFormSubmitter) Wicket calls #inputChanged() for the root form, so this calls #inputChanged() on *all* FormComponents (including nested ones). My first reaction is: this is a bug!

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-20 Thread Patrick Davids
Hi Martin, this is true for my DropDownChoice2. But DropDownChoice1 does not get validated. So, this could be the reason why it is not cleared. Now... I'm getting more and more confused... *lol* Page Form A DropDownChoice1 displaying selected 'Car 1' Form

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-20 Thread Martin Grigorov
Hi, On Fri, Nov 20, 2015 at 3:22 PM, Patrick Davids < patrick.dav...@nubologic.com> wrote: > Hi Sven, > > using clearInput() works. > I call it in onConfigure() of my DropDownChoice. > > Ok, so far... but I'm still confused about the raw-input-handling. > > Ususally, (and thats what I have in min

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-20 Thread Patrick Davids
Hi Sven, using clearInput() works. I call it in onConfigure() of my DropDownChoice. Ok, so far... but I'm still confused about the raw-input-handling. Ususally, (and thats what I have in mind): components reflect the current model objects state. Whats the reason saving the raw-input and dete

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-19 Thread Patrick Davids
Hi Sven > so you have two components using the same model? Interesting. I didn't mentioned the details in my previous mail to reduce the description of the case. Yes, its a shared model, because Form B is contained in a dialog. And Form A comes from the Wizard (internal / needed for step trans

Re: Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-19 Thread Sven Meier
Hi Patrick, so you have two components using the same model? Interesting. Easiest solution would be to clear the rawInput on DropDownChoice1: choice1.clearInput(); If you don't have access to the dropDown from your submitting code, you might use component events to signal the car selection:

Quetsion to nesting Forms and reflecting states of FormComponents after ajax refreshs

2015-11-19 Thread Patrick Davids
Hi Wicket Pros, I have a quite special case here and a question concerning nested form submits and FormComponent/Raw-Input Handling. This is my component tree: Page Form A DropDownChoice1 displaying selected 'Car 1' Form B DropDo