maintainPage-column:
<column id="receiver.contact.address" title="receiver.contact.address" visible="true" sortable="true" horizonAlign="left" verticalAlign="middle" dataType="string" format="showDivFormatter"/>
showDivFormatter注入formatContext.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="showDivFormatter" class="com.vtradex.tms.server.service.format.ShowDivFormatter"/> </beans>
ShowDivFormatter.java
import java.util.List;
import com.vtradex.thorn.server.format.Formatter;
/**
*
* @Description: column鼠标放上去显示数据
* @Author : yc.min
*/
public class ShowDivFormatter implements Formatter {
@Override
public String format(String property, Object cellValue, List origenData,
String referenceModel, String locale) {
String result = "-";
if(cellValue != null){
String method1 = "<div title = '"+cellValue.toString()+"'>";
result = method1 +cellValue.toString() +method2;
}
return result;
}
}