Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Action class doubt(submit,button type)

 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing an application in struts... I would like to how the button and submit types of UI are used by the Action class...Meaning I have a table with 3 columns where a row along with data for the 3 cells is added dynamically to the table on click of a button.During this process I need to store these 3 values in 3 different lists and update the list for successive values of rows that are added...Ex:- 5 rows... 3 ArrayLists each with 5 values... But since it is done on a button click and not submit I am unable to prepare these arrayLists in action class...We know that the name of the button and the variable in action class should be same.How to rectify this?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It'd be helpful to state which version of Struts you're using.
 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing in struts 2. My doubt is in Action class variable name which is the name of the button in jsp.As I said I should not submit ad go to next page.But since it is a button the the action class is not being called..How do i PREPARE MY ARRAYLISTS?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you getting form values to an action without a form submission?

I'm not sure what you mean by preparing an arraylist--perhaps some code would help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic