-
Notifications
You must be signed in to change notification settings - Fork 5
g:selectPrimary entire input values
Vahid Hedayati edited this page Aug 13, 2014
·
3 revisions
<g:selectPrimary
id="MyContinent2" // Required - your objectID referred to by css has no importance
setId="MyCountry" // Required the ID of your next selectBox to update actions
name="MyContinent" // Required - your form field name
noSelection="['': 'Please choose Continent']" //default message for
controller = "something" // Optional - default "autoComplete" (part of this plugin)
action = "something" // Optional - default "ajaxSelectSecondary" (part of this plugin)
appendValue='*' // Optional set a value to be appended to the list
appendName='All Items' // If you set appendValue then set the display name for it
bindid="mycontinent.id" // Explained above in example domainClasses
domain='yourApp.MyContinent' // Required your primary domainClass full classpath.
searchField='continentName' // Required - search for field called contintentName
collectField='id' // Required : if not defaults to searchField value
domain2='yourApp.MyCountry' // Required your secondary depenent domainClass full classpath.
searchField2='countryName' // Required - search for field called contintentName
collectField2='id'
required="false" // optional add this if you wish to disable required set by default
value="${params.MyContinent}" // your value if you are posting form back
autocomp="1" // Optional - set this if you wish for your next box to be
autoComplete box - refer to main page and look for it for more info
// FILTERING selectPrimary -----------------------------------------------------------------------------------------
//Optional Filtering methods 0.27+ To enable filtering add the following
filter='_ON' // If you provide _ON it will provide a tick box when use selects and inputs terms
// it will then match return results to match their filter - reducing overall select items
// Please note if you set this to "F" then it will not show the tick box and default all return results starting with F
hidden="hiddenNew"<br> //The hidden field name to store user search output - unsure what to be used for
filterDisplay="none" // Optional default = display All. This set to anything besides all (default value) will ensure nothing is returned with filtering
// by default if nothing put in filter box or ticked etc it will display all records,
// enable this option and assign some value to stop it from showing records unless matching search
filterType ="A" // Optional default = Wildcard. Type of filter no definition for wild card S = start of string E ending of string
// so E = Char A = chinA S = Char C = Chine no filterType = Char H = cHina or any other matching chars
filter2="B" // This will ensure next secondary is now filtering by B - no need to define filtering in next secondary
// You need to set this for your next secondary call.
// so in selectPrimary if you want your next secondary to filter for B then set this
// you should be able to set filterType2=E for ending records matching B
//
// filter="_ON" required by all selectPrimary/Secondary that needs user defined filtering
// filter="SOMETHING" required only by selectPrimary
// filter2="something" required by selectPrimary for next Secondary call
// -- or by selectSecondary for its next secondary call - refer to examples page on sample project
// END FILTERING ----------------------------------------------------------------------------------------------------
// Options for enable edit mode of select boxes: (refer to main page for more information)
// To get this going you need to enable a new tag called secondaryValue which needs to
// be set to the value of what is returned to your next selection
value="${mydomainClass.primaryValue}"
secondaryValue="${mydomainClass.secondaryValue}"
/>