Subject: Re: Struts design advice requested please.
From: Vic Cekvenich <[EMAIL PROTECTED]>
 ===
Maybe create a flag in the form bean as to who to CRUD to.
Then in action, keep track what "mode" you are in, and before calling 
CRUD, set the flag.
This means on set of getters and setters, but ... duplicate CRUD methods 
(one for each data source. And I would use RowSet in formbean to make my 
CRUD easier).
hth, Vic

Alex Colic wrote:

> Hi,
> 
> I have been using Struts now for about a year and I really like it. It has
> saved me a lot of time and made my apps quite stable. I have just been
> placed on another large struts project. It will be pushing struts to the
> limit. A quick question on design. What I am going to do is a bit difficult
> to explain. This app is going to be used by users to input inventory data
> into two different databases, an AS400 and an Oracle/SQL database. The user
> will enter essentially the same type of inventory data into each system,
> but, there are differences between the two. Part of the project plan is that
> through a config switch, parameter etc, I will be telling struts if we are
> working with an AS400 system or an Oracle/SQL system and then the guy will
> slightly change, just the addition or deletion of a gui element.
> 
> Example of required elements entered by the users in a form.
> 
> AS400                 ORACLE/SQL
> employeeID            employeeID
> storeroom             storeroom
> location              location
> location type
> bin Number
> 
> My question revolves around the form bean.
> 
> I though about making a form bean that includes all the properties that are
> required by the Inventory object for the AS400 and the ORACLE/SQL system.
> This would make one large generic form bean.
> 
> Then I thought about making an abstract class that includes all the common
> elements amongst the object and from there I would extend and create an
> AS400 inventory form or an Oracle/SQL inventory form. If I go this way then
> how do I set up the Struts.xml file to use the specific inventory form, if
> it could be one of two?
> 
> I hope what I am trying to convey is making sense. Depending on a config
> setting I think I should be using  one of two form beans, not known until
> run time.
> 
> Any help in setting up the above is appreciated.
> 
> Alex
> 
> 
> 
> --
> 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]>

Reply via email to