[ 
https://issues.apache.org/jira/browse/OFBIZ-2778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743232#action_12743232
 ] 

Bob Morley commented on OFBIZ-2778:
-----------------------------------

Yep makes sense -- really we are just talking about how we implement the 
"jsoning" of the attributes.  It is reasonable to do this in an ftl as outlined 
here; my original plan was actually to do just that but I leaned towards the 
java class because I saw this as a "framework" behaviour -- something that you 
are not likely to want adjusted by an ofbiz user.  Having said that, it is 
certainly reasonable to do this in ftl instead of the java class.

If we feel I should convert this to ftl and remove the java class on the 
RequestHandler let me know; I can certainly do that.  :)  I am assuming that 
the event response code is available in the context to the ftl?  (There is 
value in telling the client if the request was "success", "error", or any 
custom response.

> Alter Json controller requests to move json behaviour to response (from event)
> ------------------------------------------------------------------------------
>
>                 Key: OFBIZ-2778
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2778
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Bob Morley
>         Attachments: json.diff
>
>
> I think it would be better to apply the Json behaviour of a controller 
> request to the response and not by having multiple Json event types.  These 
> event types always seem to be a wrapped call to another event type that only 
> adds identical Json behaviour (ie. JsonServiceEventHandler wraps 
> ServiceEventHandler and simply adds a Json string to the response).
> Attached is a patch with this change implemented on the "Mark Viewed" 
> function in Order Manager.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to