Hi everybody, I have to use in a JSP page a form with 2 select tags. The select tags should get their values from 2 different queries.These queries ask the same table of database but 2 different fields.The first query should work like: "SELECT DISTINCT(field1) FROM table)". The second query should work like: "SELECT DISTINCT(field2) FROM table". How can I make this?Should I use 2 different struts Action?Does anybody know some example? Of course,I already wrote the getter and setter methods in the Action Form class.I also need to know if I have to write something special in struts-config.xml file. I need some example before Tuesday if it is possible. Thanks in advance, Mattia
a) Call model, method #1 from controller - store result in variable #1 b) Call model, method #2 from controller - store result in variable #2 c) Call form setter for field #1, set this to value of variable #1 d) Call form setter for field #2, set this to value of variable #2 e) Forward to JSP f) Done.
Bonus points: instead of a) and b), call ONE method to get both results; put these results into a DTO, then pass the DTO back to the controller where you extract the values.