that should have worked... btw why not just button.setEnabled(false) ? On Thu, Sep 13, 2012 at 9:11 PM, Anna Simbirtsev <[email protected]> wrote: > I am using wicket 1.4.3 > and changing to the code you mentioned below, does not work as well:( > > Thanks > > On Wed, Sep 12, 2012 at 11:42 AM, Sébastien Gautrin <[email protected] >> wrote: > >> Which wicket version ? (I ask because I see you are using several calls >> that are deprecated in 1.5). >> Besides, within the declaration of your inner class, don't try to access >> the variable you are defining >> (and without declaring it final, it should normally not compile anyway). >> >> Not changing the deprecated calls, this should probably look like : >> >> add(new SimpleAttributeModifier("**disabled", "disabled")); >> target.addComponent(this); >> >> -------- Original Message -------- >> *Subject: *disabling ajax submit button >> *From: *Anna Simbirtsev <[email protected]> >> *To: *[email protected] >> *Date: *2012-09-12 >> >> Hi >>> >>> I am trying to disable ajax submit button after it has been clicked. >>> >>> AjaxSubmitLink submitButton1 = new AjaxSubmitLink("submitButton1"**) { >>> >>> private static final long serialVersionUID = 1L; >>> >>> >>> protected void onSubmit(AjaxRequestTarget target, final >>> Form<?> >>> form) >>> { >>> submitButton1.add( >>> new SimpleAttributeModifier("**disabled", >>> "disabled")); >>> >>> target.addComponent(**submitButton1); >>> } >>> >>> >>> This does not work.:( >>> >>> >>
-- regards, Vineet Semwal --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
