You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by David Chang <da...@yahoo.com> on 2010/03/30 13:56:36 UTC

My first WiQuery app does not work

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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


jWicket 0.5.7

Posted by Stefan Lindner <li...@visionet.de>.
jWicket 0.5.7 is comitted to wicktstuff core's trunk. It shows an
implementation of a simple drop down menu. The menu uses jQuery only for
IE6 issues. Take a look at the example TestPage.
As always: if someone needs jar files... let me know.
Teh jQuery-ui-menu implemenatiion is in a very early stats. It's not
even worth looking at it, so please don't report any issues for it.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: About WiQueryWebApplication

Posted by Jeremy Thomerson <je...@wickettraining.com>.
This thread should have been on the wiQuery list.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Mar 30, 2010 at 2:12 PM, David Chang <da...@yahoo.com>wrote:

> IMHO, I am not quite sure this class (another indirection) is really
> necessary. All this class does is having a member variable:
>
> private WiQueryInstantiationListener wiqueryPluginInstantiationListener;
>
> and insert the following two lines into init().
>
> wiqueryPluginInstantiationListener = new WiQueryInstantiationListener();
> addComponentInstantiationListener(wiqueryPluginInstantiationListener);
>
>
> If this class is really necessary in terms of design, then we could have a
> similar request for another class just for Spring Annotation to work. This
> list may go on and on.
>
> It may feel more beautiful to have ALL your wicket applications simply
> extend WicketApplication.
>
> Just my 2 cents.
>
> All the best.
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: My first WiQuery app does not work

Posted by Edward Zarecor <ed...@indeterminate.org>.
Did you use component instantiation listener as suggested or just stop
extending WiQueryWebApplication?

Ed.

Typed by thumb....

On Mar 30, 2010 3:05 PM, "David Chang" <da...@yahoo.com> wrote:

Julie,

Thanks for asking. The code is in the beggining of this thread. For that, I
copied the Hello World example from wiquery site.

If I make my wicket application extend WiQueryWebApplication, then
everything is working fine.

Thanks, David



--- On Tue, 3/30/10, julien roche AKA indiana_jules <ro...@gmail.com>
wrote:

> From: julien r...
> Date: Tuesday, March 30, 2010, 2:50 PM

> Hi,
>
> That's really odd. Can we see your code ?
>
> Thanks
>
> Julien Roche
>
>
> On Tue, M...

About WiQueryWebApplication

Posted by David Chang <da...@yahoo.com>.
IMHO, I am not quite sure this class (another indirection) is really necessary. All this class does is having a member variable:

private WiQueryInstantiationListener wiqueryPluginInstantiationListener;

and insert the following two lines into init().

wiqueryPluginInstantiationListener = new WiQueryInstantiationListener(); 
addComponentInstantiationListener(wiqueryPluginInstantiationListener);  


If this class is really necessary in terms of design, then we could have a similar request for another class just for Spring Annotation to work. This list may go on and on.

It may feel more beautiful to have ALL your wicket applications simply extend WicketApplication.

Just my 2 cents.

All the best.




      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: My first WiQuery app does not work

Posted by David Chang <da...@yahoo.com>.
Julie, 

Thanks for asking. The code is in the beggining of this thread. For that, I copied the Hello World example from wiquery site.

If I make my wicket application extend WiQueryWebApplication, then everything is working fine.

Thanks, David


--- On Tue, 3/30/10, julien roche AKA indiana_jules <ro...@gmail.com> wrote:

> From: julien roche AKA indiana_jules <ro...@gmail.com>
> Subject: Re: My first WiQuery app does not work
> To: users@wicket.apache.org
> Date: Tuesday, March 30, 2010, 2:50 PM
> Hi,
> 
> That's really odd. Can we see your code ?
> 
> Thanks
> 
> Julien Roche
> 
> 
> On Tue, Mar 30, 2010 at 6:31 PM, David Chang <da...@yahoo.com>wrote:
> 
> > In my experiment, the app does not work without
> extending
> > WiQueryWebApplication.
> >
> > Is extending WiQueryWebApplication a must? The Hello
> World example does not
> > extend WiQueryWebApplication and I copied the example
> code but it does not
> > work.
> >
> > Best, David
> >
> > --- On Tue, 3/30/10, Cemal Bayramoglu <jW...@cabouge.com>
> wrote:
> >
> > > From: Cemal Bayramoglu <jW...@cabouge.com>
> > > Subject: Re: My first WiQuery app does not work
> > > To: "users" <us...@wicket.apache.org>
> > > Date: Tuesday, March 30, 2010, 10:29 AM
> > > 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 <da...@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
> > > <ro...@gmail.com>
> > > wrote:
> > > >
> > > >> From: julien roche AKA indiana_jules
> <ro...@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
> > > <da...@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-unsubscribe@wicket.apache.org
> > > >> > For additional commands, e-mail: users-help@wicket.apache.org
> > > >> >
> > > >> >
> > > >>
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> 


      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: My first WiQuery app does not work

Posted by julien roche AKA indiana_jules <ro...@gmail.com>.
Hi,

That's really odd. Can we see your code ?

Thanks

Julien Roche


On Tue, Mar 30, 2010 at 6:31 PM, David Chang <da...@yahoo.com>wrote:

> In my experiment, the app does not work without extending
> WiQueryWebApplication.
>
> Is extending WiQueryWebApplication a must? The Hello World example does not
> extend WiQueryWebApplication and I copied the example code but it does not
> work.
>
> Best, David
>
> --- On Tue, 3/30/10, Cemal Bayramoglu <jW...@cabouge.com> wrote:
>
> > From: Cemal Bayramoglu <jW...@cabouge.com>
> > Subject: Re: My first WiQuery app does not work
> > To: "users" <us...@wicket.apache.org>
> > Date: Tuesday, March 30, 2010, 10:29 AM
> > 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 <da...@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
> > <ro...@gmail.com>
> > wrote:
> > >
> > >> From: julien roche AKA indiana_jules <ro...@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
> > <da...@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-unsubscribe@wicket.apache.org
> > >> > For additional commands, e-mail: users-help@wicket.apache.org
> > >> >
> > >> >
> > >>
> > >
> > >
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: My first WiQuery app does not work

Posted by David Chang <da...@yahoo.com>.
Julien, thanks for reply. Silly me. I should have looked at the sample code. I was too excited seeing the first app works.

Best, David


--- On Tue, 3/30/10, julien roche AKA indiana_jules <ro...@gmail.com> wrote:

> From: julien roche AKA indiana_jules <ro...@gmail.com>
> Subject: Re: My first WiQuery app does not work
> To: users@wicket.apache.org
> Date: Tuesday, March 30, 2010, 11:41 AM
> 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_forums@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 <da...@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 <ro...@gmail.com>
> > wrote:
> > >
> > >> From: julien roche AKA indiana_jules <ro...@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_zhang@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-unsubscribe@wicket.apache.org
> > >> > For additional commands, e-mail: users-help@wicket.apache.org
> > >> >
> > >> >
> > >>
> > >
> > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> 


      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: My first WiQuery app does not work

Posted by julien roche AKA indiana_jules <ro...@gmail.com>.
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_forums@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 <da...@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 <ro...@gmail.com>
> wrote:
> >
> >> From: julien roche AKA indiana_jules <ro...@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_zhang@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-unsubscribe@wicket.apache.org
> >> > For additional commands, e-mail: users-help@wicket.apache.org
> >> >
> >> >
> >>
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: My first WiQuery app does not work

Posted by David Chang <da...@yahoo.com>.
In my experiment, the app does not work without extending WiQueryWebApplication.

Is extending WiQueryWebApplication a must? The Hello World example does not extend WiQueryWebApplication and I copied the example code but it does not work.

Best, David

--- On Tue, 3/30/10, Cemal Bayramoglu <jW...@cabouge.com> wrote:

> From: Cemal Bayramoglu <jW...@cabouge.com>
> Subject: Re: My first WiQuery app does not work
> To: "users" <us...@wicket.apache.org>
> Date: Tuesday, March 30, 2010, 10:29 AM
> 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 <da...@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
> <ro...@gmail.com>
> wrote:
> >
> >> From: julien roche AKA indiana_jules <ro...@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
> <da...@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-unsubscribe@wicket.apache.org
> >> > For additional commands, e-mail: users-help@wicket.apache.org
> >> >
> >> >
> >>
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 


      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: My first WiQuery app does not work

Posted by Cemal Bayramoglu <jW...@cabouge.com>.
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 <da...@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 <ro...@gmail.com> wrote:
>
>> From: julien roche AKA indiana_jules <ro...@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 <da...@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-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: My first WiQuery app does not work

Posted by David Chang <da...@yahoo.com>.
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 <ro...@gmail.com> wrote:

> From: julien roche AKA indiana_jules <ro...@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 <da...@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-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> 


      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: My first WiQuery app does not work

Posted by julien roche AKA indiana_jules <ro...@gmail.com>.
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 <da...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>