📄 propertycellformatter.java
字号:
package org.jbpm.web.tag.formatter;
import javax.servlet.jsp.*;
import org.apache.commons.logging.*;
import org.apache.struts.taglib.tiles.util.*;
import org.jbpm.web.tag.*;
public class PropertyCellFormatter implements CellFormatter {
private PropertyCellFormatter() {}
private static final PropertyCellFormatter instance = new PropertyCellFormatter();
public static PropertyCellFormatter getInstance() { return instance; }
public Object writeCell(Object rowObject, Column column, PageContext pageContext) throws JspException {
Object cellObject = null;
try {
String property = column.getProperty();
log.debug( "writing property " + property + "' for row '" + rowObject + "'" );
cellObject = TagUtils.getProperty( rowObject, property );
} catch (Exception e) {
e.printStackTrace();
throw new JspException( "PropertyCellFormatter couldn't format cell for rowObject '" + rowObject + "', column '" + column + "' : " +e.getMessage() );
}
return cellObject;
}
private static Log log = LogFactory.getLog(PropertyCellFormatter.class);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -