The Action class is not the controller. The controller is the class that chooses the Action class.
On 3/1/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > On 3/1/06, SIRAGHER, JOEL <[EMAIL PROTECTED]> wrote: > > I got the ok on switching to 1.2.8, and I will also try your method this > > afternoon. I appreciate everyones responses. In the mean time, I have > > some design issues and questions: > > > > Does the old lookupdispatch action sometimes loose stuff that lives on > > the form?? > > An action (if you mean action class) cannot lose stuff from the form. > An action is just a "C in MVC" and it is stateless. I will answer the > checkbox question further in this reply. > > > I have a very complicated form. I am trying to find an easier way of > > programming it. > > You can have either one solid page or a composite page that contains > different self-sufficient components. > > If you have one solid page, then I would say process it with one (or > two) actions. Make the submit action a dispatch-type action (like you > already did) and channel all page events to submit action. The render > action would fill out and display the page. This is what you are > already doing. > > If you prefer to have a composite page, then you can either use > something like Tiles (never used it) or you can use other component > technology. In this case you can have as many actions as many > subcomponents you have. I don't want to advise any specific component > technology, it all depends on taste. I have my own implementation, but > it is in alpha stage so I don't want to mess your production > environment. > > <skipped/> > > > Then I also have other functionality called: SelectNow which allows > > selecting groups of records based on criteria. > > > > > > On the design side, I have 2 actions: an InitAction which pulls the > > records out of the database and puts them in queryResults[] that lives > > in the form bean. > > > > Then I have the actions which go thru the old lookupdispatch thing, > > except for the google type links which send processing via html:link > > forward to the RetrieveInitAction > > > > The most disturbing issues I've run across now is that If I use the > > dispatch button that checks All records on the screen. The data gets to > > the database, and redraws the records on the screen as checked. But when > > I go to uncheck a few, and hit the update page button, which reads the > > form and looks for checkboxes unchecked or checked... they all show up > > as checked again. > > This is a known issue, more like HTTP thing than Struts. Unchecked > radiobuttons and checkboxes are not sent to the server by browser, so > when you submit a form, you need to clear checkboxes before ActionForm > is populated. The only place to do this is ActionForm.reset() method. > Clear all checkboxes and do not set them with data from database. When > form is populated from the request, the checked checkboxes will be > set. > > Michael. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~