My application has a tabbed list of forms.  Based on user permissions, I 
want to show a specific list of tabs.  The tabs are images, one for 
selected, one for non selected.

Each tab relates to a JSP.  It also has two struts actions associated 
with it, one for load, one for submit.  Ideally, the logic used to do 
these two things would reside in EJBs, and communicate with Struts 
through relatively simple value objects.  As things evolve, however ,I 
find more and more logic in the Actions.

Thus I am starting to think of a major refactoring with the following 
objects:
I'll use a psedo code that should be understandable:

ApplicationFeature {
 tabUpImage;
 tabDownImage;
 permission;
 formJsp; //I want this to be a JSP fragement so I get all of the 
benfits of the custom tags
 templateJSP;  /*reposnible for getting and rendering the formJsp, etc.*/

either{
  strutsLoadAction;//what to call before the feature Page is displayed
  strutsSubmitAction//what to call when the featurePage submit button is 
pressed
}or{
  EJBValueObject ejbLoadAction();//what to called before the feature 
Page is displayed
  void ejbSubmitAction(EJBValueObject)//what to call when the 
featurePage submit button is pressed
}

}

I don't want to parallel struts with an EJB framework that does the same 
thing.  I like compile time binding and want to stick with struts being 
the most fluid/loosely typed portion of the code.

How have other people standardized the connection between struts and 
EJBs?  Would It be desireable to make struts EJB aware, so that instead 
of creating a simple java object, it creates a reference to an EJB? 
 What would you do about the getting values out of the HttpRequest and 
response objects, such as attributes.  I suppose you could make some 
sort of optional pre and post processor. but that could really 
complicate the logic.

If this is something that has been beaten to death already or has been 
solved in some portion of the Struts tree, please point me to it 
politely, and I will rebury my head in the sand.



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to