On Thu, Sep 15, 2011 at 6:33 PM, Milorad <mrdos...@hotmail.com> wrote:
> That's exactly what I did. I made my URIs to look like > '/{TableName}/{Action}/{ID}' (for instance: '/Users/modify/2') and then my > generic resource knows what to do and which data to show. > Thanks for your help, still i think it's a shame that objects cannot be > attached, but surely there's a good reason for that. > You *can* attach object instances, but the type of object that you attach in that case must be Restlet. Resources are attached as factories (Class objects) so that handler code can work with a new resource instance for each request and not have to worry about concurrency issues. If you want the most generic handling, express your resource as a Restlet and override handle(Request, Response). In doing so, you'd giving up a lot of what makes the Restlet framework so appealing, but that's your call. --tim ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2839914