Hi,

The dialog display on dbclick because we bind the event on it :
"MouseEvent.DBLCLICK"

If you want to display on a simple click, use MouseEvent.CLICK

Regards

Julien Roche


On Tue, Mar 30, 2010 at 4:29 PM, Cemal Bayramoglu <
jweekend_for...@cabouge.com> wrote:

> David,
>
> Adding the component instantiation listener is more flexible than
> extending WiQueryWebApplication.
>
> Regards - Cemal
> jWeekend
> OO & Java Technologies, Wicket
> Consulting, Development, Training
> http://jWeekend.com
>
>
> On 30 March 2010 15:18, David Chang <david_q_zh...@yahoo.com> wrote:
> > Julien,
> >
> > Thanks for your reply and it works now. Strangely, I copied the example
> on that page, which does not ask me to extend WiQueryWebApplication.
> >
> > Something wrong with that Hello World example?
> >
> > Two quick questions:
> >
> > 1. My environment is JDK 1.6 and Wicket 1.4.7. WiQuery 1.0 should have no
> problem with it. Correct?
> >
> > 2. Why the example requires double-click?
> >
> > Regards.
> >
> > -David
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --- On Tue, 3/30/10, julien roche AKA indiana_jules <roche....@gmail.com>
> wrote:
> >
> >> From: julien roche AKA indiana_jules <roche....@gmail.com>
> >> Subject: Re: My first WiQuery app does not work
> >> To: users@wicket.apache.org
> >> Date: Tuesday, March 30, 2010, 8:02 AM
> >> Hi,
> >>
> >> Have you enable wiquery in your Wicket application ? This
> >> link is an
> >> implementation of the WebApplication with the linked with
> >> Wiquery:
> >>
> http://code.google.com/p/wiquery/source/browse/branches/1.0.1/src/main/java/org/odlabs/wiquery/utils/WiQueryWebApplication.java
> >>
> >> Hope that helped you
> >>
> >> Julien Roche
> >>
> >>
> >> On Tue, Mar 30, 2010 at 1:56 PM, David Chang <david_q_zh...@yahoo.com
> >wrote:
> >>
> >> > Here is what I have: JDK 1.6, Wicket 1.4.7, WiQuery
> >> 1.0, Tomcat 6.0.24
> >> >
> >> > I downloaded wiquery and put its jar on the
> >> classpath.
> >> >
> >> > I copied the Hello World sample from
> >> > http://code.google.com/p/wiquery/wiki/QuickStart
> >> >
> >> > Here is my code:
> >> >
> >> > HTML:-----------------------------
> >> >
> >> > <html>
> >> >    <head>
> >> >        <title>WiQuery
> >> Quickstart Archetype Homepage</title>
> >> >    </head>
> >> >    <body>
> >> >        <button
> >> wicket:id="open-dialog">Open dialog !</button>
> >> >
> >> >        <p
> >> wicket:id="dialog">
> >> >
> >> Hello world, yes we can !
> >> >        </p>
> >> >    </body>
> >> > </html>
> >> >
> >> > Java:--------------------------------
> >> >
> >> > import org.apache.wicket.markup.html.WebPage;
> >> > import org.apache.wicket.markup.html.form.Button;
> >> >
> >> > import org.odlabs.wiquery.core.events.Event;
> >> > import org.odlabs.wiquery.core.events.MouseEvent;
> >> > import
> >> org.odlabs.wiquery.core.events.WiQueryEventBehavior;
> >> > import org.odlabs.wiquery.core.javascript.JsScope;
> >> > import org.odlabs.wiquery.ui.dialog.Dialog;
> >> >
> >> > public class WiqueryDialog extends WebPage {
> >> >
> >> >    public WiqueryDialog() {
> >> >
> >> >        final Dialog dialog = new
> >> Dialog("dialog");
> >> >        add(dialog);
> >> >
> >> >        Button button = new
> >> Button("open-dialog");
> >> >        button.add(new
> >> WiQueryEventBehavior(new Event(MouseEvent.DBLCLICK) {
> >> >
> >> >            @Override
> >> >            public
> >> JsScope callback() {
> >> >
> >> return JsScope.quickScope(dialog.open().render());
> >> >            }
> >> >
> >> >        }));
> >> >        add(button);
> >> >
> >> >    }
> >> > }
> >> >
> >> > ------------------------------
> >> >
> >> > I did not get any compiler error and I can run the
> >> wicket app and see the
> >> > html in the browser. However, I did not get any
> >> respone when clicking the
> >> > button.
> >> >
> >> >
> >> > What I did is wrong?
> >> >
> >> >
> >> > Thanks.
> >> >
> >> >
> >> > -------------- here is generated html
> >> ------------------
> >> >
> >> > <html>
> >> >    <head>
> >> >        <title>WiQuery
> >> Quickstart Archetype Homepage</title>
> >> >    <script type="text/javascript"
> >> >
> >>
> src="resources/org.odlabs.wiquery.core.commons.CoreJavaScriptResourceReference/jquery/jquery-1.3.2.js"></script>
> >> > <script type="text/javascript"
> >> >
> >>
> src="resources/org.odlabs.wiquery.core.commons.WiqueryGeneratedJavaScriptResourceReference/1269950176687wiquery-gen.js"></script>
> >> > </head>
> >> >    <body>
> >> >        <button
> >> name="open-dialog" id="open_dialog1">Open dialog
> >> !</button>
> >> >
> >> >        <p id="dialog2">
> >> >
> >> Hello world, yes we can !
> >> >        </p>
> >> >    </body>
> >> > </html>
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> >
> >> >
> >>
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to