ADF tree with command link

Hello,
I have a menu build with a tree and a region. When I click a link from the tree the region populate a page with another dinamic tree based on a session variable that refresh each time that i click a link from the first tree. After click the link I have a flow that has an executewithparams method and the page that will show the second tree.
My problem is that the second tree doesn't refresh its branches at my first click on the link but on the second yes and I receive :
<NavigationPaneRenderer><_renderContent> Warning: There are no items to render for this level
<FormRenderer><setupEncodingContext> Multiple forms detected on viewId: /pages/index.jspx. Rich client currently has some limitations in dealing with multiple forms.
I have set the autorefresh for the iterator but I haven't success.
Can anyone help me?
Thank you.

Hi Frank,
It's true that my execute with params method accessthe session scope attribute directly but in my page fragmet i haven't af:form
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<!--oracle-jdev-comment:preferred-managed-bean-name:backing_doc-->
<af:panelGroupLayout id="pgl2">
<c:set var="viewcontrollerBundle"
value="#{adfBundle['.main.view.ViewControllerBundleMain']}"/>
<af:panelGroupLayout id="pgl1" layout="vertical">
<af:panelBox text="#{sessionScope.OrgMeniuId eq 920 ? viewcontrollerBundle.1 : viewcontrollerBundle.2}"
id="pb1" styleClass="AFStretchWidth"
binding="#{backing_doc.pb1}">
<f:facet name="toolbar"/>
<af:tree value="#{bindings.DocVO2.treeModel}" var="node"
selectionListener="#{bindings.DocVO2.treeModel.makeCurrent}"
rowSelection="single" id="t1" binding="#{backing_doc.t1}"
fetchSize="-1" styleClass="AFStretchWidth"
inlineStyle="font-size:small;">
<f:facet name="nodeStamp">
<af:group id="g1" binding="#{backing_doc.g1}">
<af:commandLink id="cl1"
text="#{node.Desc}#{node.DescOp}"
action="#{backing_doc.ActionIdLink}"
actionListener="#{backing_doc.discloseItem}"
binding="#{backing_doc.cl1}" immediate="true"
partialTriggers="::pb1">
<af:setActionListener from="#{node.IdOp != null ? node.IdOp : node.Id}"
to="#{sessionScope.backing_doc.actionId}"/>
<f:attribute name="node" value="#{node}"/>
<af:setActionListener from="#{node.IdOp != null ? node.DescOp : node.Desc}"
to="#{sessionScope.OrgDocDesc}"/>
<af:clientListener method="onDownload" type="action"/>
</af:commandLink>
<af:resource type="javascript">
function onDownload(evt){ evt.noResponseExpected(); }
</af:resource>
</af:group>
</f:facet>
</af:tree>
</af:panelBox>
</af:panelGroupLayout>
</af:panelGroupLayout>
</jsp:root>

Similar Messages

  • Af:tree with command link

    hi experts,
    am using jdeveloper 11g version 11.1.1.5.0 - adfbc components - oracle db 10g.
    am trying some examples regards,
    af:tree with commandLink,
    here what i did:
    i achieved the af:tree with the help of some association between two tables and then i exposed in ui,
    you can see in this pics1 :
    http://www.4shared.com/photo/kGE2M1yl/pics1.html
    and then af:tree output can also seen in pics2:
    http://www.4shared.com/photo/GQTB9icb/pic2.html
    this is the code for af:tree
    <af:tree value="#{bindings.ApplBusFunSuiteView1.treeModel}"
                         var="node"
                         selectionListener="#{bindings.ApplBusFunSuiteView1.treeModel.makeCurrent}"
                         rowSelection="single" binding="#{backing_untitled1.t1}"
                         id="t1">
                  <f:facet name="nodeStamp">
                     <af:outputText value="#{node}"
                                     binding="#{backing_untitled1.ot1}" id="ot1"/>
                  </f:facet>
                </af:tree>ok thing which i did all are ok.
    but my need is :
    you may see in pics2.
    http://www.4shared.com/photo/GQTB9icb/pic2.html
    i make red mark on the on a child.
    here am going to explain my need
    in the picture you can see CRM as parent
    MKG as first child
    MKG3200 as last child.
    command link should be appeared.
    when i click that it will navigate to the corresponding page.
    for eg: if i click MKG3200 navigate to the MKG3200 page.
    how can i do this.? i need some guidance.
    sorry for my poor english.
    Edited by: Erp on Dec 1, 2011 4:34 AM

    hi am waiting for john
    retrieves the page IDhere the author get the node id.
    in my task n get the page id and navigate to it. as you said.
    http://andrejusb.blogspot.com/search/label/Tree
    thanks to andrejus and you(john)
    package view.backing;
    import java.util.Iterator;
    import java.util.List;
    import javax.el.ELContext;
    import javax.el.ExpressionFactory;
    import javax.el.MethodExpression;
    import javax.faces.application.Application;
    import javax.faces.application.FacesMessage;
    import javax.faces.context.FacesContext;
    import oracle.adf.controller.TaskFlowId;
    import oracle.adf.view.rich.component.rich.RichDocument;
    import oracle.adf.view.rich.component.rich.RichForm;
    import oracle.adf.view.rich.component.rich.data.RichTree;
    import oracle.adf.view.rich.component.rich.fragment.RichRegion;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    import oracle.adf.view.rich.component.rich.layout.RichPanelGroupLayout;
    import oracle.adf.view.rich.component.rich.layout.RichPanelSplitter;
    import oracle.adf.view.rich.component.rich.nav.RichCommandButton;
    import oracle.adf.view.rich.component.rich.nav.RichCommandLink;
    import oracle.adf.view.rich.component.rich.output.RichMessages;
    import oracle.jbo.Row;
    import oracle.jbo.uicli.binding.JUCtrlHierBinding;
    import oracle.jbo.uicli.binding.JUCtrlHierNodeBinding;
    import org.apache.myfaces.trinidad.component.UIXGroup;
    import org.apache.myfaces.trinidad.event.AttributeChangeEvent;
    import org.apache.myfaces.trinidad.event.SelectionEvent;
    import org.apache.myfaces.trinidad.model.CollectionModel;
    import org.apache.myfaces.trinidad.model.RowKeySet;
    import org.apache.myfaces.trinidad.model.TreeModel;
    public class Main1 {
        private RichForm f1;
        private RichDocument d1;
        private RichTree t1;
        private RichMessages m1;
        private RichCommandLink ot1;
        private String taskFlowId = "/WEB-INF/dummy-task-flow-definition.xml#dummy-task-flow-definition";
        private RichRegion r1;
        private UIXGroup g1;
        private RichCommandLink cl1;
        private RichPanelSplitter ps1;
        private RichPanelGroupLayout pgl1;
        private RichInputText it1;
        private RichCommandButton cb1;
        private String i1;
        public void setF1(RichForm f1) {
            this.f1 = f1;
        public RichForm getF1() {
            return f1;
        public void setD1(RichDocument d1) {
            this.d1 = d1;
        public RichDocument getD1() {
            return d1;
        public void setT1(RichTree t1) {
            this.t1 = t1;
        public RichTree getT1() {
            return t1;
        public void setM1(RichMessages m1) {
            this.m1 = m1;
        public RichMessages getM1() {
            return m1;
        public void setOt1(RichCommandLink ot1) {
            this.ot1 = ot1;
        public RichCommandLink getOt1() {
            return ot1;
        public TaskFlowId getDynamicTaskFlowId() {
            return TaskFlowId.parse(taskFlowId);
        public void setR1(RichRegion r1) {
            this.r1 = r1;
        public RichRegion getR1() {
            return r1;
        public String dynaminflow()
             taskFlowId = "/WEB-INF/supplier-task-flow-definition.xml#supplier-task-flow-definition";
              return null;
        public String mainflow1()
                taskFlowId = "/WEB-INF/dummy-task-flow-definition.xml#dummy-task-flow-definition";
              return null;
        public void setG1(UIXGroup g1) {
            this.g1 = g1;
        public UIXGroup getG1() {
            return g1;
        public void setCl1(RichCommandLink cl1) {
            this.cl1 = cl1;
        public RichCommandLink getCl1() {
            return cl1;
        public void setPs1(RichPanelSplitter ps1) {
            this.ps1 = ps1;
        public RichPanelSplitter getPs1() {
            return ps1;
        public void setPgl1(RichPanelGroupLayout pgl1) {
            this.pgl1 = pgl1;
        public RichPanelGroupLayout getPgl1() {
            return pgl1;
        public void setIt1(RichInputText it1) {
            this.it1 = it1;
        public RichInputText getIt1() {
            return it1;
        public void setCb1(RichCommandButton cb1) {
            this.cb1 = cb1;
        public RichCommandButton getCb1() {
            return cb1;
        public void setI1(String i1) {
            this.i1 = i1;
        public String getI1() {
            return i1;
        public String cb1_action() {
            // Add event code here...
          if(this.getI1().equalsIgnoreCase("SUP1000")  ) {
                         dynaminflow();
          else  if(this.getI1().equalsIgnoreCase("MAIN1000")  ) {
                               mainflow1();
          else{
                    FacesContext ctx = FacesContext.getCurrentInstance();
                    FacesMessage fm =
                        new FacesMessage(FacesMessage.SEVERITY_ERROR, "Page Not found",
                    ctx.addMessage(null, fm);
                    return null;
            return null;
        public void onTreeSelect(SelectionEvent selectionEvent) {
         /*   //original selection listener set by ADF
            //#{bindings.allDepartments.treeModel.makeCurrent}
            String adfSelectionListener = "#{bindings.ApplBusFunSuiteView2.treeModel.makeCurrent}";
            //make sure the default selection listener functionality is preserved.
            //you don't need to do this for multi select trees as the ADF binding
            //only supports single current row selection
            /* START PRESERVER DEFAULT ADF SELECT BEHAVIOR */
           /* FacesContext fctx = FacesContext.getCurrentInstance();
            Application application = fctx.getApplication();
            ELContext elCtx = fctx.getELContext();
            ExpressionFactory exprFactory = application.getExpressionFactory();
            MethodExpression me = null;
            me =  exprFactory.createMethodExpression(elCtx, adfSelectionListener, Object.class, new Class[] { SelectionEvent.class });
            me.invoke(elCtx, new Object[] { selectionEvent });
            /* END PRESERVER DEFAULT ADF SELECT BEHAVIOR */
          //  RichTree tree = (RichTree)selectionEvent.getSource();
          //  TreeModel model = (TreeModel)tree.getValue();
            //get selected nodes
         //   RowKeySet rowKeySet = selectionEvent.getAddedSet();
         //   Iterator rksIterator = rowKeySet.iterator(); */
            //for single select configurations, thi sonly is called once
         /*   while (rksIterator.hasNext())
                List key = (List)rksIterator.next();
                JUCtrlHierBinding treeBinding = null;
                CollectionModel collectionModel = (CollectionModel)tree.getValue();
                treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();
                JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(key);
                Row rw = nodeBinding.getRow();
                System.out.println(""+nodeBinding.getRow()); */
                //print first row attribute. Note that in a tree you have to determine the node
                //type if you want to select node attributes by name and not index           
            /*    String rowType = rw.getStructureDef().getDefName();
                System.out.println(""+rw.getStructureDef().getDefName());
                if(rowType.equalsIgnoreCase("SuplrDocHdView")){
                    System.out.println("This row is a department: " + rw.getAttribute("SuphdBu"));
                else if(rowType.equalsIgnoreCase("EmployeesView")){
                 System.out.println("This row is an employee: " + rw.getAttribute("EmployeeId"));
                else{
                    System.out.println("Huh ????");
                // ... do more usefuls stuff here
            RowKeySet selection = this.getT1().getSelectedRowKeys();
            if (selection != null && selection.getSize() > 0) {
                for (Object facesTreeRowKey : selection) {
                    this.getT1().setRowKey(facesTreeRowKey);
                    JUCtrlHierNodeBinding root = (JUCtrlHierNodeBinding) this.getT1().getRowData();
                    JUCtrlHierNodeBinding node = this.getFirstChild(root);
                    while (node != null)
                        System.out.println(node.getRow().getAttribute(0));
                        if(node.getRow().getAttribute(0).toString().equalsIgnoreCase("APM2010") )
                            dynaminflow();
                        else  if(node.getRow().getAttribute(0).toString().equalsIgnoreCase("APM2020")  ) {
                                             mainflow1();
                        //node.getRow().remove();
                        if ( node.getChildren() != null) {    
                            node = this.getFirstChild(node);
                        } else {
                            while (this.getNextSibling(node) == null && node != root)
                                node=node.getParent();
                            if(node != root) {
                                node = this.getNextSibling(node);
                            } else {
                                node = null;
                    System.out.println(root.getRow().getAttribute(0));
                    if(root.getRow().getAttribute(0).toString().equalsIgnoreCase("APM2010")  )
                        dynaminflow();
                    else  if(root.getRow().getAttribute(0).toString().equalsIgnoreCase("APM2020")  ) {
                                         mainflow1();
                    //root.getRow().remove();
        private JUCtrlHierNodeBinding getFirstChild(JUCtrlHierNodeBinding node) {
            if (node.getChildren() != null) {
                return (JUCtrlHierNodeBinding)node.getChildren().get(0);
            return null;
        private JUCtrlHierNodeBinding getNextSibling(JUCtrlHierNodeBinding node) {
            JUCtrlHierNodeBinding parent = node.getParent();
            int index = parent.getChildren().indexOf(node);
            index = ++index;
            if(index < parent.getChildren().size()) {
                return (JUCtrlHierNodeBinding)parent.getChildren().get(index);
            return null;       
    }i get my output. what i need.
    you must check whether am going correct?
    please suggest me.
    sorry : pulling this thread to up.

  • Programatically creating ADF Tree with nodes,child nodes & links?

    Hi,
    Currently I am using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. Please provide me detailed code for programatically creating ADF Tree with nodes, child nodes and links in it.
    Thanks,
    Vik

    You need to create a model for the tree. ADF has a build in model that you can use to build your own tree.
    This is what you need to write in your JSPX:
    <af:tree summary="Navigation" id="treeNav" value="#{pageFlowScope.treeNavigationBackingBean.model}"
               var="node" contextMenuSelect="true" rowSelection="single" fetchSize="30">   
           <f:facet name="nodeStamp">
          <af:outputText id="txtText" value="#{node.text}"/>
        </f:facet>
    </af:tree>This is the code to retreive the model:
      public TreeModel getModel() {
        if(model == null)
            model = new ChildPropertyTreeModel(instance,"children");
        return model;
      }instance contains the actual tree. I build it in the constructor of my managed bean:
        public BeanTreeNavigation() {
          ArrayList<TreeItem> rootItems = new ArrayList<TreeItem>();
          TreeItem node1 = new TreeItem("Root node");
             ArrayList<TreeItem> level1 = new ArrayList<TreeItem>();
             TreeItem level1Node1 = new TreeItem("Level1 Node1");
              level1.add(level1Node1);
           node1.setChildren(level1);
           rootItems.setChildren(node1); 
          this.setListInstance(rootItems);
          root = rootItems;
      public void setListInstance(List instance) {
        this.instance = instance;
        model = null;
      }The TreeItem class is not a default one. I created it myself. You can make of it whatever you want:
        public class TreeItem {
          private String text;
           private List<TreeItem> children = null;
           public TreeItem(String text){
            this.text = text;
            public void setText(String text) {
                this.text = text;
            public String getText() {
                return text;
            public void setChildren(List<TreeItem> children) {
                this.children = children;
            public List<TreeItem> getChildren() {
                return children;
            }I wrote the TreeItem as an inner class of the managed bean.
    The most important part is the getModel methode. There you need to specify an Object and the name of the getter that will return a List of the children.
    Hope this helps.
    Edited by: Yannick Ongena on Feb 22, 2011 7:30 AM

  • Pagination issue with Command Link

    Hi
    I have a HtmlDatatable in which I am I am using pagination. Pagination is working fine the issue is one colum has been used with commnadlink.
    Whne I use the pagination(Say when I click next or last) i am not getting the hyper link in that column.
    Any idea?
    Thanks in advance
    Best Regards
    Sathish

    Hi,
    hard to say. Looks as if the browser blocks the command link when the note window launches as modal dialogs would do.  There are two reasons for this IMO
    1. The hover code also executes when you want to click the link, which means that you don#t get to executing your action. Work around is to detect whether the note window is open and if don't try and re-launch the note window
    2. If you use showPopupBehavior to launch the note window, then this actually kills all action listener methods (which then may be a second reason). So my suggestion is to try and launch the hover popup from JavaScript using an af:clientListener
       Sample code: Sameh Nassar: JavaScript With ADF Faces Samples
        the client listener should listen for the mouse over event.
    If none of this help and you have access to customer support, I suggest to create a test case and file a service request. My current guess though is that the reason for the behavior is in in your code (browsers tend to work differently in the way they execute JS events too).
    Frank

  • Issue with command link in chrome/mozilla

    Hi All,
    I have designed a simple jspx page having a command link component.
    This command link component is tied up with two sets of operations associated with it -
    > Displays a note window using hover action.
    > Launched a popup on clicking the link components.
    While performing some test runs on different browsers, I noticed different behavioural pattern -
    > Internet Explorer - Placing the cursor on link displays the note window and the command link remains enabled for the user to click on it and launch the popup.
    > Mozilla/Chrome - Placing the cursor on the link displays the note window, however, on the clicking the link, the popup doesn't launch. The user has to move and place the cursor again on the link to perform the desired event.
    Request your guidance on troubleshooting the problem.
    I am using JDeveloper version 11.1.1.7.
    Best Regards,
    Ankit Gupta

    Hi,
    hard to say. Looks as if the browser blocks the command link when the note window launches as modal dialogs would do.  There are two reasons for this IMO
    1. The hover code also executes when you want to click the link, which means that you don#t get to executing your action. Work around is to detect whether the note window is open and if don't try and re-launch the note window
    2. If you use showPopupBehavior to launch the note window, then this actually kills all action listener methods (which then may be a second reason). So my suggestion is to try and launch the hover popup from JavaScript using an af:clientListener
       Sample code: Sameh Nassar: JavaScript With ADF Faces Samples
        the client listener should listen for the mouse over event.
    If none of this help and you have access to customer support, I suggest to create a test case and file a service request. My current guess though is that the reason for the behavior is in in your code (browsers tend to work differently in the way they execute JS events too).
    Frank

  • ADF Tree with Boolean Check Box: How to find selected items

    Hi Experts,
    ADF: 11.1.1.5.0
    WLS: 10.3.6
    I am using an ADF Tree which contains elements at two levels (say Departments and Employees). My requirement is to give provision for user to select Departments and Employees using the check boxes. User should be able to select what ever Departments he/she likes and what ever employees he/she likes. There should not be a provision to select Employee with out selecting the corresponding Department (root node in the tree).
    I am facing the below issues while trying to implement this use case:
    1. Always, only the first master record will be expanded by default (I am using "Display Row" property value as "default" and "ExpandAllEnabled" as "true"). My need is to expand all the master records by default. So that user need not explicitly expand each master record node and then select the associated child records.
    2. Currently, I am using value change listener associated to af:selectBooleanCheckBox to identify the Departments and Employee records that have been selected. Since not all departments (masters) are expanded by default, if user selects the check box of department (master) and then expands the department node, automatically all the employees of that department are selected. But, this event is not triggering the value change listener for the employee records. Because of this, after a department node is selected and then expanded, all the child elements' check boxes are selected but the events are not generated. Hence, I am not able to capture the selection of employee records.
    To summarize,
    1. Please let me know how to expand all master nodes in af:Tree by default.
    2. Please let me know the best approach to identify the selected items (both master and detail items) in the af:Tree component using af:selectBooleanCheckBox.
    Thanks in advance,
    Rathnam

    Hi,
                Can you please elaborate the solution? I have a similar problem in
    https://forums.oracle.com/thread/2579664

  • How to create an lov with command link

    hi all
    i want to create an lov such that each of the values in the list have a command link. when i click on a particular value, that value should be removed from the lov list and displayed on my page.
    like for example, i want to send a mail to many ppl at the same time. from my address book, i click on the name of the person i want to send the mail and that name is added to my "Send To" list.
    Can anyone help me do this? i'm using jdev10g adf.
    thanks.
    preeti

    Hi,
    you should use the shuttle control in ADF Faces for this
    Frank

  • I want to run the h:outputText in a loop and with command link

    I have a managed bean property of type Collection (ArrayList). These collection elements should be displayed a series of hyperlinks separated by commas.
    can i refer the collection element with an index from h:outputText tag
    Thanks in advance.

    Can I achive this by using JSTL core tags and outputText. Like using c:foreach and then render the command link.
    how can we render outputText with value as a collection.
    Thanks.

  • ADF Tree with Self Join

    Hi,
    I want to make an application using component tree with one table. This table has menu_id and menu_parent.
    I got a little problem when I use self joining table, it shown all parents and children.
    I want only the root folder (parent) to be shown first and then by opening the menu_parent, i should be able to see the menu_id folders.
    Can you please help me.
    Thanks

    Hi,
    you need to have a viewcriteria in your vo for selecting the parents one, then while selecting vo in datacontrols in AM you need to select your viewcriteria in your vo by editing it.
    Also you need to have a ViewLink between same viewobjects i.e menu_id->parent->id.
    See if this helps.
    Regards,
    Santosh,

  • Activating t:inputText with command link

    I have a situation where I will have an outputText for a field say a name, I have a command link name edit which enables the name field in editable mode i.e an inputText, can some one tell me how can I do this? I guess I can use render, I am not sure, any ideas and suggestions?
    <htm:tr styleClass="h2">
              <htm:td>
                   <h:outputText value="Organization Name Information:" />
              </htm:td>
              <htm:td>
                   <t:commandLink id="EditOrgInformation"
                        forceId="true"
                        value="EDIT"
                         action=""
                         onclick="if(submitFlag){return false;}else{submitFlag=true;return true;}" />
              </htm:td>
         </htm:tr>
         <htm:tr styleClass="oddRow">
              <htm:td>
                   <h:outputText value="Name:" />
              </htm:td>
              <htm:td>
                   <h:outputText value="#{lo.name }" />
              </htm:td>
         </htm:tr>

    If you want to do it synshronously, indeed use the rendered attribute. Use its positive outcome in inputText and its negative outcome in outputText. If you want to do it asynchronously, then use Javascript+DHTML or an Ajaxical JSF component library.

  • Help:UIModel.xml file for ADF Tree with three level depth

    Hello,
    I am trying to create a DCTree with structure like this:
    root....branch1----child11,child12
    ..........branch2......branch21---child212,child212
    ............................branch22---child221,child222
    Because I can not create more than one binding rule due to the problem that "Add New Rule" button disappears after the first rule is created when I use the tool under Createbinding/Input/Tree to create the DCTree.
    Could somebody post or send me a script of the UIModel.xml file of the tree structure above so that I can work around this problem?
    Thanks in advance,
    Deborah

    Hi,
    I haven't test it for more than 3 layers but I have never seen this limitation mantioned anywhere.
    I used HGrid and this is my code:
    1. UIX file (the relevant part highlighted):
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el"
    xmlns:myTemplate="test">
    <templates xmlns="http://xmlns.oracle.com/uix/ui">
    <templateImport source="baseTemplate.uit"/>
    </templates>
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title=""/>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <form name="form0">
    <contents>
    <myTemplate:baseTmpl title="" xmlns:myTemplate="test">
    <contents>
    <rowLayout>
    <contents>
    <link text="Bets View" destination="browseCustBets.do"/>
    <spacer width="10" height="10"/>
    <link text="Customer Bets" destination="viewCustBets.do"/>
    </contents>
    </rowLayout>
    <rowLayout>
    <contents>
    <spacer width="10" height="10"/>
    </contents>
    </rowLayout>
    <rowLayout>
    <contents>
    <hGrid id="hg1" treeData="${uix.data.treeData}" proxy="${uix.eventResult.hGridProxy}">
    <columnHeaderData>
    <col text="Email"/>
    <col text="Bet Date"/>
    <col text="ID"/>
    <col text="Is Winner"/>
    <col text="Amount"/>
    <col text="Rate"/>
    </columnHeaderData>
    <columnHeaderStamp>
    <text text="${uix.current.text}"/>
    </columnHeaderStamp>
    <columnFormats>
    <columnFormat columnDataFormat="textFormat" width="140"/>
    <columnFormat columnDataFormat="textFormat" width="160"/>
    <columnFormat columnDataFormat="textFormat" width="40"/>
    <columnFormat columnDataFormat="textFormat" width="70"/>
    <columnFormat columnDataFormat="textFormat" width="70"/>
    <columnFormat columnDataFormat="textFormat" width="40"/>
    </columnFormats>
    <contents>
    <text text="${uix.current.Email}"/>
    <text text="${uix.current.BetDate}"/>
    <text text="${uix.current.BetID}"/>
    <text text="${uix.current.IsWinner}"/>
    <text text="${uix.current.Amount}"/>
    <text text="${uix.current.Rate}"/>
    </contents>
    </hGrid>
    </contents>
    </rowLayout>
    </contents>
    <tabs/>
    <pageButtons/>
    <globalButtons/>
    <pageHeader/>
    <start/>
    <end/>
    <about/>
    <copyright/>
    <privacy/>
    <corporateBranding/>
    <productBranding/>
    </myTemplate:baseTmpl>
    <formValue name="${bindings.statetokenid}" value="${bindings.statetoken}" id="_uixState"/>
    </contents>
    </form>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    <provider>
    <data name="treeData">
    <method class="view.CreateTreeData" method="getTreeData"/>
    </data>
    </provider>
    </dataScope>
    </content>
    <handlers>
    <event name="*">
    <method class="view.BetDetailsAction" method="doHGridEvent"/>
    </event>
    </handlers>
    </page>
    2. CreateTreeData class:
    It has a static method getTreeData() that returns a DataObject containing the tree nodes. This methode is mentiond in <provider> node in UIX/XML.
    package view;
    import java.util.Enumeration;
    import model.*;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.ServletConstants;
    import oracle.cabo.servlet.ui.BajaRenderingContext;
    import oracle.cabo.ui.RenderingContext;
    import oracle.cabo.ui.UIConstants;
    import oracle.cabo.ui.data.DataObject;
    import oracle.cabo.ui.data.servlet.HttpSessionDataObject;
    import oracle.cabo.ui.data.tree.SimpleTreeData;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.ViewObject;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCDataControl;
    //import oracle.jbo.common.Configuration;
    import javax.servlet.http.HttpSession;
    import oracle.jbo.client.Configuration;
    public class CreateTreeData
    public CreateTreeData()
    public static DataObject getTreeData(RenderingContext context, String namespace, String name)
    // create root node
    SimpleTreeData root = new SimpleTreeData();
    int BetID = 0;
    // get the parameter from url
    BajaContext bContext = (BajaContext) context.getProperty(ServletConstants.BAJA_NAMESPACE,
    BajaRenderingContext.BAJA_CONTEXT_PROPERTY);
    HttpSession session = bContext.getServletRequest().getSession(true);
    try
    //BetID = new Integer(( bContext.getServletRequest( ) ).getParameter( "BetID" )).intValue();
    String s = ( bContext.getServletRequest( ) ).getQueryString();
    BetID = new Integer(s).intValue();
    session.setAttribute("BetID", s);
    //BetID = new Integer(session.getAttribute("BetID").toString()).intValue();
    catch ( Exception ex)
    // log the error on the console
    BetID = new Integer(session.getAttribute("BetID").toString()).intValue();
    //System.out.println( "Parameters cannot be retrieved" );
    //System.out.println( ex.getMessage() );
    String amDef = "model.AppModule";
    String config = "AppModuleLocal";
    ApplicationModule am = Configuration.createRootApplicationModule(amDef, config);
    AppModuleImpl myAm = (AppModuleImpl)am;
    root = myAm.createNodesData(BetID);
    myAm.remove();
    Configuration.releaseRootApplicationModule(am,true);
    // return the tree
    return root;
    3. createNodesData(int Id) is the actual function that creates the data structure containing the nodes.
    It is in AppModule. The actual tree is kept in one table and every node knows its parent ID. There is no limitation in depth.
    This function is called recursively until the tree is finished and the parameter Id is the Id of the parent node that I want to be listed. Tne top parent nodes has null in ParentID field.
    public SimpleTreeData createNodesData(int Id)
    SimpleTreeData tData = new SimpleTreeData();
    String baseSQL =
    "SELECT Bet.ID, Bet.CUST_LOGIN_ID, Bet.BET_CLASS_ID, Bet.PARENT_BET_ID," +
    "Bet.CHAMPIONSHIP_ID, Bet.AMOUNT, Bet.WIN_RATE, Bet.IS_WINNER, Bet.BET_DATE, " +
    "BetClass.NAME, CustLogin.EMAIL, CustLogin.ID AS CUST_LOGIN_ID " +
    "FROM BET Bet, CUST_LOGIN CustLogin, BET_CLASS BetClass " +
    "WHERE (Bet.CUST_LOGIN_ID = CustLogin.ID) AND (Bet.BET_CLASS_ID = BetClass.ID) ";
    if(Id!=0){
    String sqlStmt = baseSQL + " AND (Bet.ID = '"+ Id +"')";
    ViewObject betVo = this.createViewObjectFromQueryStmt("betVo", sqlStmt);
    betVo.executeQuery();
    if(betVo.hasNext())
    //SimpleTreeData tData = new SimpleTreeData();
    tData.setText(betVo.first().getAttribute("NAME").toString());
    if(betVo.first().getAttribute("PARENT_BET_ID")==null)
    tData.put("Email", betVo.first().getAttribute("EMAIL").toString());
    tData.put("BetDate", betVo.first().getAttribute("BET_DATE").toString());
    tData.put("BetID", betVo.first().getAttribute("ID").toString());
    tData.put("IsWinner", betVo.first().getAttribute("IS_WINNER").toString());
    tData.put("Amount", betVo.first().getAttribute("AMOUNT").toString());
    tData.put("Rate", betVo.first().getAttribute("WIN_RATE").toString());
    if(Integer.parseInt(betVo.first().getAttribute("BET_CLASS_ID").toString())>1){
    tData.setExpandable(UIConstants.EXPANDABLE_EXPANDED);
    betVo.remove();
    String sqlStmt = baseSQL + " AND (Bet.PARENT_BET_ID = '"+ Id +"')";
    ViewObject betVo = this.createViewObjectFromQueryStmt("betVo" + Id, sqlStmt);
    betVo.executeQuery();
    while(betVo.hasNext()){
    tData.addChild(createNodesData(Integer.parseInt(betVo.next().getAttribute("ID").toString())));
    betVo.remove();
    return tData;
    Hope this will help...

  • Adf Tree with checkboxes beside..

    Hi All....
    I have a requirement to make an application in adf (in j dev) where in i want a tree structure, beside each node in my tree,there should be 6 coloumns with checkboxes(the checked or unchecked values should get reflected in a DB table).Is it possible?and if yes,can u tell me any tutorial or a direction,as to how to proceed?
    I could make a tree structure,but that doesnt serve my need.:(
    Please help....
    Waiting for your posts...
    Thank you!!!!:)

    Check out SRDemo, there is an example of something similar there.

  • ADF Tree with several sublevel : how to dinamically change labels ?

    Hello,
    I defined a tree (not treetable) like this
    Label (12)
      Sublevel (5)
        Another (0)
      Second (1)
    Label Two (5)
    ...  The number is corresponding to the number of element present in the corresponding level, number could be different depending on the user.
    For each level I have a VO, having a ViewCriteria to filter user or not (display user's elements or all element)
    I use a selectoneradio to change display.
    When I change the filter, the display of the first level changes (for instance "Label (12)" updated to "Label (25)"). But sublevel are not updated.
    How can I have the text updated ?
    In nodeStamp facet, I tried both outputtext and activeoutputtext with value :
    value="#{node.NodeLabel} (#{node.NodeNumber})"But sublevel never updated, and VO successfully updated (it seems)
    Any idea ?

    I add a precision. In fact the problem does not come from the labels, but the sub-level queries seem not updated.
    level 1 query looks like :
    select node_label,node_number,node_key,parent_key
      from (
        select level1.label,mypackage.getnumber(level1.key,:user),level1.key,null
          from common.level1)level 2 query looks like :
    select node_label,node_number,node_key,parent_key
      from (
        select level2.label,mypackage.getnumber(level2.key,:user),level2.key,level2.parent
          from common.level2)In the tree, if the bind variable :user is changed (through setuser method in the VO Java's code) and the VO's method (level1 and level2) executeQuery is called, the tree still displays the result of the first call fot sub-levels (starting at level2) although the first level is well updated.

  • ADF Table and Command Link

    Hi,
    I am using version 11.1.1.5.0;
    I am facing an issue with a commandLink held in a table column and it's actionListener not firing ahead of the selectionListener of the table.
    The selectionListener of the table call a method in the backing bean to show/hide like a toggle affect. When the commadLink is visible and selected there is an actionListener to execute another method but the tables selectionListener takes precedence and the commandLink is hidden.
    Any suggestions?
    Regards
    Sun-E

    JSF Fragment code:
    <af:table value="#{bindings.clearedConditionsVO1.collectionModel}"
    var="row" rows="#{bindings.clearedConditionsVO1.rangeSize}"
    id="t4" rowSelection="single" styleClass="conTable"
    columnStretching="column:col2" horizontalGridVisible="false"
    verticalGridVisible="false" fetchSize="100"
    *selectionListener="#{pageFlowScope.consRIBean.cleConSelListner}"*
    contentDelivery="immediate" rowBandingInterval="0"
    autoHeightRows="100">
    <af:column id="col2">
    <af:panelGroupLayout id="pgl59" layout="vertical"
    styleClass="conditionsIter2" valign="top">
    <af:panelGroupLayout id="panelGroupLayout16" layout="vertical">
    <af:outputText id="outputText9" value="Affected plot(s):"
    styleClass="outstanding_right"/>
    <af:outputText value="#{row.bindings.Clearedplots.inputValue}"
    id="outputText10" styleClass="conText"/>
    </af:panelGroupLayout>
    <af:panelGroupLayout id="pgl63" layout="horizontal"
    styleClass="gap1"
    rendered="#{row.exCol eq 'true' ? 'true' : 'false'}">
    <af:outputText id="ot35" value="Creation date:"C
    <af:panelGroupLayout id="pgl64" layout="horizontal"
    styleClass="APdpr"
    rendered="#{row.exCol eq 'true' ? 'true' : 'false'}">
    <af:panelGroupLayout id="pgl65" layout="horizontal"
    halign="left">
    <af:outputText value="contact: #{row.bindings.Contact.inputValue}"
    id="ot37" styleClass="conText"/>
    </af:panelGroupLayout>
    <af:panelGroupLayout id="pgl66" layout="horizontal"
    halign="right">
    <af:image source="/images/arwlink_arrow.png" id="i7"
    shortDesc="back"/>
    <af:commandLink text="Contact" id="cl18"
    styleClass="arwlink"
              *actionListener="#{pageFlowScope.consRIBean.openPopUp}">*
    <af:setPropertyListener from="#{row.ConditionRiId}"
    to="#{pageFlowScope.conditionRIiD}"
    type="action"/>
    </af:commandLink>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    <af:outputText value="Job Ref: #{row.bindings.FusionJobId.inputValue}"
    id="ot38"
    rendered="#{row.exCol eq 'true' ? 'true' : 'false'}"
    styleClass="conText"/>
    <af:spacer width="10" height="10" id="s24"/>
    <af:panelGroupLayout id="pgl60"
    rendered="#{row.exCol eq 'true' ? 'false' : 'true'}">
    <af:image source="/images/arwlink_add.png" id="i8"
    shortDesc="Read more"/>
    <af:commandLink text="Read more" id="cl11"
    styleClass="arwlink"
    action="#{pageFlowScope.consRIBean.showClearConCollection}">
    <af:setPropertyListener from="#{row.ConditionRiId}"
    to="#{pageFlowScope.conditionRIiD}"
    type="action"/>
    </af:commandLink>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    <af:panelGroupLayout id="pgl68" styleClass="conditionsIter4"
    layout="vertical" valign="top"
    rendered="#{row.exCol eq 'true' ? 'true' : 'false'}">
    <af:outputText value="Documents tagged to this condition:"
    id="ot39" styleClass="DocCons"/>
    <af:panelGroupLayout id="pgl69" styleClass="gap1">
    <af:image source="/images/arwlink_arrow.png" id="i9"
    shortDesc="Send"/>
    <af:commandLink text="Send now" id="cl12" styleClass="arwlink"/>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    <af:spacer height="15" id="s13"/>
    </af:column>
    </af:table>
    </af:panelGroupLayout>

  • Command Link in ADF table is not working/ PPR event not getting fired

    Hi All,
    I am having ADF Table, in that one column is with command link if click on command link, it is not navigating to corresponding page or method of a bean. If i give same command link out of the table it working fine, this issue i am facing is in IE9.
    if i use IE in compatibility mode the links works fine, even in IE8 version also.
    Browser: IE 9
    Jdev version: 11.1.1.5.0
    I tried all possible things, but nothing workout for me.
    showPopupBehavior not working in IE9 for af:table buttons (jdev11.1.1.5.0)
    Partial page rendering not working in ie9
    Command Link in ADF table is not working
    Thnks

    Hi,
    please file a bug if you have a customer support contract and provide a testcase
    Frank

Maybe you are looking for