Html 自定义Struts Displaytag表属性
我知道如何使用Struts2 displaytag:table和decorator定制显示数据 但是我需要自定义表列(tr样式) 公共字符串getWorkFlow(){ WorkOrderDO currentWorkOrder=(WorkOrderDO)getCurrentRowObject(); 字符串输出=null; 如果(currentWorkOrder.getChildId()==0){ 如果(!currentWorkOrder.isWorkFlowRetrieved()){ 输出=”; }否则{ 输出=”; } } 返回输出; } 通过decorator类中的上述方法,我们可以定制数据的外观 但我的问题是,如果Html 自定义Struts Displaytag表属性,html,struts2,displaytag,Html,Struts2,Displaytag,我知道如何使用Struts2 displaytag:table和decorator定制显示数据 但是我需要自定义表列(tr样式) 公共字符串getWorkFlow(){ WorkOrderDO currentWorkOrder=(WorkOrderDO)getCurrentRowObject(); 字符串输出=null; 如果(currentWorkOrder.getChildId()==0){ 如果(!currentWorkOrder.isWorkFlowRetrieved()){ 输出=”;
currentWorkOrder.isWorkFlowRetrieved()==true
,我想在带有style属性的显示页面中突出显示表格中的整列(tr)
有什么想法吗?您可以通过在display:column标记中使用style属性来实现这一点 例如 我希望这对您有用。display:column title=“Name”style=“align:left;”property=“Name”
public String getWorkFlow() {
WorkOrderDO currentWorkOrder = (WorkOrderDO) getCurrentRowObject();
String output = null;
if (currentWorkOrder.getChildId() == 0) {
if (!currentWorkOrder.isWorkFlowRetrieved()) {
output = "<input type = 'submit' value = 'Work Flow' id=" + currentWorkOrder.getMoveWorkOrderId() + " onclick = 'changeWorkOrder(this);return false;'/>";
} else {
output = "<input type = 'submit' value = 'Work Flow' id=" + currentWorkOrder.getMoveWorkOrderId() + " onclick = 'changeWorkOrder(this);return false;' disabled/>";
}
}
return output;
}