This is weird... If I do something like this taken from
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/ajax/AjaxEventBehavior.html

WebMarkupContainer div=new WebMarkupContainer("div");
         div.setOutputMarkupId(true);
         div.add(new AjaxEventBehavior("onclick") {
             protected void onEvent(AjaxRequestTarget target) {
                 System.out.println("ajax here!");
             }
         }

<div wicket:id="div>Click me</div>

it works fine. However, if I do something like this:

<div class="calendar-box" wicket:id="calendarBox">
                    <div class="calendar-date-label"></div>
                    <div class="calendar-day-label"></div>
                </div>

calendarBox.add(new AjaxEventBehavior("onclick") {
                @Override
                protected void onEvent(AjaxRequestTarget target) {              
     
                    System.out.println("ajax here!");
                }
            });
            calendarBox.add(new Label("monthYear", monthYear.format(date)));
            calendarBox.add(new Label("day", dayFormat.format(date)));

Then I get 

java.lang.ClassNotFoundException: undefined
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-make-a-div-containing-ajax-link-clickable-tp4530016p4530444.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to