0

我正在尝试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>
4

1 回答 1

0

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

  • 将此属性添加到<jmesa:htmlRow>标签:uniqueProperty="id",
  • 向 Person 类添加一个名为“id”的属性,这是该类的唯一标识符。
  • 根据教程的说明,将 WorksheetServlet 添加到我的 web.xml 文件中。
于 2014-03-19T19:13:09.720 回答