TreeTable Selection

Hi,
I am using the treeTable described in treeTable2 example.
I want my treeTable to only allow contiguous selection.
I tried setting the selection mod of the TreeSelectionModel to be Contiguous selection
i.e
When I am creating my TreeTable, I call the following
TreeSelectionModel mod = treeTable.getTree().getSelectionModel();
//mod.CONTIGUOUS_TREE_SELECTION;
System.out.println(mod.getSelectionMode());
mod.setSelectionMode(TreeSelectionModel.mod.CONTIGUOUS_TREE_SELECTION);
When I debug the code above, I can see that the selection mode is being changed, but my tree still allows me to select all tree nodes.
Even if I set the selection mode to SINGLE_SELECTION I can select all the nodes.
Can some one please direct me in the right direction
Thanks

Is it possible to extend the color class in order to create this 'bar' effect??? i have looked at the paintconectext method but to no avail.
Thanks
Rudy

Similar Messages

  • Issue with treetable selection listner in ADF

    Hi Experts,
    we are working on JDEV 11.1.1.2.
    here we have a tree table.
    Inorder to get the selected row data in a tree table we are using following code in backing bean.
    public void qaTableSelectList(SelectionEvent selectionEvent) {
    String selectedQaCode ="";
    RichTreeTable treeTable = (RichTreeTable)getQaReasontreeTable();
    RowKeySet _selectedRowData = treeTable.getSelectedRowKeys();
    Iterator rksIterator = _selectedRowData.iterator();
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    JUCtrlHierBinding treeTableBinding =
    (JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
    JUCtrlHierNodeBinding nodeBinding =
    treeTableBinding.findNodeByKeyPath(key);
    selectedQaCode = nodeBinding.getAttribute(0);
    //use this var "selectedQaCode".
    Initailly this code are working fine for a long time
    Now suddenly its stopped working.
    some time its returning the selected value some times not.
    What will be the issue can any one suggest alternate solution.
    regards
    Gayaz

    It changed about 2-3 weeks ago.
    I haven't done anything to it at all. I just drag an mp3/wav, chop it, save it and I'm done, so I'm not sure why it would all of the sudden change
    It's also noteworth that I reinstalled it several times and it hasn't fixed it. Could it be left-over files from the initial install that weren't unistalled and remained, which affected the reinstall? If so, where would I find them?

  • ADF TreeTable: selective expand/collapse of rows

    Hi
    I have a query. How can i selectively expand or collapse nodes in a Tree Table. I have got the tree model but i need to expand even further so that the nodes can be expanded/collapsed initially based on some logic.
    It would be of great hhelp if any1 has some solution to it

    This doesnt work
    What i am doing:
    1. I have a TreeTable
    2. Its value is a TreeModel whose each node is my customized Object : MyObject
    So if i use this kinda code which is in ur tutorial
    CollectionModel model = (CollectionModel)tree1.getValue();
    treeBinding = (JUCtrlHierBinding)model.getWrappedData();
    I get a classcastexception:
    MyObject cannot be cast to oracle.jbo.uicli.binding.JUCtrlHierBinding
    since model.getWrappedData(); returns the root node of the tree which should be of my customized Object type

  • TreeTable Selection Listener Issue

    I have a treeTable and i have used custom selection Listener instead of using bindings.<viewObject>.treeModel.makeCurrent. since i had to do more than just makeCurrent on selection, i choose this approach. Everything is working except, when i refresh the treeTable after create, the activeRow will be first row but selection shows on where i have last selected.
    My custom selectionListener is working very fine but i have noticed that when i refresh treeTable selectionListener is never called. but only called when i make selection... Is there anyway i can get my custom selectionListener be called on refresh of treetable or is there any other way i can control selection on fresh of treeTable.
    It will be highly appreciated if you can suggest me way.
    Thanks

    Thanks Timo for the reply. I have a customization to select the second row of the tree table by default. I am customizing the 'selectedRowKeys' value to achieve this default selection. It works fine for the first time.
    In the below scenario it's is not working,
    1. Select a row other than default selected
    2. After some action i am refreshing the table, now the focus(highlight) is on the previous selected row but actually the selectedkey is second row(Scenario1)
    This my tree table structure,
    Revision 0
    - - - - Scenario1
    - - - - Scenario2
    - - - - Scenario3
    Revision 1
    - - - - Scenario 4
    - - - - Scenario 5
    - - - - Scenario 6
    Thanks,
    Nagesh

  • TreeTable selection color

    Hi,
    I would like to know how to make the selection color change from a filled color to maybe a bar on the top and the bottom. I believe i have to make my own custom renderer but what to I have to extend and where to i render it??
    Thanks
    Rudy

    Is it possible to extend the color class in order to create this 'bar' effect??? i have looked at the paintconectext method but to no avail.
    Thanks
    Rudy

  • How to set the default selection in treetable

    Hi,
    Now I'm using jdeveloper 10.1.3.3, and using af:treeTable and af:tableSelectOne to represent a treetable and let the user select specific row by clicking the radio button in front of each row. I want to programmatically set a specified row to be selected by default when the page is loaded, I didn't find a way to implement this function.
    Anyone has ideas?
    Thanks in advance.

    Hi Karen,
    What is the type of data you are feeding to the drop down ? Is it a standard fixed list of items or a query ? From what i see you would be using a query as the dataprovider for the dropdown. In such a case, in your query, restrict Plant with value 7700 in the default values section of the query. This should do the trick that when you run the template, the dropdown would show 7700 by default.
    Hope this helps.
    Regards
    Snehith.

  • 11g: treeTable child record selection

    Hi,
    I have a (pseudo) model, where entity A is self-referenced and also parent of B, so:
    A 1 - * A
    A 1 - * B
    I'd like to load all As into treeTable, which is not a ploblem. When a record in the treeTable is selected, I need to load detail Bs in a seperate panelFormLayout.
    The problem is, the panelFormLayout only reloads when one of the first level As is selected, but selection of child As has no effect.
    Setting target data source to the same iterator solves the problem with selection, but introduces another one: selected detail is appended to the end of the tree table.
    Any ideas how to do it properly?
    Thanks

    No matter what I tried I just couldn't get it work with business components, so I've taken another approach:
    I create a TreeModel copy of data in A dataView and bind treeView to generated TreeModel. I had to write some snchronization code (currentRow, selection etc.), but so far it seems to work.

  • Selecting node in af:treeTable

    Hi! My task is to alter custom selection function on af:table and make it work for treeTable. Make current method I took from this tutorial http://www.oracle.com/technetwork/developer-tools/adf/learnmore/25-generic-tree-selection-listener-169164.pdf
    And here is a method that I have to change:
    public void TblStagesOnSelect(SelectionEvent selectionEvent) {
    GeneralFunction.makeCurrent(selectionEvent);
    if(treeTable.getRowAtRangeIndex(treeTable.getCurrentRowIndex()).getAttribute("IdParentStage") == null){
    parentUser.setAttributeValue(tf_idUserRespRequest.getValue());
    } else{
    for (int i=0;i<=treeTable.getEstimatedRowCount()-1;i++){
    if (treeTable.getRowAtRangeIndex(treeTable.getCurrentRowIndex()).getAttribute("IdParentStage").equals(treeTable.getRowAtRangeIndex(i).getAttribute("IdStage")))
    parentUser.setAttributeValue(treeTable.getRowAtRangeIndex(i).getAttribute("IdUserResp"));
    break;
    This method was written for table, but it doesn't work on treeTable. Can anyone help?

    did u check this
    Jdeveloper,Oracle ADF &amp;amp; Java: Tree Table Component in Oracle ADF(Hierarchical Representation)
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/26-get-selected-tree-node-data-169165.pdf

  • TreeTable Component - attributes for $selected[*]

    I am trying to pass some query parameters to a new menu item added to the TreeTable component that drives the main menu in IDM 8. Documentation in the treetablelibrary.xml says:
    <Comments>  Define an action by supplying:
                  - a name (action)
                  - a label to display for the action, usually a message key (label)
                  - the selections required for this action (selectionMode):
                    "none", "oneOrNone" (optionally one selection), "single"
                    (exactly one selection), "multi" (one or more), and "any"
                    (any number of selections, including none).
                  - the types of object this action applies to (selectionTypes)
                  - the URL to route the action to (targetURL)
                  - a map of parameters to pass to the targetURL (targetParameters)
                    You can set session attributes by prefixing the parameter name
                    with "Session:".  You can reference the selected items by using
                    a parameter value of "$selected[name]".
                  - the type of this object for authorization purposes (authType).
                    If omitted, selection type will be used.
                  - the right required on the object to perform this action (requiredRight)
                  - an ACL for the action (actionACL).  If supplied, this overrides
                    authType and requiredRight.
              </Comments>The question I have is: What are the attributes that are available for use with the $selected[*] syntax? I see 'id' and 'name' as examples (selected[id] and selected[name]), but would like to understand what else can be accessed in this way.
    To clarify, here is the type of code I would be writing:
    <argument name='targetParameters'>
                                <Map>
                                    <MapEntry key='id' value='$selected[id]'/>
                                    <MapEntry key='name' value='$selected[name]'/>
                                </Map>
                            </argument>Thanks for the help!

    See if example 61 on the ADF Code corner helps:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/61search-in-rendered-trees-177577.pdf
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples

  • How to select a row dynamically in a TreeTable?

    I am trying to select a row in a treeTable when the user right clinks on a row. how I do this? I tried giving the following. I don't see visually that the row is selected. What I try to achieve this?
    ....me.getX() here "me" is the MouseEvent. I see the selRow has the right value too but can' tsee it visually the selected row.
    int selRow = treeTableData.rowAtPoint(new Point(me.getX(),me.getY()));
    treeTableData.setRowSelectionInterval(selRow,selRow);
    treeTableData.repaint();
    treeTableData.updateUI();
    component = me.getComponent();
    popEditor.show(me.getComponent(), me.getX(), me.getY());

    use
    setRowSelectionInterval(int fromRowIndex, int toRowIndex);example if your table has 10 rows then u want to select the rows from 4 to 8 then use
    setRowSelectionInterval(3, 7);if you want to select just one row for example 5 then use
    setRowSelectionInterval(5, 5);

  • ADF Treetable row already selected?

    How can I check if a row in the tree table is already clicked/selected?

    1) create a binding for treetable in the managed bean
    2) you could check if a row is selected or not - by checking the following:
    treetable.getSelectedRowKeys()This returns RowKeySet containing all the selected rows in the treetable.
    Thanks,
    Navaneeth

  • ADF treetable - Identify RightClick of selected vs unselected row

    Hello,
    We have a tree table with client and server Listeners set for selection and contextMenu types
    TreeTable is set to use contextMenu select = true
    Use Case 1
    User selects a Row
    selection listener fires
    Use Case 2
    User right clicks a selected Row
    contextMenu listener fires
    Use Case 3
    User right clicks a unselected Row
    selection listener fires
    contextMenu listener fires
    We need to differentiate between Use Case 1 and 3
    For Use Case 3, our requirement is to suppress/ignore the firing of selection Listener
    A possible approach could be to read the event source (tree table) and check if any immediate oncoming event is of type contextMenu, and then bypass the code inside selectionListener
    Any pointers ?

    Couple of points
    1. The documentation mentions the use of getRowKey() which is returning null
    The highlighted row key is established as a currency in the table when the action for context menu item is executed. The currency in the table can be retrieved by calling "table.getRowKey()"
    2. As posted, we are interested to know if the row was right clicked and then disregard the selection Listener. The server listener for context menu select is fired after the selection listener. So we need help
    Any pointers ?
    Thanks

  • How to select objects in af:tree or af:treeTable

    Hello! I have af:treeTable :
    +<af:treeTable id="cadTree" value="#{tree_dc.tree}" var="node"+
    +binding="#{workarea_vb.treeCadastralTable}"+
    +emptyText="no data" rowSelection="single"+
    +selectionListener="#{workarea_vb.select_cadastralTree}">+
    +<f:facet name="nodeStamp">+
    +<af:column id="firstDepCol" rowHeader="unstyled"+
    +headerText="kn" sortable="false"+
    +noWrap="false" styleClass="treeTable">+
    +<af:outputText value="#{node.fullName}" id="defMenuItem"/>+
    +</af:column>+
    +</f:facet>+
    +</af:treeTable>+
    how can i select and expand node, which contain some object?
    it should be method like this:
    +public void selectNode(UIXTree tree, TreeModel model, Object obj) {+
    +RowKeySet rks = tree.getSelectedRowKeys();+
    +rks.removeAll(); // clear old selection+
    +//+
    +// here we should find node with object "obj" and select it ...+
    +//+
    +}+

    Hi,
    if you define a method reference for the af:tree selection listener then you get access to the selected rowKeySet, which gives you information about where the user clicked on
    Frank

  • How to make selected and active a child row of a treeTable?

    Hello,
    I am inserting a new child row into a af:treeTable, disclosing it, but I can't figure out how to make it selected and active so the focus of the user to go on it.
    Jdeveloper version 11.1.2.3.0
    This is how I am inserting the child node:
    public void createLocation(RowIterator ri, Key selectedNodeKey) {
            final String locationCategoryViewDef = "model.views.LocationCategoryView";
            if (ri != null && selectedNodeKey != null) {
                Row[] found = ri.findByKey(selectedNodeKey, 1);
                if (found != null && found.length == 1) {
                    Row foundRow = found[0];
                    String nodeDefname = foundRow.getStructureDef().getDefFullName();
                    RowSet parents = (RowSet)foundRow.getAttribute("LocationView");
                    Row childrow = parents.createRow();
                    //hardcoded locationId
                    childrow.setAttribute("LocationId", 434558);
                    parents.insertRow(childrow);
    }  And this is the treeTable:
    <af:treeTable value="#{bindings.LocationCategoryView2.treeModel}" var="node" varStatus="vaarr"
                  partialTriggers="gaga gag4a ga4a"
                  selectionListener="#{bindings.LocationCategoryView2.treeModel.makeCurrent}"
                  displayRow="selected" rowSelection="single" id="tt1" editingMode="clickToEdit"
                  horizontalGridVisible="true" binding="#{pageFlowScope.treeTableBean.sampleTreeTable}">
        <f:facet name="nodeStamp">
            <af:column id="c5" width="15">
                <af:outputText value="#{node}" inlineStyle="display:none" id="ot1"/>
            </af:column>
        </f:facet>
        <f:facet name="pathStamp">
            <af:inputText value="#{node}" id="ot2"/>
        </f:facet>
        <af:column id="c2" headerText="Location CategoryName">
            <af:inputText value="#{node.LocationCategoryName}" inlineStyle="font-weight:900" id="ot45"/>
        </af:column>
        <af:column id="c6" headerText="Location CATID">
            <af:inputText value="#{node.LocationCategoryId}" inlineStyle="font-weight:900" id="ot6"/>
        </af:column>
        <af:column id="cgg2" headerText="Var INDEx">
            <af:outputText value="#{vaarr.index}"/>
        </af:column>
        <af:column id="c1" headerText="Location Name">
            <af:inputText value="#{node.LocationName}" id="ot3"/>
        </af:column>
        <af:column>
            <af:panelGroupLayout layout="vertical">
                <af:commandLink id="gaga" text="addLocation" inlineStyle="color:red"
                                action="#{pageFlowScope.treeTableBean.createChildren}"
                                rendered="#{node.LocationId == null}" partialSubmit="true"/>
                <af:commandLink id="gag4a" text="delete category" inlineStyle="color:blue"
                                partialSubmit="true" rendered="#{node.LocationId == null}"
                                action="#{pageFlowScope.treeTableBean.deleteChildRow}"/>
                <af:commandLink id="ga4a" text="delete location" inlineStyle="color:green"
                                partialSubmit="true" rendered="#{node.LocationId != null}"
                                action="#{pageFlowScope.treeTableBean.deleteChildRow}"/>
            </af:panelGroupLayout>
        </af:column>
    </af:treeTable>

    Yes I did now but nothing changes. The current, selected and active row is still the parent node...
    Even I am adding AdfFacesContext.getCurrentInstance().addPartialTarget(this.sampleTreeTable); for just in case..

  • TreeTable with Multiple Selection

    Hi,
    I have created a TreeTable which concludes multi-selection. In case of children selection (leaves) I get my goal, but the problem is when I try to select a Parent Node. I desire to populate a method that will traverse that Parent Node and walk down through its children to automatic select them, since their parent is selected. How can I do this?
    P.S.
    I am using JDeveloper 10.1.3.1; JSF ADF, BC;
    My TreeTable is populated programmatic (java), using a VO as its source, with no bindings at all (page definition).

    Actually I am using a treeModel too.
    I have built my case like this:
    1- When selecting a parent node, I retrieve its code (number) - Primary Key field value.
    2- Then, I have built a Recursive method, which will walk down through the SQL's returned records (tree-SQL statement with parents & children). At first I apply a filter to this table to get all the children of this parent. Then recursevily, I apply the same procedure to each child (so as to check if it is by its turn a parent of other nodes too), till it is a leave.
    3- For each node which is a leave, I temporarily store its unique value to an array (or whatever), so as to reflect changes to the DB when committing (saving).
    4- Finally after refresh, the changes we have performed will be expressed at the page's table, showing the parent node selected along with its children.
    P.S.
    My SQL-statement includes a column indicating whether the node is selected or not.
    Hope this helps you.

Maybe you are looking for

  • Tile Vertically no longer works after Acrobat 10.1.10 update.

    Is anyone else having the same issue?  I open 5-10 PDFs at a time, and then hit Ctrl-Shift-L to Tile them Vertically, and it Tiles them Horizontally instead.  Even choosing it directly from the menu (the slow way) doesn't work.  Tile Horizontally sti

  • What are the steps required in NWA and ID in order to enhance security of adapters in PI 7.31 Java Stack ?

    HI All, I am looking for steps need to follow for seurity and certificate management in PI 7.31 Java Stack. Could someone help me with the security and certificate management steps needs to follow for SOAP/RFC/MAIL adapter ? I looked at sap help link

  • IPad doesn't work!

    All it does is talk when I try to unlock it. Any suggestions?

  • Email and websites unreadable -- show in  xhtml code

    Some websites and emails I receive are coded and unreadable. The appear in what I guess is xhtml or html code. In the email I can copy all the code (text) and past it into a new email and change the fonts to read it. I get email like this everyday an

  • Cursor Displaying Incorrectly

    So for about 3 months now, the mouse cursor on my macbook has been displaying incorrectly. Instead of displaying the solid black arrow, it displays the white shape of the arrow, but with vertical black lines in it. It flickers the correct display of