Problem Handling events

3 messages Options
Embed this post
Permalink
abhihebbar

Problem Handling events

Reply Threaded More More options
Print post
Permalink
hi..

i'm a very new to wicket as well as wickext..

i want to make a modal dialog appear when something is clicked.

using jquery i'd do that like

$("#link").click(function(){
$("#dialog").dialog('open');
});

how can i do the same with wickext.

i've created an auto open dialog with wickext and it works fine..

i'm not able to integrate with the events....


Please help....
abhihebbar

Re: Problem Handling events

Reply Threaded More More options
Print post
Permalink
sorry.. that was too basic..
i fixed it..


JsQuery jsq=new JsQuery();
                jsq.$("#link").chain(new Event(MouseEvent.DBLCLICK){

                        @Override
                        public JsScope callback() {
                                return JsScope.quickScope(jsq.document().chain("css", "bgcolor: #ffff00;").render());
                        }
                       
                });
                jsq.contribute(this);

abhihebbar

Re: Problem Handling events

Reply Threaded More More options
Print post
Permalink
sorry wrong post

                Window win=new Window("dialog");
                jsq.$("#link").chain(new Event(MouseEvent.DBLCLICK){

                        @Override
                        public JsScope callback() {
                                return JsScope.quickScope(win.open().render());
                        }
                       
                });
                jsq.contribute(this);