You are welcome... On Tue, Dec 9, 2008 at 1:35 PM, itayh <[EMAIL PROTECTED]> wrote:
> > Thanks a lot Ernesto, It works > > reiern70 wrote: > > > > Sorry, sent to early... > > Maybe something like? > > CheckBox externalUploadCheckBox = new AjaxCheckBox("external",new > > PropertyModel(this, "externalUpload")){ > > @Override > > protected void onUpdate(AjaxRequestTarget > > arg0) { > > > > externalXapUrlField.setEnabled(true/false); > > if(arg0 != null) { > > > > arg0.addComponent(externalXapUrlField); > > } > > } > > }; > > > > For this to work externalXapUrlField will have be a variable (so that you > > can refer back to it) and > > have externalXapUrlField.setOutputMarkupId(true)... > > > > Ernesto > > > > > >> On Tue, Dec 9, 2008 at 10:31 AM, itayh <[EMAIL PROTECTED]> wrote: > >> > >>> > >>> Hi, > >>> > >>> I have AjaxCheckBox. I want to be able to set other components to be > >>> disable > >>> or enable when the use check or unckeck the AjaxCheckBox. > >>> In my javacode: > >>> > >>> Several text fields in the next format: > >>> TextField externalXapUrlField = new TextField("externalXapUrl"); > >>> add(externalXapUrlField, new PropertyModel(this, "externalXapUrl")); > >>> > >>> The check box: > >>> CheckBox externalUploadCheckBox = new AjaxCheckBox("external",new > >>> PropertyModel(this, "externalUpload")){ > >>> @Override > >>> protected void > onUpdate(AjaxRequestTarget > >>> arg0) { > >>> > >> > >> > >> > >>> > >>> } > >>> }; > >>> add(externalUploadCheckBox); > >>> > >>> I want to set the text box fields to be editable or disable according > >>> the > >>> check box, Any Idea? > >>> > >>> Thanks in advance > >>> > >>> -- > >>> View this message in context: > >>> > http://www.nabble.com/Disabling-and-enabling-components-using-AjaxCheckBox-tp20911338p20911338.html > >>> Sent from the Wicket - User mailing list archive at Nabble.com. > >>> > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Disabling-and-enabling-components-using-AjaxCheckBox-tp20911338p20913865.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >