Hi Casper,
Have you seen the reference library documentation on the main wiki:
http://cwiki.apache.org/WICKET/reference-library.html
Any one can create an account and then edit the wiki pages.
Mike
In "Wicket in Action" it's mentioned briefly how one could use a
SimpleAttributeModifier to limit the text length of an input, by binding to
a JPA @Column annotation and its length attribute. This sounds nice DRY to
me (albeit perhaps a bit expensive?!) so I gave it a try:
protected String getColumnLength(Class entityName, String fieldName){
try {
Field field = entityName.getDeclaredField(fieldName);
field.setAccessible(true);
return
String.valueOf(field.getAnnotation(Column.class).length());
} catch (Exception ex) {
return "";
}
}
Which got me thinking (after spending an hour figuring out I had to use
setAccessible) if there's an open FAQ/wiki for these kind of things? I have
not been able to find any except the locked down official confluence. Google
is nice, but as a newbie it would be nice to have a central place with lots
of micro-examples/snippets to get you going.
/Casper
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]