This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes Get values from a checkbox list Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Get values from a checkbox list" Watch "Get values from a checkbox list" New topic
Author

Get values from a checkbox list

Julia Frattaglia
Greenhorn

Joined: Oct 12, 2012
Posts: 1
Hi ppl, I need some help.


I have a page showing a list of movies previously inserted by the user and I want to make an action for removing the movies from the arraylist in which they are.



My mostraElenco.jsp is




My struts-config is




And my RemoveMovieAction.java is



ListaFilm is made like this



what i get when i try to access to mostraElenco.jsp is




I know i shouldn't do this



since ListaFilm is static, I tried to do
ArrayList<Movie> filmDaRimuovere = (ArrayList<Movie>) form;
but I get errors since the compiler tells me that it can't convert from ActionForm form to ArrayList



Someone can help me?
Richard Golebiowski
Ranch Hand

Joined: May 05, 2010
Posts: 213

1) The message error is obvious. It cannot find the getter for "listMovie". I don't even see where you have "listMovie" defined. Is it defined and made public in "ShowElencoAction"?
2) You don't do an array of forms. You need to do an array of "Movie".
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Get values from a checkbox list
 
Similar Threads
getLocaleResolverInstance No LocaleResolver configured. - error in display table
struts simple program
How to do File Upload using struts with db2?
How to use html:submit with DispatchAction?
DispatchAction problem