I'm working on Grails 2.4.4 and have an action that renders this way:
def subjects = [...] render(contentType:"text/xml", encoding:"UTF-8") { 'result' { 'patients' { subjects.each { person -> delegate.patient { uid(person.uid) firstName(person.firstName) lastName(person.lastName) ... } } } ...
On the same controller I have a 'getPatient' action, and that action is invoked when the XML render is processed, from this line: delegate.patient
I tried with "delegate" (it seems the delegate there is the controller itself), I tried also quoting the node like 'patient' { ... }, but getPatient is called every time.
Is there a way of making this XML render work without changing the getPatient action name?
No comments:
Post a Comment