jmesa:行唯一属性值为null

时间:2014-03-19 19:12:02

标签: java jmesa

我正在尝试jmesa。

在jmesa中,我正在创建一个工作表。但是,我收到的这个错误并没有多大的说明。

java.lang.IllegalStateException: The row unique property value is null! You need to specify the uniqueProperty on the row.

这是我的代码。

 <jmesa:tableModel
                id="tag"
                items="${people}"
                var="bean"
                editable="true"
                >
                <%--editable="true"--%>
            <jmesa:htmlTable caption="People you may know" width="900px" >

                    <jmesa:htmlRow>

                        <jmesa:htmlColumn property="selected" editable="true"
                                          worksheetEditor="org.jmesa.worksheet.editor.CheckboxWorksheetEditor" title="selected" filterable="false" sortable="false"/>

                        <jmesa:htmlColumn property="firstName" editable="false"/>
                        <jmesa:htmlColumn property="lastName" title="Last Name" editable="false"/>
                        <jmesa:htmlColumn property="phone" title="Phone Number" editable="false"/>
                        <jmesa:htmlColumn property="address" title="Address" sortable="false" style="address" />

                    </jmesa:htmlRow>
            </jmesa:htmlTable>
        </jmesa:tableModel>
    </form>

1 个答案:

答案 0 :(得分:0)

该解决方案涉及3个部分。我需要:

  • 将此媒体资源添加到<jmesa:htmlRow>代码:uniqueProperty="id"
  • 添加一个名为&#34; id&#34;的属性到Person类,它是该类的唯一标识符。
  • 根据tutorial's instructions
  • 将WorksheetServlet添加到我的web.xml文件中