[jira] [Assigned] (OFBIZ-3365) Clean JSON Service Event Handler

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Assigned] (OFBIZ-3365) Clean JSON Service Event Handler

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacopo Cappellato reassigned OFBIZ-3365:
----------------------------------------

    Assignee: Jacopo Cappellato  (was: Scott Gray)

> Clean JSON Service Event Handler
> --------------------------------
>
>                 Key: OFBIZ-3365
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3365
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Frank Lam
>            Assignee: Jacopo Cappellato
>            Priority: Minor
>         Attachments: cleanjson.patch
>
>
> I ran into a small issue while using org.ofbiz.webapp.event.JSONServiceEventHandler (typically referred to as "jsonservice" in controller files).  If I defined my service as such:
> <service name="foo" engine="java" location="my.Class" invoke="someFunction">
> <attribute name="mylist" mode="OUT" type="List" optional="true"/>
> </service>
> I would get the following in the content of my response:
> {"targetRequestUri":"/foo","thisRequestUri":"foo","mylist":[{some:stuff}],"multiPartMap":{},"_CONTROL_PATH_":"/myapp/control","_CONTEXT_ROOT_":"/Users/me/Documents/workspace/ofbiz/hot-deploy/mycomponent/webapp/myapp/","_SERVER_ROOT_URL_":"http://localhost:8080"}
> where I would prefer to receive simply:
> {"mylist":[{some:stuff}]}
> I've added another event handler to try to resolve this problem.  The patch is attached.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)