Changeset 35 for trunk/src/grails-app
- Timestamp:
- Jan 26, 2009, 5:26:11 AM (16 years ago)
- Location:
- trunk/src/grails-app
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/grails-app/domain/Person.groovy
r21 r35 1 1 class Person { 2 PersonGroup personGroup3 2 String firstName 4 3 String lastName … … 16 15 17 16 static constraints = { 18 firstName( )19 lastName( )17 firstName(maxSize:50,blank:false) 18 lastName(maxSize:50,blank:false) 20 19 employeeID(blank:true, nullable:true) 21 20 } -
trunk/src/grails-app/domain/PersonGroup.groovy
r21 r35 7 7 static hasMany = [persons : Person] 8 8 9 static belongsTo = PersonGroup 9 static constraints = { 10 name(maxSize:50,unique:true,blank:false) 11 description(maxSize:100) 12 } 10 13 11 14 String toString() { -
trunk/src/grails-app/domain/PersonGroupType.groovy
r21 r35 6 6 static hasMany = [personGroups : PersonGroup] 7 7 8 static constraints = { 9 name(maxSize:50,unique:true,blank:false) 10 description(maxSize:100) 11 } 12 8 13 String toString() { 9 14 "${this.name}" -
trunk/src/grails-app/domain/TaskGroup.groovy
r25 r35 1 1 class TaskGroup { 2 2 String name 3 String description 3 String description = "" 4 4 boolean isActive = true 5 5 … … 7 7 8 8 static constraints = { 9 name( blank:false)10 description( blank:false)9 name(maxSize:50,unique:true,blank:false) 10 description(maxSize:100) 11 11 } 12 12 -
trunk/src/grails-app/views/person/create.gsp
r21 r35 32 32 </td> 33 33 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'firstName','errors')}"> 34 <input type="text" id="firstName" name="firstName" value="${fieldValue(bean:personInstance,field:'firstName')}"/>34 <input type="text" maxlength="50" id="firstName" name="firstName" value="${fieldValue(bean:personInstance,field:'firstName')}"/> 35 35 </td> 36 36 </tr> … … 41 41 </td> 42 42 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'lastName','errors')}"> 43 <input type="text" id="lastName" name="lastName" value="${fieldValue(bean:personInstance,field:'lastName')}"/>43 <input type="text" maxlength="50" id="lastName" name="lastName" value="${fieldValue(bean:personInstance,field:'lastName')}"/> 44 44 </td> 45 45 </tr> … … 63 63 </tr> 64 64 65 <tr class="prop">66 <td valign="top" class="name">67 <label for="personGroup">Person Group:</label>68 </td>69 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'personGroup','errors')}">70 <g:select optionKey="id" from="${PersonGroup.list()}" name="personGroup.id" value="${personInstance?.personGroup?.id}" ></g:select>71 </td>72 </tr>73 74 65 </tbody> 75 66 </table> -
trunk/src/grails-app/views/person/edit.gsp
r21 r35 34 34 </td> 35 35 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'firstName','errors')}"> 36 <input type="text" id="firstName" name="firstName" value="${fieldValue(bean:personInstance,field:'firstName')}"/>36 <input type="text" maxlength="50" id="firstName" name="firstName" value="${fieldValue(bean:personInstance,field:'firstName')}"/> 37 37 </td> 38 38 </tr> … … 43 43 </td> 44 44 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'lastName','errors')}"> 45 <input type="text" id="lastName" name="lastName" value="${fieldValue(bean:personInstance,field:'lastName')}"/>45 <input type="text" maxlength="50" id="lastName" name="lastName" value="${fieldValue(bean:personInstance,field:'lastName')}"/> 46 46 </td> 47 47 </tr> … … 99 99 <tr class="prop"> 100 100 <td valign="top" class="name"> 101 <label for="personGroup">Person Group:</label>102 </td>103 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'personGroup','errors')}">104 <g:select optionKey="id" from="${PersonGroup.list()}" name="personGroup.id" value="${personInstance?.personGroup?.id}" ></g:select>105 </td>106 </tr>107 108 <tr class="prop">109 <td valign="top" class="name">110 101 <label for="personGroups">Person Groups:</label> 111 102 </td> -
trunk/src/grails-app/views/person/list.gsp
r21 r35 32 32 <g:sortableColumn property="isActive" title="Is Active" /> 33 33 34 <th>Person Group</th>35 36 34 </tr> 37 35 </thead> … … 50 48 <td>${fieldValue(bean:personInstance, field:'isActive')}</td> 51 49 52 <td>${fieldValue(bean:personInstance, field:'personGroup')}</td>53 54 50 </tr> 55 51 </g:each> -
trunk/src/grails-app/views/person/show.gsp
r21 r35 79 79 80 80 <tr class="prop"> 81 <td valign="top" class="name">Person Group:</td>82 83 <td valign="top" class="value"><g:link controller="personGroup" action="show" id="${personInstance?.personGroup?.id}">${personInstance?.personGroup?.encodeAsHTML()}</g:link></td>84 85 </tr>86 87 <tr class="prop">88 81 <td valign="top" class="name">Person Groups:</td> 89 82 -
trunk/src/grails-app/views/personGroup/create.gsp
r25 r35 29 29 <tr class="prop"> 30 30 <td valign="top" class="name"> 31 <label for="name">Name:</label> 32 </td> 33 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'name','errors')}"> 34 <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:personGroupInstance,field:'name')}"/> 35 </td> 36 </tr> 37 38 <tr class="prop"> 39 <td valign="top" class="name"> 31 40 <label for="description">Description:</label> 32 41 </td> 33 42 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'description','errors')}"> 34 <input type="text" id="description" name="description" value="${fieldValue(bean:personGroupInstance,field:'description')}"/>43 <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:personGroupInstance,field:'description')}"/> 35 44 </td> 36 45 </tr> … … 42 51 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'isActive','errors')}"> 43 52 <g:checkBox name="isActive" value="${personGroupInstance?.isActive}" ></g:checkBox> 44 </td>45 </tr>46 47 <tr class="prop">48 <td valign="top" class="name">49 <label for="name">Name:</label>50 </td>51 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'name','errors')}">52 <input type="text" id="name" name="name" value="${fieldValue(bean:personGroupInstance,field:'name')}"/>53 53 </td> 54 54 </tr> -
trunk/src/grails-app/views/personGroup/edit.gsp
r25 r35 31 31 <tr class="prop"> 32 32 <td valign="top" class="name"> 33 <label for="name">Name:</label> 34 </td> 35 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'name','errors')}"> 36 <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:personGroupInstance,field:'name')}"/> 37 </td> 38 </tr> 39 40 <tr class="prop"> 41 <td valign="top" class="name"> 33 42 <label for="description">Description:</label> 34 43 </td> 35 44 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'description','errors')}"> 36 <input type="text" id="description" name="description" value="${fieldValue(bean:personGroupInstance,field:'description')}"/>45 <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:personGroupInstance,field:'description')}"/> 37 46 </td> 38 47 </tr> … … 44 53 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'isActive','errors')}"> 45 54 <g:checkBox name="isActive" value="${personGroupInstance?.isActive}" ></g:checkBox> 46 </td>47 </tr>48 49 <tr class="prop">50 <td valign="top" class="name">51 <label for="name">Name:</label>52 </td>53 <td valign="top" class="value ${hasErrors(bean:personGroupInstance,field:'name','errors')}">54 <input type="text" id="name" name="name" value="${fieldValue(bean:personGroupInstance,field:'name')}"/>55 55 </td> 56 56 </tr> -
trunk/src/grails-app/views/personGroup/list.gsp
r25 r35 24 24 <g:sortableColumn property="id" title="Id" /> 25 25 26 <g:sortableColumn property="name" title="Name" /> 27 26 28 <g:sortableColumn property="description" title="Description" /> 27 29 28 30 <g:sortableColumn property="isActive" title="Is Active" /> 29 30 <g:sortableColumn property="name" title="Name" />31 31 32 32 <th>Person Group Type</th> … … 40 40 <td><g:link action="show" id="${personGroupInstance.id}">${fieldValue(bean:personGroupInstance, field:'id')}</g:link></td> 41 41 42 <td>${fieldValue(bean:personGroupInstance, field:'name')}</td> 43 42 44 <td>${fieldValue(bean:personGroupInstance, field:'description')}</td> 43 45 44 46 <td>${fieldValue(bean:personGroupInstance, field:'isActive')}</td> 45 46 <td>${fieldValue(bean:personGroupInstance, field:'name')}</td>47 47 48 48 <td>${fieldValue(bean:personGroupInstance, field:'personGroupType')}</td> -
trunk/src/grails-app/views/personGroup/show.gsp
r25 r35 31 31 32 32 <tr class="prop"> 33 <td valign="top" class="name">Name:</td> 34 35 <td valign="top" class="value">${fieldValue(bean:personGroupInstance, field:'name')}</td> 36 37 </tr> 38 39 <tr class="prop"> 33 40 <td valign="top" class="name">Description:</td> 34 41 … … 41 48 42 49 <td valign="top" class="value">${fieldValue(bean:personGroupInstance, field:'isActive')}</td> 43 44 </tr>45 46 <tr class="prop">47 <td valign="top" class="name">Name:</td>48 49 <td valign="top" class="value">${fieldValue(bean:personGroupInstance, field:'name')}</td>50 50 51 51 </tr> -
trunk/src/grails-app/views/personGroupType/create.gsp
r22 r35 29 29 <tr class="prop"> 30 30 <td valign="top" class="name"> 31 <label for="name">Name:</label> 32 </td> 33 <td valign="top" class="value ${hasErrors(bean:personGroupTypeInstance,field:'name','errors')}"> 34 <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:personGroupTypeInstance,field:'name')}"/> 35 </td> 36 </tr> 37 38 <tr class="prop"> 39 <td valign="top" class="name"> 31 40 <label for="description">Description:</label> 32 41 </td> 33 42 <td valign="top" class="value ${hasErrors(bean:personGroupTypeInstance,field:'description','errors')}"> 34 <input type="text" id="description" name="description" value="${fieldValue(bean:personGroupTypeInstance,field:'description')}"/>43 <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:personGroupTypeInstance,field:'description')}"/> 35 44 </td> 36 45 </tr> … … 42 51 <td valign="top" class="value ${hasErrors(bean:personGroupTypeInstance,field:'isActive','errors')}"> 43 52 <g:checkBox name="isActive" value="${personGroupTypeInstance?.isActive}" ></g:checkBox> 44 </td>45 </tr>46 47 <tr class="prop">48 <td valign="top" class="name">49 <label for="name">Name:</label>50 </td>51 <td valign="top" class="value ${hasErrors(bean:personGroupTypeInstance,field:'name','errors')}">52 <input type="text" id="name" name="name" value="${fieldValue(bean:personGroupTypeInstance,field:'name')}"/>53 53 </td> 54 54 </tr> -
trunk/src/grails-app/views/personGroupType/edit.gsp
r22 r35 31 31 <tr class="prop"> 32 32 <td valign="top" class="name"> 33 <label for="name">Name:</label> 34 </td> 35 <td valign="top" class="value ${hasErrors(bean:personGroupTypeInstance,field:'name','errors')}"> 36 <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:personGroupTypeInstance,field:'name')}"/> 37 </td> 38 </tr> 39 40 <tr class="prop"> 41 <td valign="top" class="name"> 33 42 <label for="description">Description:</label> 34 43 </td> 35 44 <td valign="top" class="value ${hasErrors(bean:personGroupTypeInstance,field:'description','errors')}"> 36 <input type="text" id="description" name="description" value="${fieldValue(bean:personGroupTypeInstance,field:'description')}"/>45 <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:personGroupTypeInstance,field:'description')}"/> 37 46 </td> 38 47 </tr> … … 44 53 <td valign="top" class="value ${hasErrors(bean:personGroupTypeInstance,field:'isActive','errors')}"> 45 54 <g:checkBox name="isActive" value="${personGroupTypeInstance?.isActive}" ></g:checkBox> 46 </td>47 </tr>48 49 <tr class="prop">50 <td valign="top" class="name">51 <label for="name">Name:</label>52 </td>53 <td valign="top" class="value ${hasErrors(bean:personGroupTypeInstance,field:'name','errors')}">54 <input type="text" id="name" name="name" value="${fieldValue(bean:personGroupTypeInstance,field:'name')}"/>55 55 </td> 56 56 </tr> -
trunk/src/grails-app/views/personGroupType/list.gsp
r22 r35 24 24 <g:sortableColumn property="id" title="Id" /> 25 25 26 <g:sortableColumn property="name" title="Name" /> 27 26 28 <g:sortableColumn property="description" title="Description" /> 27 29 28 30 <g:sortableColumn property="isActive" title="Is Active" /> 29 30 <g:sortableColumn property="name" title="Name" />31 31 32 32 </tr> … … 38 38 <td><g:link action="show" id="${personGroupTypeInstance.id}">${fieldValue(bean:personGroupTypeInstance, field:'id')}</g:link></td> 39 39 40 <td>${fieldValue(bean:personGroupTypeInstance, field:'name')}</td> 41 40 42 <td>${fieldValue(bean:personGroupTypeInstance, field:'description')}</td> 41 43 42 44 <td>${fieldValue(bean:personGroupTypeInstance, field:'isActive')}</td> 43 44 <td>${fieldValue(bean:personGroupTypeInstance, field:'name')}</td>45 45 46 46 </tr> -
trunk/src/grails-app/views/personGroupType/show.gsp
r22 r35 31 31 32 32 <tr class="prop"> 33 <td valign="top" class="name">Name:</td> 34 35 <td valign="top" class="value">${fieldValue(bean:personGroupTypeInstance, field:'name')}</td> 36 37 </tr> 38 39 <tr class="prop"> 33 40 <td valign="top" class="name">Description:</td> 34 41 … … 41 48 42 49 <td valign="top" class="value">${fieldValue(bean:personGroupTypeInstance, field:'isActive')}</td> 43 44 </tr>45 46 <tr class="prop">47 <td valign="top" class="name">Name:</td>48 49 <td valign="top" class="value">${fieldValue(bean:personGroupTypeInstance, field:'name')}</td>50 50 51 51 </tr> -
trunk/src/grails-app/views/taskGroup/create.gsp
r21 r35 32 32 </td> 33 33 <td valign="top" class="value ${hasErrors(bean:taskGroupInstance,field:'name','errors')}"> 34 <input type="text" id="name" name="name" value="${fieldValue(bean:taskGroupInstance,field:'name')}"/>34 <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:taskGroupInstance,field:'name')}"/> 35 35 </td> 36 36 </tr> … … 41 41 </td> 42 42 <td valign="top" class="value ${hasErrors(bean:taskGroupInstance,field:'description','errors')}"> 43 <input type="text" id="description" name="description" value="${fieldValue(bean:taskGroupInstance,field:'description')}"/>43 <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:taskGroupInstance,field:'description')}"/> 44 44 </td> 45 45 </tr> -
trunk/src/grails-app/views/taskGroup/edit.gsp
r21 r35 34 34 </td> 35 35 <td valign="top" class="value ${hasErrors(bean:taskGroupInstance,field:'name','errors')}"> 36 <input type="text" id="name" name="name" value="${fieldValue(bean:taskGroupInstance,field:'name')}"/>36 <input type="text" maxlength="50" id="name" name="name" value="${fieldValue(bean:taskGroupInstance,field:'name')}"/> 37 37 </td> 38 38 </tr> … … 43 43 </td> 44 44 <td valign="top" class="value ${hasErrors(bean:taskGroupInstance,field:'description','errors')}"> 45 <input type="text" id="description" name="description" value="${fieldValue(bean:taskGroupInstance,field:'description')}"/>45 <input type="text" maxlength="100" id="description" name="description" value="${fieldValue(bean:taskGroupInstance,field:'description')}"/> 46 46 </td> 47 47 </tr>
Note: See TracChangeset
for help on using the changeset viewer.