History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-1473
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: tm_jee
Reporter: tm_jee
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WebWork

RestfulActionMapper should return null for both getMapping(HttpServletRequest) and getUrlFromActionMapping(ActionMapping) method when it cannot handle the situation

Created: 25/Aug/07 10:41 AM   Updated: 25/Aug/07 10:50 AM
Component/s: Dispatch
Affects Version/s: 2.2.6
Fix Version/s: 2.2.7


 Description  « Hide
RestfulActionMapper should return null for both getMapping(HttpServletRequest) and getUrlFromActionMapping(ActionMapping) method when it cannot handle the situation.

RestulActionMapper doesn't take into account namespace, say

eg.
if a namepace is specified in ActionMapping, RestfulActionMapper should return null when getUrlFromActionMapping(ActionMapping) is called.

eg.
if a request with extension is requested ( http://HOST/CONTEXT/ACTION.extension
ResfulActionMapper should return null when getMapping(HttpServletRequest) is invoked.

This is such that we could use CompositeActionMapper with ActionMapper like RestfulActionMapper and having DefaultActionMapper as the fallback ActionMapper. Generally i guess what I'm try to say is that ActionMapper should only handle the sitation that it could handle and return null if its out of its context such that we could cascade ActionMappers together using CompositeActionMapper.

cheers. :)

 All   Comments   Change History      Sort Order:
tm_jee - [25/Aug/07 10:48 AM ]
tmjee@tmjee-laptop:~/development/webwork-svn/src$ svn commit test/com/opensymphony/webwork/dispatcher/mapper/RestfulActionMapperTest.java java/com/opensymphony/webwork/dispatcher/mapper/ActionMapper.java java/com/opensymphony/webwork/dispatcher/mapper/RestfulActionMapper.java
Sending java/com/opensymphony/webwork/dispatcher/mapper/ActionMapper.java
Sending java/com/opensymphony/webwork/dispatcher/mapper/RestfulActionMapper.java
Sending test/com/opensymphony/webwork/dispatcher/mapper/RestfulActionMapperTest.java
Transmitting file data ...
Committed revision 2949.

Kindly review. Cheers.