Hi,
I am somewhat new to
struts. Please let me know whether the following way of accessing the Objects are fine with.
I have an TestAction.
In the that, I call the TestBusiness
public TestAction()
{
public void execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception
{
TestForm formObj = (TestForm)form;
TestBusiness testBusi = new TestBusiness(formObj);
// Store the ref of form in the Business itself.
testBusi.setFirstSetOfValues();
With the help of the form values that obtained I make somethign on the Action and then
testBusi.setSecondSetOfValues();
All these method calls to the business will set some values in the form.
And inturn they are also making use of some values in teh form.
i.e. Instead of sending those values one by one from the Action to the business, I have taken the form to teh Businesss.
Is this OK to take the ref of Form in the Business class and directly get or set the values from that .
Please let me know whether this way of designing is a good practise or not.
Thanks a lot.
}
}