Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsf checkbox within repeat  RSS feed

 
Artur Memekh
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi! i have a problem with getting a value from checkbox. it is my files:

bean:





//method of deleting of news models by id


//news model


on page *.xhtml:




help...

at a debugger console:
Attaching to tomcat_shared_memory_id
Not able to submit breakpoint MethodBreakpoint [java.util.Map].put '(LK;LV;)LV;', reason: Method 'put' with signature '(LK;LV;)LV;' does not exist in class java.util.Map.

don't understand this message. Where is it from?
 
Tim Holloway
Bartender
Posts: 18705
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I almost never use ui:repeat. Nine times out of ten, an h:dataTable will do what I want, and overall, it's a more straightforward approach. For example, in the case in point, I'd make the entire ui snippet be a single form, setup a suitable DataModel to wrap "NewsAction.newsList" - which by the way is bad form. Don't capitalize the first letter in "NewsAction", since it's an instance ID, not a class name. In the model, I'd provide a column object that backed the checkbox with a boolean property.

When it was all done, I'd have something that looked 100% identical to what you laid out, but required fewer tags, less EL, and simpler backing-bean logic.
 
Artur Memekh
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim, thanks for your reply, but i resolved this problem. The problem was in my attention. I put checkbox tag and command button tag to different forms. When i put it at the same form, it worked.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!