So I can't get wiquery to work, and I'm not sure where to look for what is causing the problem.
This is my pom.xml:
<repository>
<id>wiquery</id>
<name>wiquery wicket components</name>
<url>http://wiquery.googlecode.com/svn/repo/</url>
</repository>
<dependency>
<groupId>org.odlabs.wiquery</groupId>
<artifactId>wiquery-core</artifactId>
<version>1.5.2</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.odlabs.wiquery</groupId>
<artifactId>wiquery-jquery-ui</artifactId>
<version>1.5.2</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket</artifactId>
</exclusion>
</exclusions>
</dependency>
Java:
DatePicker<Date> datePicker = new DatePicker<Date>("wiQueryPicker");
add(datePicker);
Html:
<input type="text" wicket:id="wiQueryPicker" />
The field appears, but no datepicker is shown when the field gets focus. This is the generated html:
<input type="text" id="wiQueryPickerf4" name="wiQueryPicker" value="" wicket:id="wiQueryPicker">
EDIT: In the generated markup, this script is included in the head tag:
<script type="text/javascript" id="wiquery-gen-1324041797627">
/*<![CDATA[*/
(function($) {
$(document).ready(function() {
$('#wiQueryPicker20c').datepicker({});
});
})(jQuery);
/*]]>*/
</script>
Any suggestions on what's causing the problem?
//Olle
In my 'main page' I had references to jquery in:
@Override
public void renderHead(final IHeaderResponse response) {
response.renderJavaScriptReference(new PackageResourceReference(EyesysMainPanel.class, "javascript/jquery-1.6.3.min.js"));
}
After removing that, wiquery worked properly.