setPartialSelected not working

Locked
abdulkadir
Posts: 3
Joined: 21 Jun 2016, 09:40

21 Jun 2016, 09:46

Hello,
I have a problem and dont find any solution.

I have a tree which has lazy load. On node expand i load children(getChildren). Before or after load children i want to set partialselected to treenode but i cant do it.
Can you help me?

Sample Code is here :

Code: Select all


  public void getChildren(TreeNode parent, String companyCode, String itemCode) {
        ResultSet rs = null;
        Document doc = (Document) parent.getData();
        try {
            String[] filters = new String[]{doc.getCode(), companyCode, itemCode};
            CallableStatement statement = db.run("SELECT SQL IS HERE (?,?,?,?)", filters, new int[]{-10});
            rs = (ResultSet) statement.getObject(4);

            while (rs.next()) {
                TreeNode newNode = new DefaultTreeNode(new Document(rs.getString("CODE"), rs.getString("NAME"), "-", "Folder"), parent);    
                if (rs.getString("STATU").equals("true")) {
                     newNode.setSelected(true);
                     parent.setPartialSelected(true);                  
                }
                TreeNode dummy = new DefaultTreeNode(new Document("dummy", "dummy", "-", "Folder"), newNode);
                //dummy açma kapama oku gelmesi için eklenildi daha sonra siliniyor
            }

        } catch (SQLException ex) {
            Logger.getLogger(DocManager.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            if (rs != null) {
                try {
                    rs.close();
                } catch (SQLException ex) {
                }
            }
            db.close();
        }
    }





mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

23 Jun 2016, 15:18

Please try with 6.0 verison. Also, I think it is not a Layout or Theme issue. Please use core forum; http://forum.primefaces.org/viewforum.php?f=3

Locked

Return to “Sentinel”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests