Thanks guys... quick update... I took yesterday off, so I'm not quite as
far as I would have liked :) It *is* memorial day weekend after all!
However, I did on Friday get reasonably far... at this moment, I have
XML input working for simple (i.e., non-collection) Action fields, as
well as output (although I think the output part needs a little
tightening up). Doing JSON will just be a matter of taking the existing
class and modifying it for JSON rather than XML, the basic outline is
the same.
On a side note, is there any code under Apache anywhere to parse and
create JSON server-side yet? Might make a reasonable Commons component,
although I'm not sure it's really big enough for that :) (Probably
would fit better in Silk would be my guess)
I may work on it a bit more tonight, not sure yet... have some friends
coming over, so it might turn into a "do nothing productive" night :)
Ted and Jason, I did see your messages about AroundInterceptor and
Result correspondingly... right now, in the interest of simply getting
it working, I'm just doing a simple AroundInterceptor using before() and
after(), one interceptor for XML and one for JSON (although as I just
wrote that it dawned on me that that probably won't work because mixing
XML and JSON probably won't work... might have to combine them and allow
configuration... I'll see...)
I read up on Restults a bit yesterday, and I can certainly see why you'd
say that Jason... this still feels to me like something that should
really be just an interceptor though... but, the code is at this point
generic enough that moving it or putting it in a different form
shouldn't be a big deal, so that can be decided later... lemme just get
it all working first :)
Frank
Ted Husted wrote:
The AroundInterceptor is an abstraction (that we've recently discussed
deprecating).
The cannonical idiom is to to call {{invocaton.invoke();}} to separate
any "before" code from any "after" code. The invoke method let any
other Interceptors and the Action fire.
The simplest example might from be the XWork TimerInterceptor:
long startTime = System.currentTimeMillis();
String result = invocation.invoke();
long executionTime = System.currentTimeMillis() - startTime;
-Ted.
On 5/25/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
See, I learned something already... I thought there was a difference
between Interceptors that fire before and after an Action, now I see it's
just before() and after() methods of AroundInterceptor, so it's just two
Interceptors, AjaxXMLIOInterceptor and AjaxJSONIOInterceptor. This is
*already* a worthwile exercise! :)
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]