On Thu, Apr 28, 2011 at 11:17 AM, easydoor958 <[email protected]
> wrote:

> When i put in a search form an ActionButton which allows user to clear
> values in
> the fields to reset criterias.
> I put this code
> ActionButton clearButton = new ActionButton("Effacer les critères", this,
> "onClear");
> ...
>    public boolean onClear() {
>        formSearch.clearValues();
>        return true;
>    }
> and when i click on the button, nothing happens
>
> I change ActionButton by an ActionLink and it works well ! Why ?
>
> Taking the note from here:
http://click.apache.org/docs/click-api/org/apache/click/control/ActionButton.html
<quote>
Please Note do not add ActionButton instances to the Form object, as the GET
request it generates will never be processed by the Form, and in turn the
Form will not invoke the ActionButton's onProcess() method.
</quote>

So, you need do this: addControl(clearButton);

Hth,

Gilberto

Reply via email to