Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 自定义Struts Displaytag表属性_Html_Struts2_Displaytag - Fatal编程技术网

Html 自定义Struts Displaytag表属性

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()){ 输出=”;

我知道如何使用Struts2 displaytag:table和decorator定制显示数据

但是我需要自定义表列(tr样式)

公共字符串getWorkFlow(){ WorkOrderDO currentWorkOrder=(WorkOrderDO)getCurrentRowObject(); 字符串输出=null; 如果(currentWorkOrder.getChildId()==0){ 如果(!currentWorkOrder.isWorkFlowRetrieved()){ 输出=”; }否则{ 输出=”; } } 返回输出; } 通过decorator类中的上述方法,我们可以定制数据的外观

但我的问题是,如果
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;
}