I'm relatively new to struts too. But I really don't like the HTML select implementation. So I use a custom tag to fill in select/option lists. In fact I have to use this tag throughout my application so I made it very generic. My select/option lists almost always come right from my database. So I made a tag that takes a SQL statement as an attribute, the name of the field that I want as the option value as the 2nd attribute, and the name of the field I want displayed in the list as the 3rd attribute. The tag class builds a stringbuffer with "<option value=[field1]>[field2]</option>" strings for each row returned from the SQL statement.
Then I use the struts form/action classes to verify the result of submitting the form. At 05:35 PM 2/11/2002 +0000, you wrote: >Hello. > >I'm new to struts, and I'm having a discussion with one of our designers >about pre and post processing in web pages. > >Previously, we have used the standard JSP way of creating pages, with lots >of code in the top and body of pages, in order to access functionality we >have exposed in some Java beans. These Java beans wrapper XML services >provided by our Forte 4GL back end. > >Say we have a form which accepts customer details. I can see how the Struts >mechanism allows us to put the code that was previously at the top of the >next JSP page into an ActionHandler, which decouples the flow of pages quite >nicely, and we have a nice way of doing post processing on the contents of a >page. > >However, if we have a page that has to display a list of addresses for a >customer, and we have to run some code to get the list before we can display >it, where should this code live? Should it be in the ActionHandler with the >previous page's post processing, or is there a better place to put it? Or >would you suggest writing a custom tag to perform the pre-processing? > >Thanks for any thoughts, > >Tim. > > >This e-mail and its attachments are for the use of the addressee only. >It may contain information that is legally privileged, confidential and >exempt from disclosure. It is not a contract, and prices, data >and other information are not warranted as to completeness or accuracy. >Any comments or statements made herein do not necessarily >reflect those of PanCredit Systems Limited. If you are not the intended >recipient you must not copy, distribute or disseminate this e-mail >or attachments to anyone other than the addressee. >If you receive this communication in error please advise us by telephone >at once. >PanCredit Systems Limited >Tel: +44 113 250 0260 >Fax: +44 113 250 0621 > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

