I am thinking about send the selected item to an action class to process and get results, but it seems the select action will not make action form to pass the selected department to action class, we need a submit and have to send all 3 items back (Am I understanding correctly?).
Somehow I get a sense that you are not quite clear on some of the basics, so I'll just go over the general flow of things quickly to make sure that we're on good footing:
1. JSPs are processed on the server side (the JSP source is translated into a
Servlet, which runs on the server side). When the JSP is invoked (actually, the resulting Servlet is invoked), the result of the processing is a response (usually HTML), which is sent back to the client (usually a browser). The browser knows nothing about JSPs. All it is aware of is HTML and JavaScript.
2. JavaScript is processed on the client/browser side. The server does not process JavaScript code at all; to the server it is merely text it read from the JSP that goes directly into the response (HTML) it sends back to the client.
So how does Struts fit into this? Well, the heart of Struts is the ActionServlet. When the web container receives a request for a Struts URL (usually ending in .do), it hands off the processing of that request to the Struts ActionServlet. The ActionServlet figures out what the matching Action and ActionForm it needs to use based on information found in struts-config.xml (it matches the request URL with an action-mapping name). It then gets an instance of the ActionForm (one instance per session), calls the ActionForm.reset() method, then takes all parameters from the request and puts the values into the matching ActionForm fields. If the mapping is configured to do so, it will then call the ActionForm.validate() method. Then it will instantiate an Action and pass the ActionMapping, ActionForm, HttpServletRequest, and HttpServletResponse to the execute method.
In the execute method, you normally access any values that came in with the request through the ActionForm (which now contains all the form values that were submitted with the request). When you exit from the execute method, you return an ActionForward, which tells the ActionServlet to which resource (usually a JSP page) it should hand off processing to in order to generate a response. Before it relinquishes control though, the ActionServlet puts the current ActionMapping into the request context. This allows the Struts html tags to access the ActionForm that you are processing. The ActionServlet then relinquishes control to the web container, telling it what resource (as defined by the ActionForward) should take over. If that resource is a JSP, then the web container lets the Servlet/JSP engine/translator take over processing.
If you have any Struts html tags in your JSP, these tags will know to pull out the ActionMapping from the request, figure out what form to pull from the session (attribute name == ActionMapping.getName()), then get the current values of the corresponding form properties and render an appropriate html input tag with a value attribute.
So, if your ActionForm's getFirstName() method returns the
String "Jim" and you have a custom tag in your JSP
<html:text property="firstName" />
this will be rendered in the response (what the browser sees) as
<input type="text" name="firstName" value="Jim" />
Whew! That's all there is to it (in general).
I know that all this may seem far from what you asked but it is important that you understand the context in which Struts operates and how it fits into the general scheme of things if you want to begin to understand Struts at all. (Remember, anything we don't understand is indistinguishable from magic--or something like that ;))
It's late now (or early morning, if you want to look at it that way) and I have to get some rest befor I have to go to work again in four hours so I'll try to get back to the original question later. Meanwhile, try to make sense of what I just wrote and try to get the flow straight in your mind.