Can WICKET-2150 please be fixed in 1.5-SNAPSHOT

2010-01-15 Thread Dave Schoorl

Hi guys,

Can someone of the committers please implement the fix to Wicket-2150 in 
the trunk. It was postponed from 1.4 to 1.5 and I really need this, but 
it is not yet in the 1.5 codebase (as far as I can see). The code that 
needs to be changed is the delegateSubmit-method in the Form and it 
should read something like this:



   protected void delegateSubmit(IFormSubmittingComponent 
submittingComponent)

   {
   /* WICKET-2150: execute the onSubmit's from most general to most 
specific */


   // when the given submitting component is not null, it means 
that it was the

   // submitting component
   Form? formToProcess = this;
   if (submittingComponent != null)
   {
   // use the form which the submittingComponent has submitted 
for further processing

   formToProcess = submittingComponent.getForm();
   }

   // Model was successfully updated with valid data
   formToProcess.onSubmit();

   // call onSubmit on nested forms
   formToProcess.visitChildren(Form.class, new IVisitorForm?()
   {
   public Object component(Form? component)
   {
   Form? form = component;
   if (form.isEnabledInHierarchy()  
form.isVisibleInHierarchy())

   {
   form.onSubmit();
   return IVisitor.CONTINUE_TRAVERSAL;
   }
   return IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
   }
   });

   // most specific
   if (submittingComponent != null)
   {
   submittingComponent.onSubmit();
   }
   }


Thanks very much,

Dave




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Can WICKET-2150 please be fixed in 1.5-SNAPSHOT

2010-01-15 Thread Martin Grigorov
How the fix in 1.5-SNAPSHOT will help you ?
Currently 1.5-SNAPSHOT is not even buildable (at least the tests), so it
is not quite ready for use.

On Fri, 2010-01-15 at 09:07 +0100, Dave Schoorl wrote:
 Hi guys,
 
 Can someone of the committers please implement the fix to Wicket-2150 in 
 the trunk. It was postponed from 1.4 to 1.5 and I really need this, but 
 it is not yet in the 1.5 codebase (as far as I can see). The code that 
 needs to be changed is the delegateSubmit-method in the Form and it 
 should read something like this:
 
 
 protected void delegateSubmit(IFormSubmittingComponent 
 submittingComponent)
 {
 /* WICKET-2150: execute the onSubmit's from most general to most 
 specific */
 
 // when the given submitting component is not null, it means 
 that it was the
 // submitting component
 Form? formToProcess = this;
 if (submittingComponent != null)
 {
 // use the form which the submittingComponent has submitted 
 for further processing
 formToProcess = submittingComponent.getForm();
 }
 
 // Model was successfully updated with valid data
 formToProcess.onSubmit();
 
 // call onSubmit on nested forms
 formToProcess.visitChildren(Form.class, new IVisitorForm?()
 {
 public Object component(Form? component)
 {
 Form? form = component;
 if (form.isEnabledInHierarchy()  
 form.isVisibleInHierarchy())
 {
 form.onSubmit();
 return IVisitor.CONTINUE_TRAVERSAL;
 }
 return IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
 }
 });
 
 // most specific
 if (submittingComponent != null)
 {
 submittingComponent.onSubmit();
 }
 }
 
 
 Thanks very much,
 
 Dave
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Can WICKET-2150 please be fixed in 1.5-SNAPSHOT

2010-01-15 Thread Dave Schoorl
I don't know about the tests, but in the snapshot repository there are 
1.5-SNAPSHOT binaries. My application is not yet in production, so I 
(think I) can manage the rough edges of working with a development 
release. On top of that, I want to make sure it is in 1.5.


What would be a reason not to put it in the trunk yet?


Martin Grigorov wrote:

How the fix in 1.5-SNAPSHOT will help you ?
Currently 1.5-SNAPSHOT is not even buildable (at least the tests), so it
is not quite ready for use.

On Fri, 2010-01-15 at 09:07 +0100, Dave Schoorl wrote:
  

Hi guys,

Can someone of the committers please implement the fix to Wicket-2150 in 
the trunk. It was postponed from 1.4 to 1.5 and I really need this, but 
it is not yet in the 1.5 codebase (as far as I can see). The code that 
needs to be changed is the delegateSubmit-method in the Form and it 
should read something like this:



protected void delegateSubmit(IFormSubmittingComponent 
submittingComponent)

{
/* WICKET-2150: execute the onSubmit's from most general to most 
specific */


// when the given submitting component is not null, it means 
that it was the

// submitting component
Form? formToProcess = this;
if (submittingComponent != null)
{
// use the form which the submittingComponent has submitted 
for further processing

formToProcess = submittingComponent.getForm();
}

// Model was successfully updated with valid data
formToProcess.onSubmit();

// call onSubmit on nested forms
formToProcess.visitChildren(Form.class, new IVisitorForm?()
{
public Object component(Form? component)
{
Form? form = component;
if (form.isEnabledInHierarchy()  
form.isVisibleInHierarchy())

{
form.onSubmit();
return IVisitor.CONTINUE_TRAVERSAL;
}
return IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
}
});

// most specific
if (submittingComponent != null)
{
submittingComponent.onSubmit();
}
}


Thanks very much,

Dave




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org