在Struts表显示中配置HTML标题属性

时间:2015-02-05 05:52:08

标签: jsp struts title

我使用Struts2来显示表格的数据。我的大多数表数据太长而且溢出,我隐藏了溢出的数据。但我不能使用HTML标题属性来显示鼠标悬停时,猜测这是Struts2的一些限制。

有人可以帮我建议如何使HTML标题属性有效吗? 以下是我目前的代码。

我尝试添加Struts title参数,但失败了。

    <display:table name="testCaseList" class="mobile" id="row" style="width:100%;">
        <display:caption><thead>
        <tr  class="pageHeader">
            <th style="width: 3%;" >No.</th>
            <th style="width: 3%;" title="Select All"><input type="checkbox" id="chk_selectedAll" onclick="selectAllTestCases(this);"/></th>
            <th style="width: 24%;">Test Case Name </th>
            <th style="width: 10%;">Test Case Id</th>
            <th style="width: 10%;">Project</th>
            <th style="width: 10%;">Feature</th>
            <th style="width: 10%;">Component</th>
            <th style="width: 10%;">Test Type</th>
            <th style="width: 10%;">Automation</th>
            <th style="width: 10%;">Operation</th>
        </tr>
        </thead></display:caption>
        <display:column  title="Row Number" class="fixTitle1">
            <c:out value="${row_rowNum}"></c:out>
        </display:column>
        <display:column>
            <input type="checkbox" name="multiCaseId" onclick="multiCaseId_clicked(this)" value="${row.testCaseId }" />
        </display:column>
        <display:column sortable="true">
        <a href="javascript:showTestCaseClick(${row.testCaseId });" style="color:#0059fd;">${row.testCaseName }</a>
        </display:column>
        <display:column  property="testCasealiasId" />
        <display:column  property="projectName" />
        <display:column  property="featureName" />
        <display:column  property="compName" />
        <display:column  property="testTypeName" />
        <display:column  property="autoName" />
        <display:column>
            <a href="javascript:selectTestCaseClick(${row.testCaseId },${currPage });" style="color:#0059fd;">Update</a>
        </display:column>
        <display:setProperty name="basic.show.header" value="false"/>
    </display:table>  

1 个答案:

答案 0 :(得分:0)

You can use a Decorator for your display table. A decorator lets you create getters that match with "property" attribute of tags. Then, you create a getSomething() method and inside it create the HTML code, for example a link or something and there you can add your title attribute or alt attribute which work for some browsers.