⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 keycellformatter.java

📁 一个java工作流引擎
💻 JAVA
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -