Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-15 Thread Rick Reumann
Well documented:) I'm going to try using SimpleDispatchAction starting today and see how it goes. I'll e-mail you off list with any questions. Thanks again. Michael McGrady wrote the following on 9/15/2004 2:54 AM: Hi, Rick, WITHIN: Rick Reumann wrote: In the beginning of this application I assum

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Michael McGrady
Hi, Rick, WITHIN: Rick Reumann wrote: In the beginning of this application I assumed the client would always want to see all users so I created a MappingDispatchAction method (or regular DispatchAction method) called "getUsers(...)" which returned a list of all users in the company and put them

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Rick Reumann
Michael McGrady wrote the following on 9/14/2004 11:04 PM: Your notes on links confuse me a bit. Let me consider what confuses me and then we can go from there. FIRST You said ". . . MappingDispatchAction has . . . a cetnralized place to decide what method is called based on the action name."

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Michael McGrady
Michael McGrady wrote: Ooops, Rick! I de-ooopsed the situation by adding if(methodName == null) { String parameter = mapping.getParameter(); if(parameter.endsWith(".x")) { methodName = buttonValue.substring(0,buttonValue.indexOf('.')); }

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Michael McGrady
Ooops, Rick! I made an error speeding on this. Let me work on it and get back to you later. Michael Michael McGrady wrote: Rick Reumann wrote: Hey, yes that is pretty cool. Hi, Rick, Your notes on links confuse me a bit. Let me consider what confuses me and then we can go from there. FIRST

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Michael McGrady
Rick Reumann wrote: Hey, yes that is pretty cool. Hi, Rick, Your notes on links confuse me a bit. Let me consider what confuses me and then we can go from there. FIRST You said ". . . MappingDispatchAction has . . . a cetnralized place to decide what method is called based on the action name

Re: how about some clarification vs saying things are ludicrous- Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Kris Schneider
Oh I definitely think it's more than okay to use tags to help generate JavaScript. In fact, using server-side code to generate client-side code is a telltale sign of a very seasoned and very respected developer ;-). The only reason I jumped in at all (and yes, it was late, sorry if I missed som

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Rick Reumann
Michael McGrady wrote the following on 9/14/2004 2:26 PM: Any way, I have something else on this. Rick, I have written a class I call SimpleDispatchAction which allows you to use links, submits, and images with the same code without involving struts-config.xml in the process. I put it up at h

how about some clarification vs saying things are ludicrous- Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Rick Reumann
Durham David Contr 805 CSPTS/SCE wrote the following on 9/14/2004 1:31 PM: I tested the code -- not that I needed to do so, but still. I'm sure you didn't need to test it "Oh almighty coding God." Just throw it into a JSP and look at the resulting HTML. Here's an index.jsp that I've ran in Tomcat 5

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Michael McGrady
Kris Schneider wrote: You mean the thing that starts " and are great for generating URLs to be used by JavaScript code that needs to interact with web apps. One of the reasons they're so useful is that they have built-in support for URL rewriting (encoding of session info). BTW, in an earlier note

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Kris Schneider
You mean the thing that starts " and are great for generating URLs to be used by JavaScript code that needs to interact with web apps. One of the reasons they're so useful is that they have built-in support for URL rewriting (encoding of session info). BTW, in an earlier note, Rick was thinking of

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Michael McGrady
Kris Schneider wrote: I'm guessing David's getting at how to properly construct a request-time value for a tag attribute. If you're using a scripting expression, everything must be contained within "<%=" and "%>". If you're using an EL-enabled tag, then you can do something like: "/${action}.do" (a

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Kris Schneider
I'm guessing David's getting at how to properly construct a request-time value for a tag attribute. If you're using a scripting expression, everything must be contained within "<%=" and "%>". If you're using an EL-enabled tag, then you can do something like: "/${action}.do" (assuming "action" is a

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Michael McGrady
Rick and David, DAVID I cannot see what you are getting at, David. What is the problem? I ran your code without incident. I assume that the result is what Rick wants. Please state what you think the problem is. Apparently you don't think the problem is JavaScript will have to run taglib cod

RE: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Durham David Contr 805 CSPTS/SCE
> Please correct me if I am wrong, but I think that you think that somehow > the is going to show up in the > response object and be present in the JavaScript on the page, which > would be bad. However, that is not the case. What shows up on the page > is the result of . The JSP page is > going

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Rick Reumann
Durham David Contr 805 CSPTS/SCE wrote the following on 9/14/2004 10:05 AM: Considering that "action" was a parameter passed to a javascript function... Here's the original code: function swapAction( formName, action) { formAction = document.getElementById( formName ).action; newAction =

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Michael McGrady
Don't worry, David, this is a list for exchanging ideas. Yours are appreciated. However, I think you are mistaken in this instance. I am fairly sure that is the case, since this code has been run and works. Please correct me if I am wrong, but I think that you think that somehow the is go

RE: Trying to come up with a Mapping-Dispatch combo Action

2004-09-14 Thread Durham David Contr 805 CSPTS/SCE
> >Well, if you look at this line: > > > >newAction = ''; > > > >It looks like JavaScript is being used to generate an . > > > > I read this as trying to use to generate JavaScript. Considering that "action" was a parameter passed to a javascript function... Here's the original code: fun

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Michael McGrady
Last try. Sorry about the noise:Rick Generic Action Solution | | ---|--- to updateFooBar.do of some GenericAction class. | --| Michael Generic Taglib Solution | | A: Solution Facade Interface: ---| |---B: Solution Implementation:

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Michael McGrady
Hoping this comes out better: Rick Generic Action Solution --| | ---|--- to updateFooBar.do of some GenericAction class. | --| Michael Generic Taglib Solution | | A: Solution Facade Interface: ---| |---B: So

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Michael McGrady
Rick Reumann wrote: Some comments below... Michael McGrady wrote the following on 9/13/2004 5:40 PM: Yes, that is a slight benefit (which is the same benefit of using the regular DispatchAction), however, the slight cost of having to rely on the struts-config for deciding what dispatch method is

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Michael McGrady
Rick Reumann wrote: Some comments below... Michael McGrady wrote the following on 9/13/2004 5:40 PM: Thanks for your comments below. It has helped clarify things. Your approach is pretty nice but in the above how would you be able to use this same Action for regular links? It seems like you have

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Michael McGrady
Durham David Contr 805 CSPTS/SCE wrote: From: Michael McGrady [mailto:[EMAIL PROTECTED] Why don't you think this will work, Dave? Why would the serverside script care that there was client side script? This looks okay to me. Well, if you look at this line: newAction = ''; It looks like Ja

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Rick Reumann
Durham David Contr 805 CSPTS/SCE wrote the following on 9/13/2004 6:42 PM: What about cookies? I'm not trying to be a jerk (that's a difficult task for me, btw), but I'd like to point out that this logic exists within the Struts framework, and replicating it in JavaScript would be, well, replicati

RE: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Durham David Contr 805 CSPTS/SCE
> It works fine and it's not a 'true' mix of server-side scripting. I > could avoid the use of the Considering that you passed the "action" to be re-written to a JavaScript function, yeah it's a true mix. :) > but didn't want to hardcode > the context name. I could do away with that tag and ju

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Rick Reumann
Durham David Contr 805 CSPTS/SCE wrote the following on 9/13/2004 3:13 PM: function swapAction( formName, action) { formAction = document.getElementById( formName ).action; newAction = ''; I don't think this will work, and I find it ironic that you literally mixed client-side and server-si

RE: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Durham David Contr 805 CSPTS/SCE
> From: Michael McGrady [mailto:[EMAIL PROTECTED] > > Why don't you think this will work, Dave? Why would the serverside > script care that there was client side script? This looks okay to me. Well, if you look at this line: newAction = ''; It looks like JavaScript is being used to genera

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Rick Reumann
Some comments below... Michael McGrady wrote the following on 9/13/2004 5:40 PM: The following class works fine: public abstract class CrackWillowLookupDispatchAction extends DispatchAction { public ActionForward execute( ActionMapping mapping, ActionForm form,

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Michael McGrady
Durham David Contr 805 CSPTS/SCE wrote: function swapAction( formName, action) { formAction = document.getElementById( formName ).action; newAction = ''; I don't think this will work, and I find it ironic that you literally mixed client-side and server-side scripting. Still, I see what

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Michael McGrady
I am enjoying the discussion as well. I can see that your schedule and my attempting to say too much are confusing things. Let me also clarify a couple things so we are clear what we each are saying. Then I will address the bigger issues. The following class works fine: public abstract cl

RE: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Durham David Contr 805 CSPTS/SCE
> function swapAction( formName, action) { > formAction = document.getElementById( formName ).action; > newAction = ''; I don't think this will work, and I find it ironic that you literally mixed client-side and server-side scripting. Still, I see what you're going for, and I myself hav

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Rick Reumann
(not commenting below, just up top on this) In reference to your first comment: > I think that what appears to be a model emphasis for the > solution in your [rick's] approach is bound to fail. Further, making > the > solution view based frees the model to be built for performance, which > is why

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Michael McGrady
SEE WITHIN: Michael McGrady Rick Reumann wrote: I hope you have a bit of time to discuss this in detail, Rick, because the amount of activity in this area is huge. I think this is one of those areas, along with looking for persistence not identical to the normal scopes, where there is continued

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-13 Thread Rick Reumann
Hi Michael. I'm replying to his quickly before I run into work so I might not have looked these approaches over enough but here are my first impressions. First I'd like to point out that I like to keep an application as consistent as possible. That means that I like my links, my form submits,

Re: Trying to come up with a Mapping-Dispatch combo Action

2004-09-12 Thread Michael McGrady
*The following is from http://wiki.apache.org/struts/StrutsCatalogMultipleImageTagsSimplified . If you don't like this solution, I would be interested in your thinking, Rick. If you are interested, I have a comprehensive solution to everything to do with buttons and images. I am going to add

Trying to come up with a Mapping-Dispatch combo Action

2004-09-12 Thread Rick Reumann
Not sure which list this question/topic really belongs on so posting to both. (I'm bringing it up on the dev list because I'm thinking maybe the base MappingDispatchAction could/should be modified). Some design background. I like to keep related tasks belonging in one Dispatch Action class (fla