Can you not have those fields defined in some super
action form and also the lookup methods defined in
some super action class that extends from
lookupdispatchaction class.


--- Stuart Guthrie <[EMAIL PROTECTED]> wrote:

> Thanks for your answer. However this is fine as a
> technique to enable me
> to fire an 'action' to lookup the customer but I was
> hoping that the
> customer browser would be a nice action/jsp combo to
> itself which could
> be told to 'return' back to the originating calling
> action.
> 
> I might want to include the ability to lookup a
> customer in 20 or 30
> forms, not just order entry. 
> 
> It's the modular approach known to console-based and
> gui based
> applications. My question is: how does this
> translate in struts? Does
> it?
> 
> Stuart
> 
> On Fri, 2004-08-20 at 15:06, struts lover wrote:
> > You can have a variable called action in your
> action
> > form. You can set that variable as view or edit.
> Now
> > for the first time, the action can be view. You
> lookup
> > for the customer. If you find, you display. If you
> > dont find, (check this with some <c:if> tag ) you
> > display a text field and a ADD CUSTOMER button.
> You
> > enter the customer name, and click the add button.
> > Again it takes  you to the same action class. This
> > action class extends the LookupDispatchAction
> class.
> > You have different methods for different buttons
> in
> > that class.(lookup,add etc.). You need only one
> jsp,
> > one action form and one action class that extends
> from
> > the LookupDispatchAction class.
> > HTH
> > 
> > 
> > 
> > --- Stuart Guthrie <[EMAIL PROTECTED]> wrote:
> > 
> > > This is a general 'how do you do it if you do
> it'
> > > question about web
> > > application design.
> > > 
> > > Here is the scenario.
> > > 
> > > Web Form:
> > > -----------------------------------------
> > > ORDER HEADER
> > > 
> > > Order No:   0010
> > > Order Date: 15/08/2004
> > > Customer:   ______ <LOOKUP CUSTOMER>
> > > Customer Name: ?
> > > -----------------------------------------
> > > 
> > > So the user has entered a new order date and
> > > requests the <LOOKUP
> > > CUSTOMER> button to search the 1,000,000
> customers
> > > in the database.
> > > (Note, I picked a cool million deliberately to
> stop
> > > the 'just use a
> > > combo' suggestions)
> > > 
> > > The customer is found and selected. The user is
> > > returned to this form in
> > > exactly the same 'state' they left it. ie with
> the
> > > date entered as
> > > 15/08/2004, except their customer code is now
> filled
> > > in. As is the
> > > Customer name.
> > > 
> > > -----------------------------------------
> > > ORDER HEADER
> > > 
> > > Order No:   0010
> > > Order Date: 15/08/2004
> > > Customer:   ABC123 <LOOKUP CUSTOMER>
> > > Customer Name: ABC Inc.
> > > -----------------------------------------
> > > 
> > > 
> > > This example gets more complex if you consider
> that
> > > once the user
> > > reaches the lookup, they might find no customer
> > > there and need to ADD a
> > > customer, taking them to a new 'stack' level.
> > > 
> > > > Order Entry (1/2 complete)
> > > -> Lookup Customer 
> > > --> Add Customer as not found in lookup
> > > --> Return to lookup Customer
> > > -> Select newly added customer from list
> > > > Order Entry Form re-populated with new
> customer
> > > code and description
> > > as well as original 1/2 complete fields.
> > > 
> > > 
> > > Ways to do this:
> > > 
> > > 1. Some sort of 'stack' where the state is
> > > maintained in a 'level' of
> > > the
> > > stack with all the form values from the web
> page.
> > > The user goes off and
> > > searches on the next level of the 'stack' and
> once
> > > sorted, pulls (or is
> > > it pops) the stack back to the previous 'level'
> and
> > > re-populates the
> > > form.
> > > 
> > > 2. Something else.
> > > 
> > > 3. Can't be done. Don't go there!
> > > 
> > > 
> > > I'm all ears, unless I hear otherwise, I'll
> probably
> > > write the
> > > 'stack'technology.
> > > 
> > > TIA
> > > 
> > > 
> > > Stuart Guthrie
> > > 
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > 
> > > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



                
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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

Reply via email to