keycellformatter.java
来自「一个java工作流引擎」· Java 代码 · 共 25 行
JAVA
25 行
package org.jbpm.web.tag.formatter;
import java.util.*;
import javax.servlet.jsp.*;
import org.jbpm.web.tag.*;
public class KeyCellFormatter implements CellFormatter {
private KeyCellFormatter() {}
private static final KeyCellFormatter instance = new KeyCellFormatter();
public static KeyCellFormatter getInstance() { return instance; }
public Object writeCell(Object rowObject, Column column, PageContext pageContext) throws JspException {
Object cellObject = null;
try {
cellObject = ((Map)rowObject).get( column.getKey() );
} catch ( ClassCastException e ) {
throw new JspException( "row-objects are supposed to be java.util.Map's when using the KeyCellFormatter, not '" + rowObject.getClass().getName() + "'" );
}
return cellObject;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?