2 Replies Latest reply on May 15, 2009 5:24 PM by Iskandar Salim

    Wicket Jbpm

    Iskandar Salim Newbie


      I'm trying to port the seam todo example to Wicket. I've managed to insert task instances but how do I retrieve the task list like in the seam todo example? In the todo.jsp in the example, task lists are retrieved with the #{taskInstancePriorityList} variable. How do I do this in Wicket?

      What would be the correct scope for the injected TaskInstancePriorityList?

      Below is what I have. In this case, taskInstancePriorityList is always null.


      public class HomePage extends BasePage {
          Actor actor;
          @In(create = true)
          Login login;
          @In(required = false, scope = ScopeType.APPLICATION)
          TaskInstancePriorityList taskInstancePriorityList;
          @In(create = true)
          TodoList todoList;
          List<TaskInstance> taskInstances = new ArrayList<TaskInstance>();
          public HomePage() {
              if (taskInstancePriorityList != null) {
              ListView view = new ListView("taskInstances", new PropertyModel(this, "taskInstances")) {
                  protected void populateItem(ListItem item) {
                      TaskInstance taskInstance = (TaskInstance) item.getModelObject();
                      item.add(new Label("id", new Model(taskInstance.getId())));
              Form form = new Form("form") {
                  protected void onSubmit() {
                      ValueMap values = (ValueMap) getModelObject();
                      String description = values.getString("description");
              form.setModel(new CompoundPropertyModel(new ValueMap()));
              form.add(new TextField("description"));
          public List<TaskInstance> getTaskInstances() {
              return taskInstances;
          public void setTaskInstances(List<TaskInstance> taskInstances) {
              this.taskInstances = taskInstances;