Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to show two tables data in jqgrid using struts2 - jqgrid plugin and hibernate
    primarykey
    data
    text
    <p>I am using Struts 2.3.7, struts2-jquery-grid-plugin-3.5.0 and hibernate 3.6. I want to show data on <code>jqgrid</code> which is coming from two different tables.</p> <p>My problem is that I have to show two tables data in one <code>jqgrid</code> .First three <code>jqgrid</code> column is filled by <code>Issue</code> table and last Column <code>name="assignedTo"</code> is filled by <code>Issue_Tracker</code> table. How to show the data in last column i.e. <code>assignedTo</code>. Any help would be appropriated.</p> <p><strong>My jqgrid is</strong> </p> <pre><code>&lt;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" &gt; &lt;sjg:gridColumn name="issue_id" id="issueId" index="id" title="Issue-ID" formatter="integer" sortable="false"/&gt; &lt;sjg:gridColumn name="issue_description" index="id" title="Issue-Details" sortable="false"/&gt; &lt;sjg:gridColumn name="issue_raised_date" index="date" title="Issue-Date" formatter="date" sortable="false"/&gt; &lt;sjg:gridColumn name="assignedTo" index="assigned" title="Assigned To" sortable="false"/&gt; &lt;/sjg:grid&gt; </code></pre> <p><strong>I have pojo's:</strong></p> <p>Issue.java</p> <pre><code>public class Issue implements Serializable { private Integer issue_id; private String issue_description; private Date issue_raised_date; getters and setters </code></pre> <p><strong>another pojo is</strong> </p> <p>Issue_Tracker.java</p> <pre><code>public class Issue_Tracker implements Serializable { private Integer issue_id; private String assignedTo; </code></pre> <p><strong>and My Dao is as follows to show the list of Issues in jqgrid</strong></p> <pre><code>public List&lt;Issue&gt; showHelpDeskIssues(DetachedCriteria dc, int from, int size) { Session session = HibernateUtil.getSessionFactory().getCurrentSession(); try { Criteria criteria = dc.getExecutableCriteria(session); criteria.setFirstResult(from); criteria.setMaxResults(size); criteria.add(Restrictions.eq("status","Escalate To")); return criteria.list(); } catch (HibernateException e) { e.printStackTrace(); throw e; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload