添加下面RegisterCommand:
String organisation
String landline
String mobile
static constraints = { ...
organisation blank: false
mobile blank: false
}
添加下面User.groovy
域:
String organisation
String landline
String mobile
static constraints = {
...
mobile nullable:false
organisation nullable:false
}
其添加到index.gsp
:
<s2ui:textFieldRow name='organisation' bean="${command}" value="${command.organisation}"
size='40' class='form-control' labelCodeDefault='Organisation' labelCode='user.organisation.label'/>
<s2ui:textFieldRow name='mobile' bean="${command}" value="${command.mobile}"
size='40' class='form-control' labelCodeDefault='Mobile' labelCode='user.mobile.label'/>
<s2ui:textFieldRow name='landline' bean="${command}" value="${command.landline}"
size='40' class='form-control' labelCodeDefault='Landline' labelCode='user.landline.label'>
參考link