struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Trent" <jtr...@structsoft.com>
Subject Re: Proposal
Date Mon, 11 Jun 2001 18:24:12 GMT
I haven't heard much in the way of a reponse on this proposal so I guess I'll be on my own....
 In either case, I would like to make one more addendum to what I'm proposing in case anyone
is interested.

There are times I've found when the presentation (input mapping) is not cut and dry.  For
instance, consider these URLS:
http://demo.paytrust.com/NASApp/Pt2/DemoLogin
http://billcenterdemo.americanexpress.com/NASApp/Pt2/DemoLogin
http://billmanagerdemo.accountonline.com/NASApp/Pt2/BillCenter
http://gebillmanagerdemo.gefn.com/NASApp/Pt2/DemoLogin
http://billcenterdemo.smartmoney.com/NASApp/Pt2/DemoLogin
http://billmanagerdemo.etrade.com/NASApp/Pt2/DemoLogin

Besides all being bill payment sites, the commonality between them is that they are all run
on the same servers at Paytrust and all use the same underlying business logic (servlets)!
 I architected the presentation (JSP) to vary depending on the partner we are currently serving
up in the request.  I would like to see this type of metaphore extended to the action servlet.
 So, during the pre_rendering notification, I can for instance, tell the action servlet specifically
what JSP file to use.  The mappings are not fine-grain enough.  In the case above, they all
are mapped to DemoLogin.  The real / physical JSP that gets loaded is determined by the request.

The hierarchy of the JSPs look like this:

        baseJSPdir        { contains all of the default JSPs that have templates to define
simple variation such as color, headers, etc. }
        |
            -paytrust                { contains a set of overriding JSPs going by the same
name which are unique to the site }
            -<cobrandX>                { ditto (see above) }    


Any takers?  Its been quite successful for me up to now and would require minimal changes
to struts...

Thanks,
Jeff




  ----- Original Message ----- 
  From: Jeff Trent 
  To: struts-dev@jakarta.apache.org 
  Cc: Ted Husted 
  Sent: Wednesday, June 06, 2001 10:21 AM
  Subject: Proposal


  New here ... so bare with me.

  I'd like to propose the following enhancement to ActionForm:

      public void addListener(ActionFormListener);
      public void removeListener(ActionFormListener);

   Here is the basics of ActionFormListener I'm interested in to start out with:

      public abstract class ActionFormListener
      {
          public static final int ACTION_TYPE_PAGE_PRE_RENDERED = 1;
          public static final int ACTION_TYPE_PAGE_POST_RENDERED = 2;

          public abstract void actionFormNotify(int actionType, String context /* reserved
for future use*/);
      }


  ---

  These messages would be sent before and after the RequestDispatcher included or forwarded
to the JSP page.

  The primary reason I'm propsing this feature is to allocate / free (respectfully) scarce
resources that I would like to be made available on the page that I do not want to serialize
to transient members of my form.

  thank you,
  jeffrey trent


Mime
View raw message