Components can be accessed only in event listeners

asked 2017-02-13 07:10:47 +0800

suman4545 gravatar image suman4545

Hi i am using zk spring.And using zk 8 jars for development . public String add( @ModelAttribute("todoList") ListModelList<todo> todoList, @ZKSelector("#message") String message) { System.out.println("hi add"); todoList.add(new Todo("Wakeup earlyasasas")); return "forward:list"; }

I am getting error in todoList.add() method . It is showing Components can be accessed only in event listeners. for information i m not using any listener class.it is spring controller class.and the method is add().

By debug i have seen there is data in todoList which i added from another function.Here i just want to access the todolist again and add new data.

But getting Components can be accessed only in event listeners this error

delete flag offensive retag edit


Any help plz

suman4545 ( 2017-02-13 07:51:07 +0800 )edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2017-02-13 07:10:47 +0800

Seen: 14 times

Last updated: Feb 13 '17

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More