Reputation: 141
I have seen a grails domain class having something like this defined:
static formLayout =
[ title:"New Patient Patient",
layout: "custom",
autoHeight:true,
items:
[
[
layout: 'column',
labelWidth: 135,
items:
[[
columnWidth: 0.5,
layout: 'form',
items:["patientNo", "dob","surName"]
],[
columnWidth: 0.5,
layout: 'form',
items:["responsibleDoctor","givenName","sex.value"]
]]
],
...
]
All I want to know is how can this be used/called either from an extjs file or controller file so it appears as a form.
Upvotes: 0
Views: 91
Reputation: 5538
This is not a common approach to have javaScript parameters defined in Domain classes for the consumption of the views.
However, Assuming that you are looking at a code base that applied such approach, if I am not mistaken the view that is consuming them is sending an ajax call to a controller and reads these values as JSON. I am not much familiar with extJs, but it should be able to consume parameters as JSON. For example, Ext.create
has option url that hits the external source. If you are looking at a code base that is using this approach you should be able find the view and controller that is delivering and consuming it.
Upvotes: 1