> Hello,
>    
>    I am using struts 1.0.2 for developing web based intranet application. 
>    I have 3 Iframes within a browser page ( header Iframe on the top of
> the page, navigation Iframe on the left and content Iframe at the center).
>  
> Each Iframe has a JSP associated with it which contains form elements
> including a submit and a reset button.
> 
> I have come up with 2 design strategies :
> 
>     strategy 1-   Each Iframe has one Action Form or form bean i.e. 3 for
> beans for 3 Iframes.
>     strategy 2 - Single action form for all the three Iframes i.e. action
> form holds data of all the 3 Iframes. 
> 
>     and I would like to have your comments on it in terms of which
> strategy is best and why ?. 
> 
>      I understand that with struts framework, only one action form can be
> passed to perform method to the associated action class. 
> 
> Following are the pros and cons that I have come up with : 
> 
> A.     When I select 3 form beans i.e. one form bean for each Iframe.
> 
> 
>      Let's say that header Iframe is mapped to HeaderForm bean, navigation
> Iframe is mapped to NavForm, and content Iframe to 
> 
> ContentForm bean.
> 
>     1. When the entire page gets loaded in the browser, instances of all
> the 3 form beans are created (if they are not in the specified scope ). 
> 
> 
>     2. When I click on submit button of one of the Iframes (say Content
> Iframe), only the form associated with that Iframe (i.e. Content Iframe)
> gets submitted, setter method of ContentForm are called and instance of
> the ContentForm bean is passed as one of the arguments to the perform
> method of the corresponding action class. (setter methods of HeaderForm
> bean and NavForm bean are not called.)
> 
>     3. The advantage here I get that, any design change in the Iframe (say
> Content Iframe) has impact on only corresponding Action Form (ContentForm)
> class and other classes ( HeaderForm and NavForm ) remain unchanged.
> 
>     4. The disadvantage I get here is that, more no. of action form
> instances are created.
> 
> B.    When I select Single (One)   Action Form (form bean) for all 3
> Iframes.
> 
>     1. When the page gets loaded in the browser, only one instance of form
> bean is created (if it is not available in the specified scope).   
> 
> 
>     2. Here, Action form contains getter and setter methods for all the
> properties that are available in all the 3 Iframes. Although, when I click
> on submit button, only setter methods for the properties of submitted form
> are called, and instance of the form bean is passed to perform method of
> associated action class.
>    
>     3. I face problem when I try to implement, reset and validate method.
> If I have 1 reset button in a form for each Iframe (total 3 reset buttons
> in the entire page), on click of any reset button, reset() method of
> Action Form bean gets called.
> 
>     I feel that strategy 1 offers more advantages in terms of flexibility
> that it offers when it comes to handling change in the design, but as far
> as performance is concerned,   I would not i prefere strategy 1, since it
> creates more number of instances. 
> I would like to know which strategy is best  and why? If you have any
> other idea of implementing the same. Please let me know.
> 
>   I appreciate your early response, 
> 
>   thanks 
> 
> - Vijay  
>     
>      
> 
> 
> 
>    _____  
> 
> Chat with friends online, try MSN Messenger: Click Here
> 
> 
************************************************************************** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************

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

Reply via email to