Issue with af:tree component

Hi All,
I am using JDev 11.1.1.6
I am creating a tree component with collection model.I want to provide different action to each node,so I have defined an action attribute in the bean
which I set in the constructor as shown below
TestTree node1 = new TestTree("node1", "#{TreeBean.action1}");
Is this the correct approach..This gives me "method not found " error when I click on the node.
Below is the code for tree component :
<af:tree value="#{TreeBean.model}" id="t1" var="node"
styleClass="AFStretchWidth" inlineStyle="height:600.0px;">
<f:facet name="nodeStamp">
<af:commandLink text="#{node.label}" id="cl1" immediate="true"
actionListener="#{node.action}"/>
</f:facet>
<f:facet name="pathStamp"/>
</af:tree>

Hi Vinay,
UseCase :
I want a tree showing navigation links . these navigation links will be used to open a new page in panelTabbed Layout.

Similar Messages

  • Layout issue with af:tree component

    I am using af:tree component but I am finding layout issue with it. I have a requirement where in I need the tree to stretch to the available space but a horizontal and a vertical scrollbar comes up automatically. Is there a way to handle this issue?

    User, without your jdev version it's hard to help.
    Have you embedded the tree component in a stretch layout?
    Timo

  • Browser specific Issue with af:fileDownloadActionListener/ component.

    Hi all,
    We are facing an issue with <af:fileDownloadActionListener/> component.
    The issue is that when we download a particular file to the local system/machine, after downloading the file using <af:fileDownloadActionListener/>, none of the actions/links/button work on the page thereafter. We have to do a browser refresh or switch the URL.
    After doing some investigation, it is looking like a browser specific issue, as this is reproducible only on chrome but not on firefox or IE.
    The UI component used is <af:fileDownloadActionListener/> component. Below is the snippet of the code. Is there anything to be specified for af:fileDownloadActionListener?
    <f:facet name="buttonBar">
    <af:panelGroupLayout partialTriggers="expPoll expProgess" id="gsexppgl11">
    <af:commandButton text="#{uib_o_w_w_r_WebCenter.LABEL_DOWNLOAD}"
    shortDesc="#{uib_o_w_w_r_WebCenter.LABEL_DOWNLOAD}"
    id="expClientp"
    disabled="#{!pageFlowScope.o_w_w_i_v_b_l_WebCenterExportBean.showExportButtons}">
    <af:fileDownloadActionListener filename="#{pageFlowScope.o_w_w_i_v_b_l_WebCenterExportBean.fileName}"
    contentType="application/force-download; charset=utf-8"
    method="#{pageFlowScope.o_w_w_i_v_b_l_WebCenterExportBean.dumpOAROnClient}"/>
    </af:commandButton>
    </af:panelGroupLayout>
    </f:facet>
    Anyone has faced this issue before? Is this a known issue?
    Thanks,
    Ankush

    Jdveloper version is 11g. But we saw this issue with 12c as well.
    I have reproduced this in a standalone application as well. I had a page on which I just had a button attached to the file download component. And I faced the similar situation - works fine on IE/FF but causing issues on chrome/safari.

  • How to build a form with a tree component

    Hi, i'd like to know if it's posssible to build a form with
    the Flash 8 Tree component.
    My menu looks like a tree but the childnodes of this tree are
    some form criteria that you can aditionate and post to a serveur.
    I try to use the accordeon menu, and it works but my menu
    must have dynamic heigth, and open all the boxes like the tree
    component...
    I'm in a hole... please healp me...
    Thinks

    Sans,
    I am no Apex expert, but with a situation as "complex" as yours, have you thought about creating a VIEW that joins these 7/8 tables, placing an INSTEAD OF trigger on that view to do all the business logic in the database, and base your application on the view?
    This is the "thick-database" approach that has been gaining momentum of late. The idea is to put your business logic in the database wherever possible, and let the application (Form, Apex, J2EE, whatever) concentrate on UI issues,

  • Issue With ADF Tree Expand/Collapse

    Hi All,
    I have a customer who is having issues using the af:tree component on a deployed application. When he tries to expand or collapse a node of the tree, the icon just blinks. This is occurring not only on our application, but also the Oracle ADF Rich Client Demo on http://jdevadf.oracle.com/adf-richclient-demo/faces/components/tree.jspx. He is using Internet Explorer v7.0.5730.13. As far as I can tell, our browser settings are identical, but I can use the tree without a problem.
    Any ideas as to what the problem could be?
    Thanks,
    Brad

    Unfortunately, Internet Explorer is the only browser that is authorized to run on his computer.
    Do you know of any specific IE settings that would cause the af:tree not to work?

  • Issue with "firstRecord" Business Component method of JAVA Data bean API.

    Hi,
    Following is my use-case scenario:
    I have to add or associate child MVG business component (CUT_Address)
    with the parent business component (Account) using JAVA Data bean API.
    My requirement is: first to check whether child business component(i.e. CUT_address) exists. If it exists then associate it with parent business component (Account)
    otherwise create new CUT_address and associate it with account.
    Code (using JAVA Data bean APIs) Goes as follows:
    SiebelBusObject sBusObj = connBean.getBusObject("Account");
    parentBusComp = sBusObj.getBusComp("Account");
    SiebelBusComp parentBusComp;
    SiebelBusComp childBusComp;
    // retrieve required account.. Please assume Account1 exists
    parentBusComp.activateField("Name");
    parentBusComp.clearToQuery();
    parentBusComp.setSearchSpec("Name", "Account1");
    sBusComp.executeQuery2(true, true);
    sBusComp.firstRecord();
    Counter = 0;
    while (counter < Number_Of_Child_Records_To_Insert)
    childBusComp = parentBusComp.getMVGBusComp("City");
    associatedChildBusComp = childBusComp.getAssocBusComp();
    childBusComp.activateField("City");
    childBusComp.clearToQuery();
    childBusComp.setSearchSpec("City", Vector_of_city[counter]);
    sBusComp.executeQuery2(true, true);
    if( sBusComp.firstRecord() )
    // Child already exist and do processing accordingly
    else
    // Child does not exist and do processing accordingly
    childBusComp.release();
    childBusComp = null;
    associatedChildBusComp.release();
    associatedChildBusComp=null;
    Now the issue with this code is: For the first iteration, SbusComp.firstRecord returns 0 if records does not exist. However from the second iteration, SbusComp.firstRecord returns 1 even if there is no record matching the search specification.
    Any input towards the issue is highly appreciable.
    Thanks,
    Rohit.

    Setting the view mode to "AllView" helped.
    Thanks for the lead!
    In the end, I also had to invoke the business component method SetAdminMode with "true" as the argument so that I could also modify the records from my script.

  • Issue with af:selectOneChoice component

    Hi All,
    I am facing issue when using the selectOneChoice components in the below scenario
    I have a page fragments, lets say it as MainPage.jsff, where records are shown in table. On selecting a record and pressing the update button the user moves to EditPage.jsff where the record is shown in editable mode. The MainPage.jsff and EditPage.jsff are based on the same View Object Instance. The EditPage.jsff contains 4 fields,
    field1 - Non Editable
    field2 - Non Editable
    field3 - Editable - selectOneChoice - dependent on field1 and field2. Achieved by setting the bind values in the View Accessors.
    field4 - Editable - selectOneChoice -dependent on field1, field2, field3. Achieved by setting the bind values in the View Accessors.
    Test Case: -
    User selects a record and clicks the edit button, all the fields - fields1, field2, field3, field4, fetch the correct values for the record. So far so good.
    Now, the user navigates back to MainPage.jsff and selects another record and clicks on the update button. This time the values of the field1 and field2 are proper but the values of field3 and field4 which are editable and displayed in selectOneChoice component display some other value with select item of the list containing only one item. Is there some caching issue with the selectOneChoice components which is creating the issue?
    When i do a browser refresh at this stage, the values in the fields - field3 and field4 are automatically set to correct value.
    Also, when i drop field3 and field4 from the view object as simple <af:outputText> the values are shown with correct values.
    Is there anything which i am missing?
    Thanks,
    Tarun
    P.S Though the page contain other components i have narrowed down the test case and considered only the components with the issue.

    Hi Tarun.
    I think selectOneChoices are not refresh try in your EditPage.jsff button ActionListner with fillowing way with partial trigger
    Craete binding attribute for two selectOneChoice and then
    YourBindUIComponent.resetValue();
    AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
    adfFacesCtx.addPartialTarget(YourBindUIComponent);

  • Issue with af:tree

    The af:tree element always tries to display a node as if it has children, even if its child List is of size 0. The result is that all nodes appear as expandable folders and when you expand on a node that has no children you get a vertical line leading to nothing. Clearly this isn’t desirable. This behavior is seen even when using your packaged sample code as shown below:
    public class Person
    public Person(String name)
    _name = name;
    public String getName()
    return _name;
    public List getKids()
    return _kids;
    private final String _name;
    private final List _kids = new ArrayList();
    You can construct a tree by:
    Person john = new Person("John Smith");
    Person kim = new Person("Kim Smith");
    Person tom = new Person("Tom Smith");
    Person ira = new Person("Ira Wickrememsinghe");
    Person mallika = new Person("Mallika Wickremesinghe");
    john.getKids().add(kim);
    john.getKids().add(tom);
    ira.getKids().add(mallika);
    List people = new ArrayList();
    people.add(john);
    people.add(ira);
    Now you can construct a TreeModel by:
    TreeModel model = new ChildPropertyTreeModel(people, "kids");

    Hi,
    Even I have the same issue. How can I get it right in ADF Faces tree component.
    Thanks,
    Ankit

  • Error in drag and drop with a Tree component

    Hello, everybody.
    I'm doing a drag and drop with two trees.
    But, when I drag from a tree to another show this error:
    "oracle.job.RowNotFoundException:JBO25020: View line of oracle.jbo.Key[4.4] key not found in ViewTreeNodeRepository13_71."
    Besides that, in my property SelectionListerner, when I have this line: "#{bindings.TreeNodeRepository.treeModel.makeCurrent}" there is a warning that says: "Reference makeCurrent not found".
    Anyone can help me?
    Thanks!

    Hi,
    +Besides that, in my property SelectionListerner, when I have this line: "#{bindings.TreeNodeRepository.treeModel.makeCurrent}" there is a warning that says: "Reference makeCurrent not found".+
    Don't worry, its a designtime warning because the EL cannot be resolved. MakeCurrent is a method on the FacesCtrl binding equivalent to ADF, which is applied at runtime and not available at design time
    +But, when I drag from a tree to another show this error: "oracle.job.RowNotFoundException:JBO25020: View line of oracle.jbo.Key[4.4] key not found in ViewTreeNodeRepository13_71."+
    In drag and drop, ADF Faces performs the drag. However, the rest of the drop handling is up to the developer. Without any more information of what yur drop handler is doing, this question cannot be answered
    Frank

  • Issue with ADF Tree Table

    Hi,
    I have the following requirement where i need to display a tree table. Here is how the initial implementation is:
    I have created the read only view for : ManagersVO > PoolsVO > MachinesVO. Where 'MachinesVO' is the destination view. And created view links between ManagersVO & PoolsVO using ManagerId and PoolsVO & MachinesVO using PoolId.
    And using this implementation, successfully created tree table on the UI. Now we got an enhancement for this:
    i.e., MachinesVO should return list of machines as per user logs in. i.e., we have 4 different roles. 'Super Admin', 'Sys Admin', 'App Admin', 'End User'. The default query for MachinesVO is for 'Super Admin'. The query for other user roles is different except the SELECT statement.
    The requirement is to dynamically change the query of MachinesVO based on user logs in and display the tree table accordingly. To implement the same i have tried using setQuery() operation on 'MachinesVO' which results with the following error:
    JBO-26016: InvalidOperException
    Cause: You cannot set customer query (calling setQuery()) on a view object if it is the detail view object in a master detail view link.
    Action: Do not call setQuery() if the view object is a detail.
    Can one suggest me a best solution to implement this.
    Thanks & Regards,
    Kiran

    Hi Navaneetha Krishnan,
    Here is how i implemented based on your comments. As i have tree table based 3 different VO's, created the following method at middle view(i.e., PoolsVO).
    1.Tree Model hierarchy
    ManagersVO > PoolsVO > MachinesVO
    I actually want to filter the data at Machines level. Hence wrote a method at PoolsVOImpls and exposed it in the PoolsVO client interface. Here is the code that i have placed in the PoolVOImpl
    public class PoolsVOImpl extends ViewObjectImpl implements PoolsVO{
         * This is the default constructor (do not remove).
        public PoolsVOImpl () {
      public void filterMachinesDataByUserRole(String userRole,String vzId){
        Row row = getCurrentRow();
        String query = "";
        if(row != null){
          RowSet rowSet = (RowSet)row.getAttribute("MachinesVO");
          if(rowSet != null){
            MachinesVOImpl machinesVOImpl = (MachinesVOImpl)rowSet.getViewObject();
            if(userRole.equalsIgnoreCase("SYS ADMIN")){
                    machinesVOImpl .setWhereClause(query related to sysadmin);
             //Similarly for other user roles.
             executeQuery();
    }And this piece of code needs to be executed before the jsff(which has the tree table) renders. Hence, i created a this methodAction as a default activity in the respective taskflow where the jsff is placed. Once this method get executed, the page should render the machines specific to the user.
    Here is the issue: getCurrentRow() method call is returning always NULL.
    Please correct me if i'm doing something wrong. I do tried the above mentioned approach by creating the method at '*ManagersVOImpl*' level too. Still the same issue.
    Thanks & Regards,
    Kiran

  • Issue with af:tree's visible=false on IE

    Hello,
    I have an ADF page containing two af:tree components. For both rendered is set to true and visibility is set to false. For both the trees height has been set to 500px. Based on selection criteria either of the two trees has to be made visible. No issues on Firefox. However on IE, both the trees are occupying space even though visibility is set to false. When I try to show the second tree, it shows up down below after 500px of white space. So, even though first tree is not displayed, it still occupies the space. Please let me know the solution.
    Thanks,
    Lalitha.

    Hi,
    sounds like a bug to me. You can try an af:switcher component, though it only shows one tree at a time then
    Frank

  • Issues with interactivity between component states and page states

    Hi there, I recently downloaded the trial of Catalyst 5.5 and am encountering the following problem:-
    I have many screens in my application and am attempting to get around the 20 state limit by creating custom components that contain multiple states that can be used as screens. So, I have created button links between the component states which work fine but have also created button links to and from the standard states of the application, which dont work upon running/publishing. I'm not quite sure whats wrong here as the button commands are pointing to the right place, i.e. they are pointing firstly to the specific custom component and then the state within the component, but its just not working.
    Is this a trial issue or something deeper?
    I really hope someone can help as apart from this issue I have been very happy with the application but if I can not find a solution theres no point in purchasing it.
    Cheers.

    Ive had the same problem. Im trying to create an interactive e-book but im having problmes with the limit of states. I have now worked out that i have to create custom components to create a sub-state but im finding it difficult to go between sub states. Help anyone?

  • Issue with alv tree

    Hello,
    Im using cl_gui_alv_tree_simple to display my internal table in a tree format with the internal table sorted out for three columns. Now when I click on the parent node i shud do an action and when I click at child i need to do a dofferent action. How do i know whether i clicked at the parent node or child node? Is there any event to identify this so that I can go ahead and do my operation for the respective parent and child. Thanks

    Use method get_outtab_line
    then you get the content of the clicked node
    METHOD handle_item_double_click.
        PERFORM detail USING node_key.
      ENDMETHOD.  
    FORM detail  USING    p_node_key.
      CALL METHOD tree1->get_outtab_line
        EXPORTING
          i_node_key    = p_node_key
        IMPORTING
          e_outtab_line = wa_tree.
      IF wa_tree-matnr IS INITIAL .
      ENDIF.
    if .
    endif.
    best regards
    Joerg

  • Help with a vertical scroll bar issue with a List component

    hi. i have a basic <s:list> that uses an XMLListCollection as it's data provider and a very basic itemrenderer. when a row in the list is clicked a function gets the list.selectedIndex then populates some text fields with more xml data. that all works fine.. the problem i have is that the vertical scroll bar on the list seems to be "clickable" - just like a row in the list. the scroll bar scrolls normally but when it's clicked the selectedIndex becomes -1 which is not helpful b/c the value -1 is passed to the XMLListCollection.
    any ideas? cheers.

    thanks but still problematic...surely the <s:List> component shouldn't return a value when the scrollbar thumb is clicked? i created a very basic list (see below) and made the list dimensions short enough so that there is a vertical scrollbar and found that when the scrollbar thumb is clicked the trace(event.currentTarget.selectedIndex) returns a number. that's annoying b/c i just want a selectedIndex value for a row that is clicked not the scrollbar.
    any ideas to get around? cheers
    <fx:Script>
    <![CDATA[
    protected function list1_clickHandler(event:MouseEvent):void
    trace(event.currentTarget.selectedIndex);
    ]]>
    </fx:Script>
    <s:List x="162" click="list1_clickHandler(event)" y="276" labelField="@label" width="144" height="153">
    <s:dataProvider>
    <s:XMLListCollection>
    <fx:XMLList xmlns="">
    <node label="one"/>
    <node label="two"/>
    <node label="three"/>
    <node label="four"/>
    <node label="five"/>
    <node label="six"/>
    <node label="seven"/>
    <node label="eight"/>
    <node label="nine"/>
    <node label="ten"/>
    <node label="eleven"/>
    </fx:XMLList>
    </s:XMLListCollection>
    </s:dataProvider>
    </s:List>

  • Absolute Path issue with af:inputFile component

    Hi All,
    I am using an input file component and selecting a file from location "C:/temp.xml".In the code, I am trying to get the absolute path of the file selected and since the input type of this component is "UploadedFile", I have created a variable SourceFile of type "UploadedFile" this is what I am doing to get the path:
    <af:inputFile label="Source File" id="if1"
    value="#{viewScope.UpdateMetadataBb.sourceFile}"
    autoSubmit="true" required="true"
    showRequired="true"/>
    In the Bean:
    UploadedFile source = this.getSourceFile();
    File sourceFile = new File(source.getFilename());
    String path = sourceFile.getAbsolutePath();
    Now when I print the "path" it returns something like "C:/users/Swathi/appdata/roaming/..../text.xml" instead of directly giving "C:/temp.xml", Any ideas?
    Thanks,
    Swathi Patnam

    Hi Timo,
    As you said the InputFile component writes the file in the temporary directory but in my case it is not able to write it in the temp directory.
    I am using Jdeveloper11.1.1.5 and i have created an application and deployed on the SOA Server.Now when i try to get the file, it gives the file not found exception and it shows the path as :- javax.faces.el.EvaluationException: javax.xml.ws.WebServiceException: java.io.FileNotFoundException: D:/Oracle/Middleware/UserProjects/Domains/base_domain/abc.TIFF.
    I have implemented the same application and deployed on the integrated weblogic server and it is working fine but as i have deployed on the SOA Server then it is not able to write the file at the particular location.
    Is there any extra configuration which needs to be done while using the InputFile component on the managed server ??
    Even i have started the SOA Server with the admin rights but no help..
    Even i have used this parameter in web.xml file to store the file in another location but no help :-
    <context-param>
    <description>Directory to store temporary files</description>
    <param-name>org.apache.myfaces.trinidad.UPLOAD_TEMP_DIR</param-name>
    <param-value>C:/tmp/</param-value>
    </context-param>
    Please suggest!!!
    Regards,
    Shah

Maybe you are looking for