Re: WildCards and Results

2007-04-09 Thread Ted Husted
On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ###struts.enable.DynamicMethodInvocation = false That was it! I updated the value last week with false but it was commented out! Too much time passed between then and now! I guess the default is true? I would hope you would not get this

Re: WildCards and Results

2007-04-09 Thread stanlick
This seems to me like putting another bullet in the gun! I agree you should pick a strategy and go with it. Having said that, do you agree the default for WCM should be false? Scott On 4/9/07, Ted Husted <[EMAIL PROTECTED]> wrote: We consider Wildcard Methods and DMI to be distinct strategie

Re: WildCards and Results

2007-04-09 Thread Ted Husted
On 4/9/07, Dave Newton <[EMAIL PROTECTED]> wrote: Does turning off dynamic method invocation not disable the "!" functionality? As Ted said, the "!" is part of XWork but there's a config param to disable it. When DMI is disabled, then the ! is an ordinary character again. Wildcards will always

Re: WildCards and Results

2007-04-09 Thread Ted Husted
We consider Wildcard Methods and DMI to be distinct strategies, and I would suggest that an application use one or the other. But, Wildcards and DMI can co-exist if the Wildcard URIs don't use the ! character. HTH, Ted On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTEC

Re: WildCards and Results

2007-04-09 Thread stanlick
###struts.enable.DynamicMethodInvocation = false That was it! I updated the value last week with false but it was commented out! Too much time passed between then and now! I guess the default is true? I would hope you would not get this behavior unless you specify the need yourself??? On 4/9

Re: WildCards and Results

2007-04-09 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > I am discovering that both > http://localhost:8080/dsms/course_create.action AND > http://localhost:8080/dsms/course!create.action work > the same way. Is this a feature? This is the sort of > voodoo that should probably be cast out! Does turning off dynamic metho

Re: WildCards and Results

2007-04-09 Thread stanlick
Ted -- After refactoring my app to use the S2 Dynamic Method Invocation as follows: /pages/course.jsp /pages/course.jsp I am discovering that both http://localhost:8080/dsms/course_create.action AND http://localhost:8080/dsms/course!create.action work the s

Re: WildCards and Results

2007-04-06 Thread stanlick
Ted, you are 2 for 2! Now it's back to changing code. I read the notes on this several times and could never glean this understanding. You really need to finish that book my brother. Thanks, Scott On 4/6/07, Ted Husted <[EMAIL PROTECTED]> wrote: There's a feature embedded in WebWork that lets t

Re: WildCards and Results

2007-04-06 Thread Aram Mkhitaryan
"!" is a special character means that if you have action which name is "do" and in struts.properties you have struts.enable.DynamicMethodInvocation=true which is the default value, then if the request is "do_namespace/do!firstMethod" will invoke the firstMethod. If you specify action name alrea

Re: WildCards and Results

2007-04-06 Thread Ted Husted
There's a feature embedded in WebWork that lets the "!" character invoke a method other than execute. In WebWork, it doesn't really have a name. During the S2 discussions, we coined the term "dynamic method invocation" to describe how WW/S2 use the ! notation. For Struts 2, we added a switch to d

Re: WildCards and Results

2007-04-06 Thread stanlick
since '!' is already a special character which specifies the method name automatically see struts.properties configuration file for more details about how to enable/disable dynamic method invocation Can you explain this? I read all I could find on this topic and their was discussion dating back

Re: WildCards and Results

2007-04-05 Thread Aram Mkhitaryan
As Ted wrote those methods should return Strings which will determine the result to be shown. String myCustomMethod() { if(1) return "result1"; else return "result2"; } /pages/course1.jsp /pages/course2.jsp Also I do not recommend to define action name like since '!' is alread

Re: WildCards and Results

2007-04-05 Thread Ted Husted
Since the methods do not return a String containing the result to match, I'm not sure how to direct Struts to display a page. All such methods should return a String, just like the canonical execute method. In other words, execute is the default Action method (or "alias"). Other methods can be

Re: WildCards and Results

2007-04-04 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > Have you ever been so close to the tree that... Trees actually lie in wait for me and chuckle to themselves in anticipation :/ d. Looking for earth-friendly autos? Browse Top

Re: WildCards and Results

2007-04-04 Thread stanlick
Have you ever been so close to the tree that... Thanks d. On 4/4/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- [EMAIL PROTECTED] wrote: > public void remove() > public void update() > ... Why aren't you returning a value from the methods? I thought that was how S2 determined what result to s

Re: WildCards and Results

2007-04-04 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > public void remove() > public void update() > ... Why aren't you returning a value from the methods? I thought that was how S2 determined what result to show. d. No need to mis

Re: WildCards and Results

2007-04-04 Thread stanlick
Hey d! -- public void remove() public void update() ... Scott On 4/4/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- [EMAIL PROTECTED] wrote: > Since the methods do not return a String containing > the result to match, I'm not sure how to direct > Struts to display a page. What do they return

Re: WildCards and Results

2007-04-04 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > Since the methods do not return a String containing > the result to match, I'm not sure how to direct > Struts to display a page. What do they return? d. 8:00? 8:25? 8:40? Fi

WildCards and Results

2007-04-04 Thread stanlick
I have an Action with several methods in it. I have no problem invoking the correct method using course!whatever, but I can't seem to figure out how to get the correct web page to appear following the method call. Since the methods do not return a String containing the result to match, I'm not s