Changeset 32621
- Timestamp:
- 04/19/09 12:48:09 (4 years ago)
- Location:
- lang/java/misc/ssh-blank/src/main
- Files:
-
- 4 modified
-
java/org/coderepos/entity/Emp.java (modified) (3 diffs)
-
resources/org/coderepos/entity/Emp.hbm.xml (modified) (1 diff)
-
webapp/WEB-INF/jsp/index.jsp (modified) (4 diffs)
-
webapp/WEB-INF/struts-config.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/java/misc/ssh-blank/src/main/java/org/coderepos/entity/Emp.java
r32589 r32621 4 4 import java.math.BigDecimal; 5 5 import java.sql.Date; 6 import java.util.Set; 6 7 7 8 public class Emp implements Serializable { … … 17 18 private Integer deptId; 18 19 private Integer version; 20 private Emp mgr; 19 21 private Dept dept; 22 private Set<Emp> empSet; 20 23 21 24 public Integer getId() { … … 89 92 public void setDept(Dept dept) { 90 93 this.dept = dept; 94 } 95 96 public Emp getMgr() { 97 return mgr; 98 } 99 100 public void setMgr(Emp mgr) { 101 this.mgr = mgr; 102 } 103 104 public Set<Emp> getEmpSet() { 105 return empSet; 106 } 107 108 public void setEmpSet(Set<Emp> empSet) { 109 this.empSet = empSet; 91 110 } 92 111 -
lang/java/misc/ssh-blank/src/main/resources/org/coderepos/entity/Emp.hbm.xml
r32609 r32621 13 13 <property name="sal" column="SAL" type="big_decimal"/> 14 14 <property name="deptId" column="DEPT_ID" type="integer"/> 15 <set name="empSet" order-by="id" 16 inverse="true" fetch="join" lazy="false"> 17 <key column="MGR_ID"/> 18 <one-to-many class="Emp"/> 19 </set> 20 <many-to-one name="mgr" class="Emp" column="MGR_ID" 21 insert="false" update="false" fetch="join" lazy="false"/> 15 22 <many-to-one name="dept" class="Dept" column="DEPT_ID" 16 23 insert="false" update="false" fetch="join" lazy="false"/> -
lang/java/misc/ssh-blank/src/main/webapp/WEB-INF/jsp/index.jsp
r32592 r32621 26 26 <td>hiredate</td> 27 27 <td>sal</td> 28 <td>deptName</td>29 <td>deptLoc</td>30 28 </tr> 31 29 <tr> … … 34 32 <td><bean:write name="emp" property="hiredate" format="yyyy/MM/dd" /></td> 35 33 <td><bean:write name="emp" property="sal" /></td> 36 <td><bean:write name="emp" property="dept.deptName" /></td>37 <td><bean:write name="emp" property="dept.loc" /></td>38 34 </tr> 39 35 </tbody> 40 36 </table> 41 37 42 <h2>Your Friends</h2> 38 <h2>Your Dept</h2> 39 40 <table border="1"> 41 <tbody> 42 <tr> 43 <td>deptNo</td> 44 <td>deptName</td> 45 <td>deptLoc</td> 46 </tr> 47 <tr> 48 <logic:notEmpty name="emp" property="dept"> 49 <td><bean:write name="emp" property="dept.deptNo" /></td> 50 <td><bean:write name="emp" property="dept.deptName" /></td> 51 <td><bean:write name="emp" property="dept.loc" /></td> 52 </logic:notEmpty> 53 </tr> 54 </tbody> 55 </table> 56 57 <logic:notEmpty name="emp" property="mgr"> 58 <h2>Your Boss</h2> 59 <table border="1"> 60 <tbody> 61 <tr> 62 <td>empNo</td> 63 <td>empName</td> 64 <td>hiredate</td> 65 <td>sal</td> 66 </tr> 67 <tr> 68 <td><bean:write name="emp" property="mgr.empNo" /></td> 69 <td><bean:write name="emp" property="mgr.empName" /></td> 70 <td><bean:write name="emp" property="mgr.hiredate" format="yyyy/MM/dd" /></td> 71 <td><bean:write name="emp" property="mgr.sal" /></td> 72 </tr> 73 </tbody> 74 </table> 75 </logic:notEmpty> 76 77 <h2>Men under the Dept</h2> 43 78 44 79 <table border="1"> … … 51 86 </tr> 52 87 <logic:iterate name="emp" property="dept.empSet" id="it"> 53 <logic:notEqual name="it" property="id" value="${emp.id}"> 88 <tr> 89 <td><bean:write name="it" property="empNo" /></td> 90 <td><bean:write name="it" property="empName" /></td> 91 <td><bean:write name="it" property="hiredate" format="yyyy/MM/dd" /></td> 92 <td><bean:write name="it" property="sal" /></td> 93 </tr> 94 </logic:iterate> 95 </tbody> 96 </table> 97 98 <logic:notEmpty name="emp" property="mgr"> 99 <logic:notEmpty name="emp" property="mgr.empSet"> 100 <h2>Men under the Boss</h2> 101 <table border="1"> 102 <tbody> 103 <tr> 104 <td>empNo</td> 105 <td>empName</td> 106 <td>hiredate</td> 107 <td>sal</td> 108 </tr> 109 <logic:iterate name="emp" property="mgr.empSet" id="it"> 110 <logic:notEqual name="it" property="id" value="${emp.mgr.id}"> 54 111 <tr> 55 112 <td><bean:write name="it" property="empNo" /></td> … … 62 119 </tbody> 63 120 </table> 121 </logic:notEmpty> 122 </logic:notEmpty> 64 123 65 124 </body> -
lang/java/misc/ssh-blank/src/main/webapp/WEB-INF/struts-config.xml
r32370 r32621 18 18 </action-mappings> 19 19 20 <controller processorClass="org.springframework.web.struts.DelegatingRequestProcessor"/>20 <controller nocache="true" processorClass="org.springframework.web.struts.DelegatingRequestProcessor"/> 21 21 22 22 <message-resources parameter="MessageResources"/>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)