Re: Business Logic Beanies

2001-01-06 Thread Ted Husted
The "Struts with a Fruit Glaze" example has been updated to demonstrate filling option tags from a DBMS query, and changing another query using those options, along with inserting a new record. Still alpha, but available nonetheless if anyone is interested. Of course, it still also demonstrates

Re: Business Logic Beanies

2001-01-05 Thread Ted Husted
A kind soul sent me this link to a Powered-by-Struts auction application, BrewTrade by Java-Genius - http://www.java-genius.com/ that uses a neat mechanism to abstract a database result into a generic list of fields (KeyValuePairs), which can then be used to populate a data bean. The method tha

Re: Business Logic Beanies

2001-01-04 Thread Ted Husted
On 1/4/2001 at 8:00 AM Michael Gerdau wrote: > The current approach is to have them hardwired in a helperclass which does provide these ... What I think one should have is a generic (XML ?) file that holds all these parameters very much like a resource bundle. How about a helper bean with propert

Re: Business Logic Beanies

2001-01-03 Thread Michael Gerdau
[struts util package] Apparently I'll have to have a closer look at these. Thanks for pointing me there. >The struts-config.xml can do alot of the "wiring" in Struts. Heck, it's >probably possible to write a signficant JSP application that just >leveraged the struts-config.xml and a generic Acti

Re: Business Logic Beanies

2001-01-03 Thread Ted Husted
On 1/3/2001 at 11:06 AM Craig R. McClanahan wrote: > Let's say your QueryFormBean has a property named "resource", with corresponding getResource() and setResource() methods. This should be configured by doing something like this in struts-config.xml: Or I could also use this approach to load va

Re: Business Logic Beanies

2001-01-03 Thread Ted Husted
On 1/3/2001 at 11:06 AM Craig R. McClanahan wrote: >If you do it this way, do you need more than one QueryBean? Couldn't you create a generic one that processes different kinds of query strings based on the name of the resource you told it to read? Now that you mention, it could be used a generi

Re: Business Logic Beanies

2001-01-03 Thread Craig R. McClanahan
"Craig R. McClanahan" wrote: > > type="com.mycompany.mypackage.SearchFormBean"> > > > Oops, this really needs to include a reference to the custom ActionFormBean subclass to use. You can do this (again, as of tonight's nightly build) in one of two ways: * Set an initi

Re: Business Logic Beanies

2001-01-03 Thread Craig R. McClanahan
Michael Gerdau wrote: > >> The design I us works like this: > >> - for each logical item of data write a trivial class with all the > >> get/set methods (the Entity class). > > > >If we have any XSLT gurus in our midst, this sounds like it is something > that > >could be auto-generated from an

Re: Business Logic Beanies

2001-01-03 Thread Craig R. McClanahan
Ted Husted wrote: > Being able to autogenerate the "logical data beans" would be excellent! > And very much in keeping with the rest of the Struts framework. > Ideally, this would be a mechanism that could also be used in other > applications (e.g. Swing-based). > > So, in general terms, it seems

Re: Business Logic Beanies

2001-01-03 Thread Ted Husted
Michael, The Struts Generic* JDBC classes where introduced after the 0.5 milestone. They implement a simple connection pool, probably much like the one in your foo.bar package. The pool can be configured in the struts-config.xml, and you can change drivers and other specifics there. The current

Re: Business Logic Beanies

2001-01-03 Thread Michael Gerdau
>Being able to autogenerate the "logical data beans" would be excellent! >And very much in keeping with the rest of the Struts framework. >Ideally, this would be a mechanism that could also be used in other >applications (e.g. Swing-based). > >So, in general terms, it seems we're coming down to t

Re: Business Logic Beanies

2001-01-03 Thread Ted Husted
Being able to autogenerate the "logical data beans" would be excellent! And very much in keeping with the rest of the Struts framework. Ideally, this would be a mechanism that could also be used in other applications (e.g. Swing-based). So, in general terms, it seems we're coming down to this:

Re: Business Logic Beanies

2001-01-03 Thread Michael Gerdau
>> The design I us works like this: >> - for each logical item of data write a trivial class with all the >> get/set methods (the Entity class). > >If we have any XSLT gurus in our midst, this sounds like it is something that >could be auto-generated from an XML-based description of the "logical

Re: Business Logic Beanies

2001-01-02 Thread Craig R. McClanahan
Michael Gerdau wrote: > [scriptlets to execute JDBC inside a JSP] > > >I'm working on adding metadata and other convenience methods now. I'll > >post the working example soon. Just wondering what similar solutions > >others might have found to handling JDBC queries within Struts. > > The design I

Re: Business Logic Beanies

2001-01-02 Thread Michael Gerdau
[scriptlets to execute JDBC inside a JSP] >I'm working on adding metadata and other convenience methods now. I'll >post the working example soon. Just wondering what similar solutions >others might have found to handling JDBC queries within Struts. The design I us works like this: - for each log

Re: Business Logic Beanies

2001-01-02 Thread Ted Husted
I'm finishing up on a model for executing JDBC retrievals from a JSP, using a scriptlet like <% FruitSalesForm fruitSalesForm = (FruitSalesForm) session.getAttribute("fruitSalesForm"); fruitSalesForm.setPageContext(pageContext); %> to execute pooled JDBC connetions, and transfer the resul