Skip to content

Multi domainClass loading

Vahid Hedayati edited this page May 22, 2014 · 1 revision

g:selectPrimary/Secondary Multi domainClass loading:

Feature since 0.34

This allows you to load up domain3, domain4, domain5, domain6, domain7, domain8 per Primary or Secondary Call. Each of them can then have the same nesting meaning some wild dependencies can be created and complex selecting provided.

The how to:

<g:selectPrimary id="MyDepartments" name="MyDepartments"
domain='ajaxdependancyselectexample.Departments'
searchField='name'
collectField='id'
noSelection="['': 'Please choose Department']" 

domain2='ajaxdependancyselectexample.Employee'
bindid="department.id"
searchField2='name'
collectField2='id'
setId="employeeID"


domain3='ajaxdependancyselectexample.Documents'
bindid3="department.id"
searchField3='name'
collectField3='id'
setId3="documentsId"
filter3="L"

value=''/>

<g:select name="employee" id="employeeID" optionKey="id" optionValue="name" from="[]" required="required" noSelection="['': 'Please choose department']" /> <g:select name="document" id="documentsId" optionKey="id" optionValue="name" from="[]" required="required" noSelection="['': 'Please choose department ']" />

So in a Primary block or Secondary Block simply create a new element that kind of follows the domain2 object but in short everything ends with the correct numbering sequence.

Clone this wiki locally