Re: Result types for S1

2007-12-13 Thread Antonio Petrelli
2007/12/13, Frank W. Zammetti <[EMAIL PROTECTED]>: > Antonio Petrelli wrote: > > 2007/12/13, Frank W. Zammetti <[EMAIL PROTECTED]>: > >> if we simply say that if it DOESN'T begin with a slash, > >> then it means something else, be it a template or class, or something > >> else, how would you feel a

Re: Result types for S1

2007-12-13 Thread Frank W. Zammetti
Martin Cooper wrote: And I'm trying to avoid hacks like "special" values (or "special" anythings) that only lead to trouble. People will end up (re)using the same names, not realising that they're already "taken" for something they may not even care about, the end result being debugging hell. A

Re: Result types for S1

2007-12-13 Thread Martin Cooper
On Dec 13, 2007 9:14 PM, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > Martin Cooper wrote: > > Given the following paragraphs, I think we might be on different > planets. > > ;-) > > Could be... some would say I rent a summer home on some distant world :) > > > I don't see that you need Freemark

Re: Result types for S1

2007-12-13 Thread Frank W. Zammetti
Martin Cooper wrote: Given the following paragraphs, I think we might be on different planets. ;-) Could be... some would say I rent a summer home on some distant world :) I don't see that you need Freemarker or anything like it, nor do I see any reason you couldn't continue to use the json-l

Re: Result types for S1

2007-12-13 Thread Martin Cooper
On Dec 13, 2007 10:59 AM, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > Martin Cooper wrote: > > 1) We simply provide servlets / other entry points that can accomplish > the > > rendering to JSON / XML / whatever. The developer can then configure > those > > as global forwards and use them as any

Re: Result types for S1

2007-12-13 Thread Frank W. Zammetti
Frank W. Zammetti wrote: >> Another way to do it might be to subclass ActionForward, calling it >> Result. Then, after the Action executes, we try to cast the result to >> Result, and if we catch a ClassCastException, then we have a plain old >> ActionForward and we process it same as always

Re: Result types for S1

2007-12-13 Thread Paul Benedict
You might be totally right. Thanks for helping my brain along. In fact, the new execute method should probably be for classes which do not extend Action. Because everything is stuck in TLS, it's always accessible. For regular POJO, use the new way. Paul On Dec 13, 2007 4:59 PM, Frank W. Zammetti

Re: Result types for S1

2007-12-13 Thread Frank W. Zammetti
Paul Benedict wrote: I said new method, I didn't say replace the previous method :-) I wouldn't implement anything that didn't allow current Struts actions to work. It's all blue sky thinking so there's a lot you can help me figure out. No, I knew you wouldn't do that... although it wasn't init

Re: Result types for S1

2007-12-13 Thread Paul Benedict
I said new method, I didn't say replace the previous method :-) I wouldn't implement anything that didn't allow current Struts actions to work. It's all blue sky thinking so there's a lot you can help me figure out. On Dec 13, 2007 3:01 PM, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > Paul Bene

Re: Result types for S1

2007-12-13 Thread Frank W. Zammetti
Paul Benedict wrote: I am all for it. I was thinking the framework needs these additional enhancements to support it though: * A new Command to expose the ActionContext as a ThreadLocal variable * New execute() method could then contain no parameters * Allow returning void (equal to null), Strin

Re: Result types for S1

2007-12-13 Thread Paul Benedict
I am all for it. I was thinking the framework needs these additional enhancements to support it though: * A new Command to expose the ActionContext as a ThreadLocal variable * New execute() method could then contain no parameters * Allow returning void (equal to null), String (result/forward name)

Re: Result types for S1

2007-12-13 Thread Frank W. Zammetti
Paul Benedict wrote: I find it more palatable to introduce the tag with a type, Frank and Atonio. Yes, I would agree that a is a shorthand for a . I definitely do not want to build a Struts 2 look-a-like, but it does make sense for a back port for some of its good idea. Well, I wouldn't be at

Re: Result types for S1

2007-12-13 Thread Frank W. Zammetti
Antonio Petrelli wrote: 2007/12/13, Frank W. Zammetti <[EMAIL PROTECTED]>: if we simply say that if it DOESN'T begin with a slash, then it means something else, be it a template or class, or something else, how would you feel about that? It seems like Tiles definition names... Are you saying

Re: Result types for S1

2007-12-13 Thread Paul Benedict
I find it more palatable to introduce the tag with a type, Frank and Atonio. Yes, I would agree that a is a shorthand for a . I definitely do not want to build a Struts 2 look-a-like, but it does make sense for a back port for some of its good idea. Paul On Dec 13, 2007 2:00 PM, Antonio Petrell

Re: Result types for S1

2007-12-13 Thread Antonio Petrelli
2007/12/13, Frank W. Zammetti <[EMAIL PROTECTED]>: > if we simply say that if it DOESN'T begin with a slash, > then it means something else, be it a template or class, or something > else, how would you feel about that? It seems like Tiles definition names... Antonio

Re: Result types for S1

2007-12-13 Thread Antonio Petrelli
2007/12/13, Paul Benedict <[EMAIL PROTECTED]>: > I don't think it's a good idea to repurpose the attribute. It's > not identical to in s2 with a type. I would truly recommend a > different kind of tag here. In fact a is a , but not the opposite. Probably a could be a synonym of ... Antonio -

Re: Result types for S1

2007-12-13 Thread Frank W. Zammetti
What do you think of the idea of a being able to map to a Freemarker template, or maybe even a class? I wouldn't view this as repurposing it myself because the destination of a forward is someting that renders a response... Typically it maps to a URI that is forwarded or redirected to, but bo

Re: Result types for S1

2007-12-13 Thread Paul Benedict
I don't think it's a good idea to repurpose the attribute. It's not identical to in s2 with a type. I would truly recommend a different kind of tag here. Paul On Dec 13, 2007 12:43 PM, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > Laurie Harper wrote: > > Or stick with mapping.findForward(som

Re: Result types for S1

2007-12-13 Thread Frank W. Zammetti
Martin Cooper wrote: 1) We simply provide servlets / other entry points that can accomplish the rendering to JSON / XML / whatever. The developer can then configure those as global forwards and use them as any other forward. This makes the process identical to what developers do now, but gives th

Re: Result types for S1

2007-12-13 Thread Frank W. Zammetti
Laurie Harper wrote: Or stick with mapping.findForward(something) but provide a mechanism for mapping that result type to the appropriate (JSON/XML/etc) rederer in struts-config.xml. That would eliminate any concern over clashes with existing action return strings (small though the risk is), an

Re: Result types for S1

2007-12-13 Thread Martin Cooper
On Dec 12, 2007 10:12 PM, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > So, now that I've gotten my build problems sorted out, I was able to > make some quick progress on what I wanted to work on, enough that I want > to run this by everyone before I spit, polish and submit patches. > > Ted and I

Re: Result types for S1

2007-12-13 Thread Laurie Harper
Frank W. Zammetti wrote: Hi Antonio, Antonio Petrelli wrote: 2007/12/13, Frank W. Zammetti <[EMAIL PROTECTED]>: return mapping.findForward("JSONResultType"); I don't like this syntax, because it mixes the concept of forward (to a page) with the rendering of the ActionForm. Probably a more spe

Re: Result types for S1

2007-12-13 Thread Frank W. Zammetti
Hi Antonio, Antonio Petrelli wrote: 2007/12/13, Frank W. Zammetti <[EMAIL PROTECTED]>: return mapping.findForward("JSONResultType"); I don't like this syntax, because it mixes the concept of forward (to a page) with the rendering of the ActionForm. Probably a more specific ActionMapping met

Re: Result types for S1

2007-12-13 Thread Antonio Petrelli
2007/12/13, Frank W. Zammetti <[EMAIL PROTECTED]>: > > return mapping.findForward("JSONResultType"); I don't like this syntax, because it mixes the concept of forward (to a page) with the rendering of the ActionForm. Probably a more specific ActionMapping method, or different types of ActionForw