Re: Wicket 1.5 - Generic JSON Response

2012-09-27 Thread oggie
Ahijah wrote Martin Grigorov-4 wrote On Thu, Apr 12, 2012 at 7:38 AM, Ahijah lt; darren.greer@ gt; wrote: mountResource(/Feed2, new MyResourceReference()); class MyResourceReference extends ResourceReference { public IResource getResource() { return new MyResource(); } } Thanks

Re: Wicket 1.5 - Generic JSON Response

2012-09-27 Thread Martin Grigorov
IAuthorizationStrategy is not used for IResource at the moment. You need to roll something yours for this check. On Thu, Sep 27, 2012 at 3:37 PM, oggie gog...@gmail.com wrote: Ahijah wrote Martin Grigorov-4 wrote On Thu, Apr 12, 2012 at 7:38 AM, Ahijah lt; darren.greer@ gt; wrote:

Re: Wicket 1.5 - Generic JSON Response

2012-09-27 Thread oggie
Any suggestions on how I might roll my own? I tried a few things like injecting the Feed class and annotating it, but I suspect it's too late at that point. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-Generic-JSON-Response-tp4550807p4652442.html Sent

Re: Wicket 1.5 - Generic JSON Response

2012-09-27 Thread Martin Grigorov
There is no code in Wicket that will check for this annotation in non-Component classes. On Thu, Sep 27, 2012 at 4:17 PM, oggie gog...@gmail.com wrote: Any suggestions on how I might roll my own? I tried a few things like injecting the Feed class and annotating it, but I suspect it's too late

Re: Wicket 1.5 - Generic JSON Response

2012-04-12 Thread Martin Grigorov
On Thu, Apr 12, 2012 at 7:38 AM, Ahijah darren.gr...@gmail.com wrote: Thanks for the tip, that definitely sounds like the way to go.  Quick follow-up, how does one mount an AbstractResource within the application. There doesn't appear to be an Abstract reference class to instantiate using

Re: Wicket 1.5 - Generic JSON Response

2012-04-12 Thread Ahijah
Martin Grigorov-4 wrote On Thu, Apr 12, 2012 at 7:38 AM, Ahijah lt;darren.greer@gt; wrote: mountResource(/Feed2, new MyResourceReference()); class MyResourceReference extends ResourceReference { public IResource getResource() { return new MyResource(); } } Thanks Martin! For

Re: Wicket 1.5 - Generic JSON Response

2012-04-12 Thread Andrew Geery
If you have a number of JSON end-points, the best architecture would probably be to use Spring MVC to do the JSON handling, and then map the Spring MVC paths into your web app using the Wicket filter ignore paths option (

Wicket 1.5 - Generic JSON Response

2012-04-11 Thread Ahijah
I've been working on various implementations of this all day, to try and output a simple JSON response, as Content-Type: application/json, with absolutely no luck. My current class is setup as below. However, when sending a request to the Feed URL, it comes back as text/plain, with the JSON

Re: Wicket 1.5 - Generic JSON Response

2012-04-11 Thread Dan Retzlaff
Hi, Ahijah. I think you should use a resource for this, not a page. Something like: class MyResource extends AbstractResource { ResourceResponse newResourceResponse(Attributes a) { ResourceResponse r = new ResourceResponse(); r.setContentType(application/json);

Re: Wicket 1.5 - Generic JSON Response

2012-04-11 Thread Ahijah
Thanks for the tip, that definitely sounds like the way to go. Quick follow-up, how does one mount an AbstractResource within the application. There doesn't appear to be an Abstract reference class to instantiate using something like: mountResource(/Feed2, new ResourceReference(Feed2.class));