The REST plugin seems to address the vanilla cases of restful URLs:

- /hair/bears/furbolg
- /hair/bears/furbolg/1

or even my preferred form

- /hair/bears/furbolg/firbolg-1

If I have a FurbolgController (or FurbolgAction) and define the right
methods, it works like magic.

However, following the RESTFul logic of having sensible URLs for every
useful resource, how can I use it for a put to, say, replace a certain
field only of all the items of interest in a range or set of ranges:

- /hair/bears/furbolg/12-14+16-18/coat-color

It seems to me I should be able to specify the single value in quotes as
the JSON body for that one and pass it to my business logic rather than
having to operate at the record level and truck around all the data I
don't care about to do the field-level updates. The example is contrived
but field-level updates are useful in edit-in-place AJAX scenarios.

I know I can coax anything I want out of Spring MVC for this kind of
job. It allows for arbitrary mappings from URL elements to controller
method parameters when matching URLs to controllers and methods (similar
to ASP.NET MVC, well, vice versa really). How would I do it in Struts?
Am I beyond the capabilities of the REST plugin? Outside the vibe?

I checked the list archives for the past year and looked at the examples
on the web but didn't see anything that looked like it had the potential
to address this. However, Struts is a very clever framework and maybe
the pieces of the solution are sitting in front of me and I just haven't
recognized where they fit together. Anybody want to clue me in?

Ralph



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to