我正在使用 Struts 2.3.7、struts2-jquery-grid-plugin-3.5.0 和休眠 3.6。我正在使用一对多映射来连接两个实体。这些实体
问题.java
public class Issue implements Serializable
{
private Integer issue_id;
private String issue_description;
private Date issue_raised_date;
private Set<Issue_Tracker> issueTracker = new HashSet<Issue_Tracker>(0);
getter and setters
Issue_Tracker.java
public class Issue_Tracker implements Serializable
{
private Integer issue_id;
private String assignedTo;
如何在 assignmentTo 列的 jqgrid 中显示此数据。我的 jqgrid 如下:
<sjg:grid
id="gridtable"
caption="Issue-Summary"
dataType="json"
href="%{remoteurl}"
pager="true"
gridModel="gridModel"
rowList="10,15,20"
rowNum="15"
rownumbers="true"
reloadTopics="reloadGrid"
>
<sjg:gridColumn name="issue_id" id="issueId" index="id" title="Issue-ID" formatter="integer" sortable="false"/>
<sjg:gridColumn name="issue_description" index="id" title="Issue-Details" sortable="false"/>
<sjg:gridColumn name="issue_raised_date" index="date" title="Issue-Date" formatter="date" sortable="false"/>
<sjg:gridColumn name="issueTracker" index="assigned" title="Assigned To" sortable="false"/>
</sjg:grid>
但输出如下,
如何在assignmentTo列中显示实际数据而不是此对象。