如何在primefaces 3.5中导航数据表中保存复选框的状态

时间:2016-09-28 06:56:23

标签: primefaces

我选择数据表中的复选框并按下按钮,当我返回页面时,它被取消选中。我想在导航后保存选择。这就像我选择了几个候选人作为入围名单然后去下一个,如果我想做一些修改以修改列表并返回然后我想要检查已经检查过的候选人但实际上当我回到页面时,它刷新

  • 选择按钮::::

    <f:param name="currentPage" value="#{nav.ShortListed}" />
    <f:setPropertyActionListener target="#{pageManager.prevNavigation}" value="#{nav.New}"  />
    

    • 返回同一页面的代码:

和相应的bean

public void revertShortListPanel() throws SQLException
{  
    Session hibernateSession = HibernateUtil.currentSession();
    Connection con = hibernateSession.connection();

    //.............removing all offrs from offr_panel table...........revert short listing
   this.customSelectedOffrs = new ArrayList<CriteriaSearchDao>();
   this.selectedRows = new CriteriaSearchDao[customSelectedOffrs.size()];          
   String sql1 ="delete from OFFR_PANEL where PANEL_ID = ? ";
   String sql2 = "update TBL_PANEL set PANEL_STATUS ='New' where PANEL_ID=? "; 
   PreparedStatement pnlStatus1 = con.prepareStatement(sql1);
   PreparedStatement pnlStatus2 = con.prepareStatement(sql2);

0 个答案:

没有答案