I’m building a Panel called TaskPanel that will display the contents of my
Task class. This simple Panel has a single constructor and a method, that
looks like this:
public class TaskPanel extends Panel {
Task task;
public TaskPanel(String id, final Task task) {
super(id);
public TaskPanel(String id, IModelTask task) {
super(id, task);
add(new Label(name,new propertymodel(task, name));
protected void onComponentTag(ComponentTag tag) {
if (getModel().getObject().isSelected()) {
// Do something
}
}
-igor
On Fri, Apr
[mailto:igor.vaynb...@gmail.com]
Sent: Friday, April 24, 2009 10:12 AM
To: users@wicket.apache.org
Subject: Re: Adding a model to a custom panel
public TaskPanel(String id, IModelTask task) {
super(id, task);
add(new Label(name,new propertymodel(task, name));
protected void onComponentTag
: Adding a model to a custom panel
public TaskPanel(String id, IModelTask task) {
super(id, task);
add(new Label(name,new propertymodel(task, name));
protected void onComponentTag(ComponentTag tag) {
if (getModel().getObject().isSelected()) {
// Do something