Re: [Wicket-user] wicket.markup.html.form.CheckBoxvswicket.ajax.form.AjaxFormComponentUpdatingBehavior= not working?

2006-07-17 Thread Nino Wael
Yup that fixed it, thanks...

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eelco Hillenius
Sent: 14. juli 2006 15:38
To: wicket-user@lists.sourceforge.net
Subject: Re: 
[Wicket-user]wicket.markup.html.form.CheckBoxvswicket.ajax.form.AjaxFormComponentUpdatingBehavior=
 not working?

I think you need to use AjaxFormComponentUpdatingBehavior so that your
model will automatically updated.

Eelco



On 7/14/06, Nino Wael <[EMAIL PROTECTED]> wrote:
>
>
>
> Ok, np just switched back to checkbox and wrote this:
>
>
>
>
> cb_HeleLandet.add(new AjaxEventBehavior("onclick") {
>
>
>  protected void onEvent(AjaxRequestTarget target) {
>
>
>
> myForm_sammen.setDisabled(reportModel.getHeleLandet());
>
>
>
> target.addComponent(myForm_sammen);
>
>
>  }
>
> });
>
>
>
> Which almost works as wanted. When are the backing model for my checkbox
> updated?  It seems it's not updated preajax call, nor postajax? Do I need a
> true submit of the form to update the backing model?
>
>
>
>
>
> Since I need to disabled another component based on when the checkbox are
> checked or not.
>
>
>
> Regards Nino
>
>
> 
>
>
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Igor Vaynberg
> Sent: 14. juli 2006 09:26
>
> To: wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user]
> wicket.markup.html.form.CheckBoxvswicket.ajax.form.AjaxFormComponentUpdatingBehavior
> = not working?
>
>
> To: wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user]
> wicket.markup.html.form.CheckBoxvswicket.ajax.form.AjaxFormComponentUpdatingBehavior
> = not working?
>
>
>
>
>
> oops, i thought i fixed that (onchange->onclick) before 1.2 final, but i
> guess not. until 1.2.1 comes out you are prob then better off using what you
> have now, or use 1.2 from svn
>
> -Igor
>
>
>
> On 7/13/06, Nino Wael <[EMAIL PROTECTED]> wrote:
>
>
>
> I switched to the AjaxCheckBox, but my markup still says:
>
>
>
>  onchange="var
> wcall=wicketAjaxPost('/jobindsats/app?wicket:interface=:2:databank_form:hele_landet::IBehaviorListener&wicket:behaviorId=1',
> wicketSerialize(this), function() { }, function() { });"
> id="databank_form_hele_landet">
>
>
>
>
> Wicket java:
>
> cb_HeleLandet =
> new AjaxCheckBox("hele_landet", new PropertyModel(
>
>
>reportModel, "heleLandet")) {
>
>
>
>  protected void onUpdate(AjaxRequestTarget target) {
>
>
>
> myForm_sammen.setEnabled(reportModel.getHeleLandet());
>
>
>
> target.addComponent(myForm_sammen);
>
>
>
>
>  }
>
>
>
>
> };
>
>
>
> How do I specify to call the ajax onclick? As you wrote the ajax is now
> called onchange wich indeed are delayed until blur occurs.
>
>
>
> Regards Nino
> 
>
>
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] ] On
> Behalf Of Igor Vaynberg
> Sent: 13. juli 2006 18:17
>
>
>
> To: wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user] wicket.markup.html.form.CheckBox
> vswicket.ajax.form.AjaxFormComponentUpdatingBehavior = not
> working?
>
>
>
>
> also onchange on the checkboxes is delayed until the onblur event so you are
> better off using onclick, and there is of course a
> wicket.ajax.markup.html.form.AjaxCheckBox ready for you as
> well
>
> -Igor
>
>
> On 7/13/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
>
>
> Did you do myForm_sammen.setOutputMarkupId(true) in your
> page constructor?
>
> Martijn
>
>
> On 7/13/06, Nino Wael <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > Im currently working on a checkbox that needs to do some stuff on a
> onchange request.
> >
> > However it looks as the AJAX call never is made, I have other ajax calls
> on the page that works just fine (also using the onchange modifier)
> >
> >
> > When looking at the below code it should work fine it seems to me but it
> dosent:
> >
> > Wicket javaCode:
> >
> > cb_HeleLandet = new CheckBox("hele_landet", new
> PropertyModel(
> > reportModel,
> "heleLandet"));
> > cb_HeleLandet.setOutputMarkupId(true);
> > cb_HeleLandet.add(new
&

Re: [Wicket-user] wicket.markup.html.form.CheckBoxvswicket.ajax.form.AjaxFormComponentUpdatingBehavior = not working?

2006-07-14 Thread Eelco Hillenius
I think you need to use AjaxFormComponentUpdatingBehavior so that your
model will automatically updated.

Eelco



On 7/14/06, Nino Wael <[EMAIL PROTECTED]> wrote:
>
>
>
> Ok, np just switched back to checkbox and wrote this:
>
>
>
>
> cb_HeleLandet.add(new AjaxEventBehavior("onclick") {
>
>
>  protected void onEvent(AjaxRequestTarget target) {
>
>
>
> myForm_sammen.setDisabled(reportModel.getHeleLandet());
>
>
>
> target.addComponent(myForm_sammen);
>
>
>  }
>
> });
>
>
>
> Which almost works as wanted. When are the backing model for my checkbox
> updated?  It seems it's not updated preajax call, nor postajax? Do I need a
> true submit of the form to update the backing model?
>
>
>
>
>
> Since I need to disabled another component based on when the checkbox are
> checked or not.
>
>
>
> Regards Nino
>
>
> 
>
>
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Igor Vaynberg
> Sent: 14. juli 2006 09:26
>
> To: wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user]
> wicket.markup.html.form.CheckBoxvswicket.ajax.form.AjaxFormComponentUpdatingBehavior
> = not working?
>
>
> To: wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user]
> wicket.markup.html.form.CheckBoxvswicket.ajax.form.AjaxFormComponentUpdatingBehavior
> = not working?
>
>
>
>
>
> oops, i thought i fixed that (onchange->onclick) before 1.2 final, but i
> guess not. until 1.2.1 comes out you are prob then better off using what you
> have now, or use 1.2 from svn
>
> -Igor
>
>
>
> On 7/13/06, Nino Wael <[EMAIL PROTECTED]> wrote:
>
>
>
> I switched to the AjaxCheckBox, but my markup still says:
>
>
>
>  onchange="var
> wcall=wicketAjaxPost('/jobindsats/app?wicket:interface=:2:databank_form:hele_landet::IBehaviorListener&wicket:behaviorId=1',
> wicketSerialize(this), function() { }, function() { });"
> id="databank_form_hele_landet">
>
>
>
>
> Wicket java:
>
> cb_HeleLandet =
> new AjaxCheckBox("hele_landet", new PropertyModel(
>
>
>reportModel, "heleLandet")) {
>
>
>
>  protected void onUpdate(AjaxRequestTarget target) {
>
>
>
> myForm_sammen.setEnabled(reportModel.getHeleLandet());
>
>
>
> target.addComponent(myForm_sammen);
>
>
>
>
>  }
>
>
>
>
> };
>
>
>
> How do I specify to call the ajax onclick? As you wrote the ajax is now
> called onchange wich indeed are delayed until blur occurs.
>
>
>
> Regards Nino
> 
>
>
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] ] On
> Behalf Of Igor Vaynberg
> Sent: 13. juli 2006 18:17
>
>
>
> To: wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user] wicket.markup.html.form.CheckBox
> vswicket.ajax.form.AjaxFormComponentUpdatingBehavior = not
> working?
>
>
>
>
> also onchange on the checkboxes is delayed until the onblur event so you are
> better off using onclick, and there is of course a
> wicket.ajax.markup.html.form.AjaxCheckBox ready for you as
> well
>
> -Igor
>
>
> On 7/13/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
>
>
> Did you do myForm_sammen.setOutputMarkupId(true) in your
> page constructor?
>
> Martijn
>
>
> On 7/13/06, Nino Wael <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > Im currently working on a checkbox that needs to do some stuff on a
> onchange request.
> >
> > However it looks as the AJAX call never is made, I have other ajax calls
> on the page that works just fine (also using the onchange modifier)
> >
> >
> > When looking at the below code it should work fine it seems to me but it
> dosent:
> >
> > Wicket javaCode:
> >
> > cb_HeleLandet = new CheckBox("hele_landet", new
> PropertyModel(
> > reportModel,
> "heleLandet"));
> > cb_HeleLandet.setOutputMarkupId(true);
> > cb_HeleLandet.add(new
> AjaxFormComponentUpdatingBehavior("onchange") {
> > protected void onUpdate(AjaxRequestTarget target)
> {
> >
> myForm_sammen.setEnabled(reportModel.getHeleLandet());
> > target.addComponent
> (myForm_sammen);
> >
> >   

Re: [Wicket-user] wicket.markup.html.form.CheckBoxvswicket.ajax.form.AjaxFormComponentUpdatingBehavior = not working?

2006-07-14 Thread Nino Wael








Ok, np just switched back
to checkbox and wrote this:

 

    cb_HeleLandet.add(new
AjaxEventBehavior("onclick") {

 protected
void onEvent(AjaxRequestTarget target) {

   myForm_sammen.setDisabled(reportModel.getHeleLandet());

   target.addComponent(myForm_sammen);

 }

    });

 

Which almost works as
wanted. When are the backing model for my checkbox updated?  It seems it’s
not updated preajax call, nor postajax? Do I need a true submit of the form to
update the backing model?

 

 

Since I need to disabled
another component based on when the checkbox are checked or not.

 

Regards Nino

 









From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg
Sent: 14. juli 2006 09:26
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
wicket.markup.html.form.CheckBoxvswicket.ajax.form.AjaxFormComponentUpdatingBehavior
= not working?



 

oops, i thought i fixed
that (onchange->onclick) before 1.2 final, but i guess not. until 1.2.1
comes out you are prob then better off using what you have now, or use 1.2 from
svn

-Igor





On 7/13/06, Nino
Wael <[EMAIL PROTECTED]>
wrote:







I switched to the AjaxCheckBox, but my markup
still says:

 



 





Wicket java:

   
cb_HeleLandet = new AjaxCheckBox("hele_landet", new PropertyModel(

  
reportModel, "heleLandet")) {






protected void onUpdate(AjaxRequestTarget target) {

  
myForm_sammen.setEnabled(reportModel.getHeleLandet());

  
target.addComponent(myForm_sammen);

 


}

 





   
};

 

How do I specify to call the ajax onclick? As you wrote the ajax is now called
onchange wich indeed are delayed until blur occurs.

 

Regards Nino









From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
] On Behalf Of Igor Vaynberg
Sent: 13. juli 2006 18:17






To: wicket-user@lists.sourceforge.net
Subject: Re:
[Wicket-user] wicket.markup.html.form.CheckBox
vswicket.ajax.form.AjaxFormComponentUpdatingBehavior = not working?



 





also onchange on the checkboxes is delayed until the
onblur event so you are better off using onclick, and there is of course a
wicket.ajax.markup.html.form.AjaxCheckBox ready for you as well

-Igor







On
7/13/06, Martijn Dashorst <[EMAIL PROTECTED]>
wrote:





Did you
do myForm_sammen.setOutputMarkupId(true) in your page constructor?

Martijn


On 7/13/06, Nino Wael <[EMAIL PROTECTED]> wrote:
> Hi
> 
> Im currently working on a checkbox that needs to do some stuff on a
onchange request.
>
> However it looks as the AJAX call never is made, I have other ajax calls
on the page that works just fine (also using the onchange modifier) 
>
>
> When looking at the below code it should work fine it seems to me but it
dosent:
>
> Wicket javaCode:
>
>
cb_HeleLandet = new CheckBox("hele_landet", new PropertyModel( 
>
reportModel, "heleLandet"));
>
cb_HeleLandet.setOutputMarkupId(true);
>
cb_HeleLandet.add(new AjaxFormComponentUpdatingBehavior("onchange") {

>
protected void onUpdate(AjaxRequestTarget target) {
>
myForm_sammen.setEnabled(reportModel.getHeleLandet());
>
target.addComponent (myForm_sammen);
>
>
}
>
});
>
> Wicket html code:
>
 
>
> Wicket html when output from server:
>
> 
> <script
type="text/_javascript_"><!--//--><![CDATA[//><!--<br>
> wicketAjaxDebugEnable=true;<br>
> //--><!]]>
>
> 
>