I just tried this plugin for the first time and I got the example to run. But
as soon as I tried to do something as simple as loop through a list of
items, it all came unstuck (code below). It seems to me like the mismatch
between Wicket's use of anonymous inner classes and Groovy's lack of support
for them is a deal breaker. You either have to reduce your usage of Wicket
in Groovy code to preexisting Wicket components that were built in Java
(like the Label below), or you have to use a Groovy builder that emits Java
code, which then gets compiled. Am I missing something? I hope so, I'd love
to use GORM and Wicket together.
HomePage.groovy:
public class HelloPage extends WebPage
{
public HelloPage(final PageParameters parameters) {
add(new Label("message", "If you see this message wicket is properly
configured and running!"));
add(new Loop("repeat", Book.list( 10 )))
{
@Override
protected void populateItem(LoopItem item)
{
Book book = (Book) item.getModelObject();
item.setModel(new CompoundPropertyModel(book));
item.add(new Label("name"));
}
}
}
}
Julian
--
View this message in context:
http://www.nabble.com/New-Wicket-Grails-Plug-in-Available-%2B-about-the-Groovy-wicket-builder-tp15828796p18598173.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]