You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Torsten Zyder <to...@googlemail.com> on 2007/08/01 08:49:27 UTC

[Trinidad] setDisclosedRowKeys method has no effect

Hi,

I want to expand certain nodes in a treeTable when I build it up. Therefore
I determine the affected rowKeys and then call the setDisclosedRowKeys
method on the treeTable. The disclosedRowKeySet property is set afterwards,
but it has no effect. Only the root node is visible. Is that a bug in
Trinidad? It worked well in Adf Faces (though there I set the 'treeState'
property instead (which was renamed to disclosedRowKeys in Trinidad)).

I use the following code in the setCoreTreeTable method:

            AdfTreeTableNode rootNode = myData.get(0);
            if (_expandMarked) {
                RowKeySet path = new RowKeySetImpl();
                getExpansionPathSet(rootNode, path);

                tree.setDisclosedRowKeys(path);
            }



The rowKeySet path has the following content after calling
getExpansionPathSet():
[[0, 0, 3], [0, 0, 20, 0, 1], [0, 0, 36, 0, 2], [0, 0, 24], [0, 0, 8, 0, 0],
[0, 0, 12], [0, 0, 20, 0, 0], [0, 0, 20, 0, 3], [0, 0, 13, 0, 4], [0, 0, 6,
0, 0], [0, 0, 3, 0, 2], [0, 0, 3, 0, 1], [0, 0, 2], [0, 0, 36, 0, 1], [0, 0,
14, 0, 0], [0, 0, 8, 0, 1], [0, 0, 21], [0, 0, 14, 0, 1], [0, 0, 26, 0, 3],
[0, 0, 4], [0, 0, 22], [0, 0, 38, 1, 0], [0, 0, 14, 0, 2], [0, 0, 1], [0, 0,
28], [0, 0, 13, 0, 3], [0, 0, 27], [0, 0, 36, 0, 0], [0, 0, 23], [0, 0, 20,
0, 2], [0, 0, 10], [0, 0, 20], [0, 0, 25], [0, 0, 26, 0, 2], [0, 0, 27, 0,
0], [0, 0, 3, 0, 0], [0, 0, 9], [0, 0, 22, 0, 0], [0, 0, 40], [0, 0, 8], [0,
0, 14, 0, 3], [0, 0, 30, 0, 0], [0, 0, 26], [0, 0, 10, 0, 2], [0, 0, 23, 0,
1], [0, 0, 13, 1], [0, 0, 0, 0], [0, 0, 7], [0, 0, 10, 0, 0], [0, 0, 7, 0,
3], [0, 0, 23, 0, 2], [0, 0, 9, 0, 0], [0, 0, 5], [0, 0, 33, 0], [0, 0, 10,
0, 1], [0, 0, 8, 0], [0, 0, 14, 0, 4], [0, 0, 6], [0, 0, 23, 0, 3], [0], [0,
0, 39, 1, 0], [0, 0, 11, 0, 3], [0, 0, 31, 0, 1], [0, 0, 27, 0, 1], [0, 0,
38, 1], [0, 0, 19], [0, 0, 16], [0, 0, 11, 0, 2], [0, 0, 39, 0, 3], [0, 0,
27, 0, 2], [0, 0, 31, 0, 0], [0, 0, 29, 0, 1], [0, 0, 23, 0], [0, 0, 34, 0,
2], [0, 0, 32, 0, 0], [0, 0, 33, 0, 4], [0, 0, 32], [0, 0, 15], [0, 0, 13,
0, 1], [0, 0, 1, 0], [0, 0, 31, 0, 2], [0, 0, 11, 0, 0], [0, 0, 32, 0], [0,
0, 34, 0, 4], [0, 0, 13, 0, 0], [0, 0, 34, 0, 3], [0, 0, 17], [0, 0, 14, 0],
[0, 0, 18], [0, 0, 39, 0, 2], [0, 0, 31], [0, 0, 33, 0, 0], [0, 0, 7, 0, 4],
[0, 0, 38, 0], [0, 0, 39, 0], [0, 0, 32, 0, 2], [0, 0, 26, 0, 0], [0, 0, 26,
0, 1], [0, 0, 13, 0, 2], [0, 0, 30, 0, 1], [0, 0, 27, 0], [0, 0, 27, 0, 4],
[0, 0, 27, 1], [0, 0, 29], [0, 0, 19, 0, 0], [0, 0, 33, 0, 3], [0, 0, 14, 1,
0], [0, 0, 26, 0, 4], [0, 0, 39, 1], [0, 0, 11, 0, 1], [0, 0, 39, 0, 1], [0,
0, 3, 0], [0, 0, 33, 0, 2], [0, 0, 26, 0], [0, 0, 30], [0, 0, 34, 0], [0, 0,
39, 0, 4], [0, 0, 27, 0, 3], [0, 0, 26, 1], [0, 0, 11, 0, 4], [0, 0, 33, 0,
1], [0, 0, 31, 0, 3], [0, 0, 14], [0, 0, 10, 0], [0, 0, 8, 0, 3], [0, 0,
33], [0, 0, 19, 0], [0, 0, 34], [0, 0, 38], [0, 0, 34, 0, 0], [0, 0, 39, 0,
0], [0, 0, 8, 0, 2], [0, 0, 13], [0, 0, 27, 1, 0], [0, 0, 19, 0, 1], [0, 0,
29, 0, 0], [0, 0, 2, 0, 3], [0, 0, 34, 1], [0, 0, 4, 0, 1], [0, 0, 2, 0, 2],
[0, 0, 34, 0, 1], [0, 0, 20, 1], [0, 0, 13, 1, 0], [0, 0, 26, 1, 0], [0, 0,
9, 0, 1], [0, 0, 22, 0], [0, 0, 39], [0, 0, 9, 0], [0, 0, 29, 0, 2], [0, 0,
20, 1, 0], [0, 0, 32, 0, 1], [0, 0, 36, 0], [0, 0, 36], [0, 0, 2, 1], [0, 0,
29, 0], [0, 0, 8, 0, 4], [0, 0, 4, 0, 0], [0, 0, 2, 0], [0, 0, 20, 0], [0,
0, 13, 0], [0, 0, 5, 0], [0, 0, 14, 1], [0, 0, 7, 0, 2], [0, 0, 22, 0, 2],
[0, 0, 6, 0], [0, 0, 30, 0, 3], [0, 0, 0], [0, 0, 2, 0, 1], [0, 0, 7, 0, 1],
[0, 0, 38, 0, 0], [0, 0, 2, 0, 0], [0, 0, 7, 0], [0, 0, 35], [0, 0, 38, 0,
2], [0, 0, 23, 0, 0], [0, 0, 38, 0, 3], [0, 0, 31, 0], [0, 0, 38, 0, 4], [0,
0, 38, 0, 1], [0, 0, 30, 0], [0, 0, 11, 0], [0, 0, 22, 0, 3], [0, 0, 30, 0,
2], [0, 0, 10, 0, 3], [0, 0, 7, 0, 0], [0, 0, 22, 0, 1], [0, 0], [0, 0, 31,
0, 4], [0, 0, 10, 0, 4], [0, 0, 37], [0, 0, 6, 0, 2], [0, 0, 11], [0, 0, 30,
0, 4], [0, 0, 4, 0], [0, 0, 6, 0, 1]]




I use trinidad 1.0.1 as I couldn't get my application running with 1.2.1.

I also tried using RowKeySetTreeImpl instead. But that causes some the
following error:

SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
    at org.apache.myfaces.trinidad.model.RowKeySetTreeImpl$Search.find(
RowKeySetTreeImpl.java:602)
    at org.apache.myfaces.trinidad.model.RowKeySetTreeImpl._setContained(
RowKeySetTreeImpl.java:493)
    at org.apache.myfaces.trinidad.model.RowKeySetTreeImpl.add(
RowKeySetTreeImpl.java:97)
    at com.dcag.smaweb.adf.pages.AdfSimpleTreeTable.getExpansionPathSet(
AdfSimpleTreeTable.java:506)
    at com.dcag.smaweb.adf.pages.AdfSimpleTreeTable.setCoreTreeTable(
AdfSimpleTreeTable.java:532)
    at com.dcag.smaweb.adf.pages.AdfTreeTable.setCoreTreeTable(
AdfTreeTable.java:71)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.faces.el.PropertyResolverImpl.setValue(
PropertyResolverImpl.java:178)
    at com.sun.faces.el.impl.ArraySuffix.setValue(ArraySuffix.java:192)
    at com.sun.faces.el.impl.ComplexValue.setValue(ComplexValue.java:171)
    at com.sun.faces.el.ValueBindingImpl.setValue(ValueBindingImpl.java:234)
    at com.sun.faces.application.ApplicationImpl.createComponent(
ApplicationImpl.java:393)
    at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java
:1009)
    at javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java
:1036)
    at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java
:749)
    at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:429)
    at org.apache.myfaces.trinidad.webapp.UIXComponentTag.doStartTag(
UIXComponentTag.java:102)
    at
org.apache.jsp.com.dcag.smaweb.adf.TreeTable_jspx._jspx_meth_tr_005ftreeTable_005f0
(TreeTable_jspx.java:1770)
    at
org.apache.jsp.com.dcag.smaweb.adf.TreeTable_jspx._jspx_meth_trh_005fcellFormat_005f2
(TreeTable_jspx.java:1427)
    at
org.apache.jsp.com.dcag.smaweb.adf.TreeTable_jspx._jspx_meth_trh_005frowLayout_005f2
(TreeTable_jspx.java:1395)
    at
org.apache.jsp.com.dcag.smaweb.adf.TreeTable_jspx._jspx_meth_trh_005ftableLayout_005f0
(TreeTable_jspx.java:950)
    at
org.apache.jsp.com.dcag.smaweb.adf.TreeTable_jspx._jspx_meth_tr_005fform_005f0
(TreeTable_jspx.java:910)
    at
org.apache.jsp.com.dcag.smaweb.adf.TreeTable_jspx._jspx_meth_trh_005fbody_005f0
(TreeTable_jspx.java:862)
    at
org.apache.jsp.com.dcag.smaweb.adf.TreeTable_jspx._jspx_meth_trh_005fhtml_005f0
(TreeTable_jspx.java:130)
    at
org.apache.jsp.com.dcag.smaweb.adf.TreeTable_jspx._jspx_meth_f_005fview_005f0
(TreeTable_jspx.java:95)
    at org.apache.jsp.com.dcag.smaweb.adf.TreeTable_jspx._jspService
(TreeTable_jspx.java:62)
    at org.apache.jasp


Thx for any help on that issue.

Torsten Zyder