Changeset 7789 for branches/3.16-stable/www/common/columns/ajax.jsp
- Timestamp:
- Mar 2, 2020, 2:31:15 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.16-stable/www/common/columns/ajax.jsp
r7773 r7789 26 26 import="net.sf.basedb.core.AnnotationType" 27 27 import="net.sf.basedb.core.Annotation" 28 import="net.sf.basedb.core.BasicItem" 28 29 import="net.sf.basedb.core.Item" 29 30 import="net.sf.basedb.core.Type" … … 32 33 import="net.sf.basedb.core.plugin.GuiContext" 33 34 import="net.sf.basedb.util.Values" 35 import="net.sf.basedb.util.formatter.Formatter" 34 36 import="net.sf.basedb.util.error.ThrowableUtil" 35 37 import="net.sf.basedb.util.extensions.ExtensionsInvoker" … … 119 121 JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null); 120 122 jspContext.setAttribute("lazy-loading", false); 121 ExtensionsInvoker<ListColumnAction< Object,?>> columnsInvoker = ListColumnUtil.useExtensions(jspContext);123 ExtensionsInvoker<ListColumnAction<BasicItem, ?>> columnsInvoker = ListColumnUtil.useExtensions(jspContext); 122 124 123 125 JSONArray jsonLazy = new JSONArray(); … … 125 127 for (Integer id : items) 126 128 { 127 Objectitem = itemType.getById(dc, id);129 BasicItem item = itemType.getById(dc, id); 128 130 JSONObject jsonItem = new JSONObject(); 129 131 JSONArray jsonCols = new JSONArray(); … … 131 133 jsonItem.put("data", jsonCols); 132 134 133 for (ListColumnAction col : columnsInvoker)135 for (ListColumnAction<BasicItem, ?> col : columnsInvoker) 134 136 { 135 137 if (col.getId().startsWith("/")) 136 138 { 137 jsonCols.add(col.getFormatter().format(col.getValue(dc, item))); 139 @SuppressWarnings("unchecked") 140 Formatter<Object> f = (Formatter<Object>)col.getFormatter(); 141 jsonCols.add(f.format(col.getValue(dc, item))); 138 142 } 139 143 }
Note: See TracChangeset
for help on using the changeset viewer.