RE: Struts Design question

2006-06-21 Thread Givler, Eric
If you are using Struts 1.2.9, then lookup EventActionDispatcher. -Original Message- From: Scott Van Wart [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 21, 2006 1:39 PM To: Struts Users Mailing List Subject: Re: Struts Design question Monkeyden wrote: > If your implementation

Re: Struts Design question

2006-06-21 Thread Scott Van Wart
Monkeyden wrote: If your implementation is similar to what Scott has mentioned (i.e. different operations on the same type of object), then I consider this a classic example of a DispatchAction, where type of business entity doesn't change...just the selected operation on the business entity, th

Re: Struts Design question

2006-06-21 Thread Monkeyden
If your implementation is similar to what Scott has mentioned (i.e. different operations on the same type of object), then I consider this a classic example of a DispatchAction, where type of business entity doesn't change...just the selected operation on the business entity, thus it makes sense t

Re: Struts Design question

2006-06-21 Thread Scott Van Wart
Kavita Mehta wrote: Hi, I have a form which has 3 submit buttons . which is a gud ides ... 1) having seperate 3 action classes for each 2) having a single action class which manages the submit action based on the button which has called this action class. It's up to you ;). I typically divide

Struts Design question

2006-06-21 Thread Kavita Mehta
Hi, I have a form which has 3 submit buttons . which is a gud ides ... 1) having seperate 3 action classes for each 2) having a single action class which manages the submit action based on the button which has called this action class. Thanks, Kavita ---

Re: Another struts design question

2006-02-15 Thread Dakota Jack
Is there any actual verification that these remarks are true? Could you give us some links? On 2/14/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > On 2/14/06, Mark Lowe <[EMAIL PROTECTED]> wrote: > > You could use the referer header to create an action forward based on > > that value. > > "

Re: Another struts design question

2006-02-15 Thread Frank W. Zammetti
Michael Jouravlev wrote: An action should *never* forward to a page that does not belong to that action; this practice leads to a spaghetti code both in Java and in config file. If you mean forward directly to a JSP, I agree. If you meant something else, I'm not sure how you would ever get to

Re: Another struts design question

2006-02-15 Thread Michael Jouravlev
On 2/15/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > On Wed, February 15, 2006 2:46 pm, [EMAIL PROTECTED] said: > > Is it, however, possible that you could design you application to where > > all the mapped actions were "setup actions"? I guess not. Yes you can. In this case you need to som

Re: Another struts design question

2006-02-15 Thread Frank W. Zammetti
, Frank W. Zammetti < [EMAIL PROTECTED] > wrote: > From: Frank W. Zammetti [mailto: [EMAIL PROTECTED] > To: user@struts.apache.org > Date: Tue, 14 Feb 2006 18:59:11 -0500 > Subject: Re: Another struts design question > > Michael Jouravlev wrote:> On 2/14/06, Rick Reumann &l

Re: Another struts design question

2006-02-15 Thread [EMAIL PROTECTED]
he actions? Is this a bad thing? Something that should already be handled? --- On Tue 02/14, Frank W. Zammetti < [EMAIL PROTECTED] > wrote: From: Frank W. Zammetti [mailto: [EMAIL PROTECTED] To: user@struts.apache.org Date: Tue, 14 Feb 2006 18:59:11 -0500 Subject: Re: Another stru

Re: Another struts design question

2006-02-15 Thread Frank W. Zammetti
On Wed, February 15, 2006 4:24 am, Mark Lowe said: > My understanding of the suggestion is like replicating the history > object in client side javascript. Which does sound like a good > suggestion. That's a good way to put it :) The only difference is that you wouldn't build up a whole history,

Re: Another struts design question

2006-02-15 Thread Mark Lowe
On 2/15/06, Lixin Chu <[EMAIL PROTECTED]> wrote: > ok, I let page A or B pass a returnURL to page C who keeps it in the session > scoped actionForm. I think what's being suggested is storing a reference to the "referer" in the session, and thus circumventing any potential issues with the Referer h

Re: Another struts design question

2006-02-14 Thread Lixin Chu
ok, I let page A or B pass a returnURL to page C who keeps it in the session scoped actionForm. On 2/15/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > > Michael Jouravlev wrote: > > On 2/14/06, Rick Reumann <[EMAIL PROTECTED]> wrote: > > > >> In the action just look for some param like "fromPa

Re: Another struts design question

2006-02-14 Thread Frank W. Zammetti
Michael Jouravlev wrote: On 2/14/06, Rick Reumann <[EMAIL PROTECTED]> wrote: In the action just look for some param like "fromPage" and key off of that for your return. (Of course a drawback is you'll need to remember to set this var on the pages that need it - of course there are ways you co

Re: Another struts design question

2006-02-14 Thread Mark Lowe
On 2/14/06, Rick Reumann <[EMAIL PROTECTED]> wrote: > Mark Lowe wrote the following on 2/14/2006 2:32 PM: > > > > The only other suggestion i would make if this were an issue is use > > separate action mappings for each point of entry.. > > Actually that seems pretty clean to me. Even if he has a l

Re: Another struts design question

2006-02-14 Thread Michael Jouravlev
On 2/14/06, Rick Reumann <[EMAIL PROTECTED]> wrote: > In the action just look for some param like "fromPage" and key off of > that for your return. (Of course a drawback is you'll need to remember > to set this var on the pages that need it - of course there are ways you > could simplify that even,

Re: Another struts design question

2006-02-14 Thread Rick Reumann
Mark Lowe wrote the following on 2/14/2006 2:32 PM: The only other suggestion i would make if this were an issue is use separate action mappings for each point of entry.. Actually that seems pretty clean to me. Even if he has a lot of points of entry it can't be "that" many. Or another option

Re: Another struts design question

2006-02-14 Thread Mark Lowe
On 2/14/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > On 2/14/06, Mark Lowe <[EMAIL PROTECTED]> wrote: > > You could use the referer header to create an action forward based on > > that value. > > "referer" field is unreliable. Can fail depending on your mix or > forwarding/redirecting/reloadi

Re: Another struts design question

2006-02-14 Thread Michael Jouravlev
On 2/14/06, Mark Lowe <[EMAIL PROTECTED]> wrote: > You could use the referer header to create an action forward based on > that value. "referer" field is unreliable. Can fail depending on your mix or forwarding/redirecting/reloading a page. It is also often removed by proxies/firewalls. I would no

Re: Another struts design question

2006-02-14 Thread Dave Newton
[EMAIL PROTECTED] wrote: > As long as you are arriving at the "settings" page via an action, can't you > just call the getInputForward() -- the method that the validate stuff calls > to return to the starting page if there were errors; this seems like it would > easily work. > > If you aren't

Re: Another struts design question

2006-02-14 Thread [EMAIL PROTECTED]
[mailto: [EMAIL PROTECTED] To: user@struts.apache.org Date: Tue, 14 Feb 2006 08:04:15 -0600 Subject: Re: Another struts design question That could work, and it would scale to n input pages.Thanks Mark!On 2/14/06, Mark Lowe <[EMAIL PROTECTED]> wrote:> You could use the referer header to create an

Re: Another struts design question

2006-02-14 Thread Keith Sader
That could work, and it would scale to n input pages. Thanks Mark! On 2/14/06, Mark Lowe <[EMAIL PROTECTED]> wrote: > You could use the referer header to create an action forward based on > that value. > > String referer = request.getHeader("Referer"); > URL url = new URL(referer); > String path

Re: Another struts design question

2006-02-14 Thread Mark Lowe
You could use the referer header to create an action forward based on that value. String referer = request.getHeader("Referer"); URL url = new URL(referer); String path = url.getPath(); String contextPath = request.getContextPath(); path = path.replaceFirst(contextPath,""); return new ActionForwa

Another struts design question

2006-02-14 Thread Keith Sader
Greetings, I need to have an action return to a previous page depending upon which page originally requested the common page. Think of it as a settings page that can be accessed from multiple places. Like this: Entry 1 ---> Common Page

Re: Struts Design Question

2005-12-08 Thread Ted Husted
It sounds like WildCard mappings (since Struts 1.2) might help. You would probably only need one set of mappings for any number of catagories. You would probably only need one ActionForm too. If some of the categories don't use some of the properties, then they just travel null. Just give the base

Struts Design Question

2005-12-07 Thread bill
A bit of a struts newbie here. I have an application with the following page flow: choose Product Category --> choose Product Model --> create/edit chosen model Currently we only have one ActionForm\JSP Edit Form, but we need to expand this to support different Product Categories. Each would be

RE: [OT] EJB/Struts Design Question

2004-06-09 Thread Navjot Singh
om: "Navjot Singh" <[EMAIL PROTECTED]> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >Sent: Saturday, June 05, 2004 9:17 PM >Subject: [OT] EJB/Struts Design Question > > >> Hi, >> >> I have a typical case of Category and Produ

Re: [OT] EJB/Struts Design Question

2004-06-09 Thread Harjot Narula
? Are you using service locator pattern also ? Harjot - Original Message - From: "Navjot Singh" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Saturday, June 05, 2004 9:17 PM Subject: [OT] EJB/Struts Design Question &g

RE: [OT] EJB/Struts Design Question

2004-06-06 Thread Robert Taylor
nts/patterns/FastLaneReader.html My .02. robert > -Original Message- > From: Navjot Singh [mailto:[EMAIL PROTECTED] > Sent: Saturday, June 05, 2004 11:48 AM > To: Struts Users Mailing List > Subject: [OT] EJB/Struts Design Question > > > Hi, > > I ha

[OT] EJB/Struts Design Question

2004-06-05 Thread Navjot Singh
Hi, I have a typical case of Category and Product entity bean established in 1:N relationship. In the client tier, I wish to display the list of products along with their category names. 1. Struts Action make a call to ProductDelegate. 2. ProductDelgate to ProductManager (SessionBean). 3. Produc