how can i fetch combo box value into my DAO using struts 2?

Answers were Sorted based on User's Feedback



how can i fetch combo box value into my DAO using struts 2?..

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

how can i fetch combo box value into my DAO using struts 2?..

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

how can i fetch combo box value into my DAO using struts 2?..

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

Post New Answer

More Struts Interview Questions

What is Request Dispatcher and What is reuest Processor??

2 Answers  


What are the two types of validations supported by validator framework?

0 Answers  


What is includeaction?

0 Answers  


What steps are required to for an application migration from Struts1 to Struts2?

0 Answers  


What is the purpose of execute() method?

0 Answers  






What is s token?

0 Answers  


What are the classes used as part of struts framework ?

0 Answers  


explain the Struts flow?

4 Answers   Wipro,


Can we handle exceptions in Struts programmatically?

0 Answers  


Who makes the struts?

0 Answers  


What’s the difference between struts and turbine? What’s the difference between struts and espresso?

0 Answers  


How can forward action be used to restrict a strut application to mvc?

0 Answers  


Categories