Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Declarative component using an af:tree

Pedro Melo MedeirosJan 19 2016 — edited Jan 19 2016

Hi,

I am using JDEVADF_12.1.3.0.0_GENERIC_140521.1008.S

I want to develop a declarative component with a tree which model is passed through the component's attributes as follows:

<af:tree id="navTree" value="#{attrs.model}" var="node" varStatus="nodeStatus" summary="#{attrs.summary}"

             rowSelection="single">

        <f:facet name="nodeStamp">

            <af:switcher id="dc_s1" facetName="#{node.parentNode}">

                <f:facet name="#{true}">

                    <af:outputText value="#{node.text}" id="dc_ot1"/>

                </f:facet>

                <f:facet name="#{false}">

                    <af:link id="leafNode" text="#{node.text}" action="#{node.action}"/>

                </f:facet>

            </af:switcher>

        </f:facet>

</af:tree>

I am having a problem though with the stamping on the tree: javax.el.PropertyNotFoundException: (...) fragments/navigation/navigationTree.jsf @30,68 facetName="#{node.parentNode}": The class 'java.lang.String' does not have the property 'parentNode'

I understand the exception but I was expecting it to work once I saw that Oracle's code is similar:

http://jdevadf.oracle.com/adf-richclient-demo/templates/pageTemplateDefs/componentGallerySideBarTree.jsff.source

Am I doing something wrong or forgetting something?

I also tried with a "for each" but it does not work, in this case, the page simply does not render.

<af:forEach items="#{attrs.model}" var="node" varStatus="nodeStatus">

            <af:outputText value="#{node.text}" id="ot4"/>

</af:forEach>

Thank you.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 16 2016
Added on Jan 19 2016
0 comments
158 views