grails - groovy.lang.MissingPropertyException -


i have been trying use dynamic scaffolding in groovy on grails see list of tasks. domain class follows

package projecttracker  import java.util.date;  class task  {     string name     string description     date duedate      string tostring() {         "${name}"     }      static belongsto = [enduser: enduser ,project: project]      static constraints = {          name()         description()         duedate()      } } 

my controller class follows:

package projecttracker  class taskcontroller {     def scaffold =true       def index() {         redirect(action:list)     } } 

but, whenever call index method of task controller, following error occurs:

uri :     /projecttracker/task/index class:    groovy.lang.missingpropertyexception message:  no such property: list class: projecttracker.taskcontroller possible solutions: edit, flash, class around line 7 of grails-app\controllers\projecttracker\taskcontroller.groovy 4:  def scaffold =true  5: 6:    def index() { 7:      redirect(action:list) 8:  } 9:} 

can tell me, how define list method here? in advance.

make sure use string method name, , scaffold variable must static, i.e.

static scaffold = true

def index() { redirect(action:'list') }


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -