Не, все правильно. Там идея такая, если сделать вот так:
| Код | try { this.getSessionBean1().getDarhdoc_dbtRowSet().release(); this.getSessionBean1().getDarhdoc_dbtRowSet().setCommand("select * \n" + " from (select * \n" + " from (select *\n" + " from darhdoc_dbt ad \n" + " UNION\n" + " select * from ddocument_dbt do) sel\n" + " where sel.t_account_payer = ?\n" + " and sel.t_chapter = 1\n" + " union\n" + " select * \n" + " from (select * \n " + " from darhdoc_dbt ad \n " + " UNION \n" + " select * from ddocument_dbt do) sel \n" + " where sel.t_account_receiver = ? \n" + " and sel.t_chapter = 1) bigsel \n" + " order by bigsel.t_date_carry desc"); this.getSessionBean1().getDarhdoc_dbtRowSet().setString(1, this.getSessionBean1().getUserAccount()); this.getSessionBean1().getDarhdoc_dbtRowSet().setString(2, this.getSessionBean1().getUserAccount()); // this.getSessionBean1().getDarhdoc_dbtRowSet().execute(); this.getDarhdoc_dbtDataProvider1().refresh(); // this.getDarhdoc_dbtDataProvider1().refresh(); // this.getDarhdoc_dbtDataProvider1().cursorFirst(); } catch (SQLException ex) { ex.printStackTrace(); } return null;
|
т.е. поменять местами присвоение параметров и самой комманды то, запрос первый раз при нажатии на упр. компоненте не выполняется, возвращает в таблицу "No Items Found". Если нажать еще раз, причем на любой управляющий элемент, кроме тех, которые переведут на другую страницу, то запрос выполнится и вернет правильные значения. Х.з. чего ему не хватает. |