Sorry no, only have this pseudo alike code, real code involves too much logic to use as a simple example.

 

                                                                

                     

                      checkbox        cb_HeleLandet.add(new AjaxFormComponentUpdatingBehavior("onclick") {

                                                                 protected void onUpdate(AjaxRequestTarget target) {

                                                                                       //blabla

 

                                                                 }

                                            });

 

                                            cb_HeleLandet.setOutputMarkupId(true);

cb_HeleLandet.setVisible(false);

                                            form.add(cb_HeleLandet);

                      If you were to add a panel which included the same as above

Etc form.add(myPanel)

 

checkPanel myPanel() extends panel

public checkpanel

{

                      checkbox        cb_HeleLandet.add(new AjaxFormComponentUpdatingBehavior("onclick") {

                                                                 protected void onUpdate(AjaxRequestTarget target) {

                                                                                       //blabla

 

                                                                 }

                                            });

 

                                            cb_HeleLandet.setOutputMarkupId(true);

add(cb_helelandet);

 

}

 

Johan-->If a component is not visible (wherever they are) will not render anything.

Yeah that’s the meaning of the setvisible(false);) I was merely being sarcastic.

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johan Compagner
Sent: 20. juli 2006 16:59
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] wicket.markup.html.form.checkbox/ajaxformbehaviour/set visible(false) -- BUG?

 

If a component is not visible (wherever they are) will not render anything.
But they shouldn't stop other behaviours that are still visible to render the right contributions.

Do you have a testcase?

johan
 

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

Hi I think I might have discovered a bug.

 

I had a checkbox with some ajax behaviour. On the same page I also had a panel which had some form components in it, one of the components did also use ajax.

 

I set visible(false) on the checkbox and 3 things happened

1.       checkbox was no longer rendered(surpriseJ )

2.       wicket debug for ajax was no longer rendered

3.       ajax behaviour on the other component stopped working

 

So I removed ajaxbehavior on the checkbox then it all worked again. My guess is that somewhere there is a check on if a component that uses ajax behaviour that is set to not visible then ajax is not included on the page….

 

Regards Nino


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to