Japanese Tag - form

Last updated by admin 4 years ago

?? - form

?? Description

Creates a form that submits to a controller, action, and/or id. Beyond what is below all the usual HTML attributes apply. controller, action, id???????????????????????HTML???????????????

????? Parameters

  • action (??) - ?????????????????????????????????????????the name of the action to use in the link, if not specified the default action will be linked
  • controller (??) - ???????????????????????????????????????????the name of the controller to use in the link, if not specified the current controller will be linked
  • id (??) - ????????id? The id to use in the link
  • url (??) - ction,controller,id,?????MAP?A map containing the action,controller,id etc.

? Examples

Example controller for an application called "shop": "shop"??????????????????????????

class Book {
def list = { [ books: Book.list( params ) ] }
def show = { [ book : Book.get( params['id'] ) ] }
}
Example usages for above controller: ???????????????
<g:form name="myForm" action="myaction" id="1">...</g:form>
<g:form name="myForm" url="[action:'list',controller:'book']">...</g:form>