@@ -36,14 +36,16 @@ this software and associated documentation files (the "Software"), to deal in
3636public class MgmtContainer {
3737 MgmtColumn mgmtColumn ;
3838 MgmtAction mgmtAction ;
39+ MgmtLink mgmtLink ;
3940 Field field ;
4041 Method method ;
4142 Class c ;
4243 Field idField ;
4344
44- public MgmtContainer (MgmtColumn mgmtColumn , MgmtAction mgmtAction , Field field , Method method , Class c , Field idField ) {
45+ public MgmtContainer (MgmtColumn mgmtColumn , MgmtAction mgmtAction , MgmtLink mgmtLink , Field field , Method method , Class c , Field idField ) {
4546 this .mgmtColumn = mgmtColumn ;
4647 this .mgmtAction = mgmtAction ;
48+ this .mgmtLink = mgmtLink ;
4749 this .field = field ;
4850 this .method = method ;
4951 this .c = c ;
@@ -82,14 +84,18 @@ public String getHeader() {
8284 }
8385 }
8486
85- public String getValue (Object o ) throws NoSuchMethodException , IllegalAccessException , InvocationTargetException {
87+ public String getValue (Object o , String objectId , String sessionId , int pageId ) throws NoSuchMethodException , IllegalAccessException , InvocationTargetException {
8688 if (this .mgmtColumn == null || this .field == null ) {
8789 return null ;
8890 } else {
8991 String getName = "get" + this .field .getName ().substring (0 ,1 ).toUpperCase () + this .field .getName ().substring (1 );
9092 Method m = this .c .getMethod (getName , null );
9193 Object result = m .invoke (o , null );
92- return String .valueOf (result );
94+ if (this .mgmtLink != null ) {
95+ return "<a href=\" ?showtable=" +objectId +"&session_id=" +sessionId +"&page_id=10\" >" +result +"</a>" ;
96+ } else {
97+ return String .valueOf (result );
98+ }
9399 }
94100 }
95101
0 commit comments