On Apr 12, 2005 6:12 AM, Joe Germuska <[EMAIL PROTECTED]> wrote: > This seems like a generally useful strategy. Is your intention to > name another method to which control would be dispatched? In that > case, what if that name failed too -- just throw an exception at that > point? > > How would you configure the name of the fallback method? Would you > define a constant method name like "onLookupFailure" and then advise > implementors to create a method with that name and their preferred > signature?
I'd prefer to see us have a consistent mechanism for (a) when a method name is not provided and (b) when it's provided but the method doesn't exist. For (a), we already have the 'unspecified' method, so I'd prefer to see us add a 'fallback' (or something) method in the same manner. That would also be the simplest option. Alternatively, if we want to make it more configurable (which I'm not convinced is necessary), we should do that for both cases. -- Martin Cooper > Anyway, I'd suggest filing an "enhancement" ticket in Bugzilla and if > you can attach patches to implement this, so much the better! > > http://issues.apache.org/bugzilla/enter_bug.cgi?product=Struts > > Joe > > > At 12:23 PM +0200 4/12/05, Giovanni Santini wrote: > >Hi, > > We use a Dispatch Action for each setup screen that we've to develop. > >Setup screen are called from overview and workflow screen. I think it's good > >to add in the NoSuchMethodException a call to a method, something like > >"getFallbackMethod" defined in the dispatch action base class. In that case > >if the user overwritten this method can call a fallback method (or default > >method) without mapping all external call. > >What do you think? > > Graag gedaan > > -- > Joe Germuska > [EMAIL PROTECTED] > http://blog.germuska.com > "Narrow minds are weapons made for mass destruction" -The Ex > > --------------------------------------------------------------------- > 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]