Revision history [back]

click to hide/show revision 1
initial version

answered 2010-09-29 21:11:25 +0800

TonyQ gravatar image TonyQ

https://www.masterbranch....

of course you do. :)

you have two event binding way to go .

one is for cast to InputEvent , it's more convinent .

    public void onItemChange(InputEvent event) {  //<-- notices that here we declare InputEvent  , zk will auto casting
        Textbox textbox = (Textbox) event.getTarget();
        //textbox.getParent()  cell
        //textbox.getParent().getParent(); //row
    }

The second one is tradition way , go throught ForwareEvent.

    public void onItemChange(ForwardEvent event) {   //<-- notices that here we declare ForwardEvent ,  the event go though forward is default to this event.
        @SuppressWarnings("unused")
        final Rows rows = gridEmployees.getRows();

        InputEvent inputevent = (InputEvent) event.getOrigin();      // get original event here 
        Textbox textbox = (Textbox) inputevent.getTarget();               
        //textbox.getParent()  cell
        //textbox.getParent().getParent(); //row

    }

some forum tips , using [ code ] [ /code ] to your code will be better. :D

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More