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;
}
}
本文详细介绍了如何通过自定义格式器`ShowDivFormatter`实现接收者联系地址在页面上的高效展示,包括其XML配置、Java实现细节及应用场景。通过将复杂数据以易于理解的方式呈现,提升用户体验。
1183

被折叠的 条评论
为什么被折叠?



