how can i fetch combo box value into my DAO using struts 2?
Answers were Sorted based on User's Feedback
Answer / sarath kumar ch
If your combo box is multiple select :
Declare one array String variable in your action.And that
variable name should match with the combo box name. Then you
will get all the selected values into your action. There you
pass those variable to your DAO.
If your combo box is single select you can directly declare
a variable in your action as the same name with combo box.
Sarath
| Is This Answer Correct ? | 18 Yes | 3 No |
Answer / dsaf
Action - service -DAO
Create getter setters for name attribute in action otherwise u cant pass the values as parameters to DAo
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / murali krishna yella
Hi friends, What i feel is.....
The above answer is partially correct.sharath has taken
only 2 things(multiple select and single select) into the
considaration, I think along with with those to we hav to
take one more thing(UI tag <s:checkbox/> or
<s:checkboxlist/> ) what we are using in the User interface
into considaration while giving the answer.
When we are using <s:checkboxlist/> tag in the usr
interface for displaying the Checkbox(s) , the Data type in
our struts2 action is List.
Thank you friends
| Is This Answer Correct ? | 3 Yes | 2 No |
what is the disadvantages of using DynaActionForm in struts framework?
What is action chaining ?
How can we get Servlet API Request, Response, HttpSession etc Objects in action classes?
how to get the last 10 elements using logic:iterate in struts with hiernate from database.
What is spring and struts in java?
what is the main reason for developing struts? what is advantages over Basic MVC architecture based JAVA Application?
Which technologies can be used at view layer in struts?
What is the design role played by struts?
What is the purpose of @emailvalidator?
What is the purpose of @stringlengthfieldvalidator annotation?
What is the use of jsonvalidation in struts?
what is project architecture?give brief explanation about project architecture?
3 Answers CTS, Etisalat, IBM, Infinite Computer Solutions, Mphasis,