Hi Andre

If I understand correctly you are redirecting from a page with a table to the 
page with the button?
Have you tried reading the id from the request in your onInit() method in 
EditRoteadorSnmp?
E.g.
        @Override
        public void onInit() {
                super.onInit();
            id = getContext().getRequest().getParameter("id"); 
      }

Regards
Stephan

-----Ursprüngliche Nachricht-----
Von: user-return-1480-stephan.kennedy=siemens-enterprise....@click.apache.org 
[mailto:user-return-1480-stephan.kennedy=siemens-enterprise....@click.apache.org]
 Im Auftrag von Andre Gustavo Lomonaco
Gesendet: Donnerstag, 12. August 2010 16:47
An: [email protected]
Betreff: Doubt in using ActionButton

Hi,

Using the Click Examples, I'm trying to put a ActionButton in a Edit Page 
but I cannot make work.. Here my doubt

After the user choose the correct row in the table, the user is redirect to 
the EditRoteadorSNMP Page

http://192.168.80.110:8080/NetworkAdvisor/edit/edit-roteador-snmp.htm?id=200&referrer=%2Ftable%2Froteador-table.htm

You can see the id is equal 200

The form in this page works nice and permit the user edit the row with id = 
200

I add in this same page, one ActionButton, not inside the Form...

My doubt is why I cannot get the id value after the user click this Action 
Button

Here the code

public class EditRoteadorSnmp extends BorderPage {

   private Form form = new Form("form");
   protected ActionButton button = new ActionButton("action");
  @Bindable protected Integer id;
.....

 public EditRoteadorSnmp() {

        addControl(form);
        addControl(button);
        button.setListener(this, "onButtonClick");
........

public boolean onButtonClick() {

        System.out.println(id);                ---- why I receive the NULL 
value here ------------------
}

Thanks in Advanced

My Best Regards

Andre Gustavo Lomonaco 




Reply via email to