Toggle the button toolbar on the selection of rows in table

Hi all
I have a problem with activation and deactivation of the toolbar button when the table row is selected... Here's the deal:

I have a toolbar button named "activate" I want to activate only when the selected table line has say for example 'description' field is not empty. I'm looking for a solution so that I can say declaratively:

< disabled af:commandToolbarButton = "#{I'M looking FOR THIS CASE =="} "/ >"

I tried using #{bindings.activateAttributeFromSameIterator} thinking that when the selection on the row in the table is changed, the change is reflected also and I will get the result, but without success (that link was nothing)... I also updated partialTriggers this toolbar button.


I would appreciate if anyone can shed some light on this...

Thank you

Hello

create a binding of the attributeValue to the descriptor field using the "Bindings" tab in the Visual Editor. In the connections section, click the Green plus icon, choose generic and attributeValue Bindings are included. Select the iterator used by the table and select the attribute "descriptor" (the name of the attribute that you mentioned). Then change

TO

Frank

Tags: Java

Similar Questions

  • Popup event on the selection of rows in table tree

    I use jdev 11.1.1.7

    I followed below page to pass parameters between the regions. It works fine if I use a button to trigger the event & pass the id of selected in a table of the tree line.

    Tech Blog of Rohan Walia: events background - Basic step by step: ADF

    I wanted to avoid button, I'm trying to pass data directly on the selection of rows in the tree.

    < eventBinding id = "eventBinding".

    Listener = "org. Apache.MyFaces.Trinidad.Event.SelectionListener">

    " < events xmlns =" http://xmlns.Oracle.com/ADFM/contextualEvent "> "

    < name of event = 'FireEvent '.

    customPayLoad="#{pageFlowScope.ManageOrgsBean.selectedID}"/ >

    < / events >

    < / eventBinding >

    < / links >

    " < events xmlns =" http://xmlns.Oracle.com/ADFM/contextualEvent "> "

    < name of event = 'FireEvent '.

    customPayLoad="#{pageFlowScope.ManageOrgsBean.selectedID}"/ >

    < / events >

    I get a NPE in the 3rd line below:

    {} public void onTreeNodeSelect (SelectionEvent selectionEvent)

    BindingContainer DCBindingContainer = ADFUtils.getDCBindingContainer ();

    JUEventBinding eventBinding = (JUEventBinding) bindingContainer.get ("FireEvent");

    SelectionListener selectionListener (SelectionListener) = eventBinding.getListener (); NPE

    selectionListener.processSelection (selectionEvent);

    }

    Any idea? Thank you.

    Try with:

    JUEventBinding eventBinding = (JUEventBinding) bindingContainer.get ('eventBinding');

  • Turn off the ADF parasmo tab based on the selection of rows in table

    Hello

    We have page ADF, which consists of a table within a collection of panels, which in turn is inside a Panel tab that user can select several rows in this table. There is also a second tab that you want to activate only if the user has selected a single line in the table. This should be disabled if several lines are selected in the table. Please let me know how this can be accomplished. The selection of multiple rows in the table is a must for users.

    I use jDeveloper 11.1.2.3.0

    Thank you
    Ashwin

    Published by: 989372 on April 24, 2013 08:22

    Hello

    1. set up the table for selection of rows multi
    2. If you initially created the unique selection table, delete the SelectionListener entry added by JDeveloper
    3. create a custom pointing to a managed bean selection listener
    4. in the selection listener, call getComponent on the selection event (http://myfaces.apache.org/trinidad/trinidad-api/apidocs/org/apache/myfaces/trinidad/event/SelectionEvent.html) and cast to richeTableau
    5. on rich table Manager, call getSelectedRowKeys (http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10684/oracle/adf/view/rich/component/rich/data/RichTable.html)
    6. If there is more than one key of the selected row, set a property of a managed bean (for example showTab) false and PPR Panel tab
    7 use the property "off" from the showDetailItem (http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_showDetailItem.html) to point to the property Boolean managed bean

    Frank

  • Toggling the selection (tail) outgoing and incoming (head) point of edition

    I can't find the keyboard shortcut for this trivial operation:

    With the Trim tool or active ripple, I am able to manually select the tail of the outgoing clip and/or the head of the element into a mount point. I also hold command on a Mac to select both sides of the edit point.

    What is the keyboard shortcut to change the selection (head/tail) about to edition?

    Thank you.

    -paul.

    I found it. It is CTRL + T on a Mac. I found it in this documentation (Type of rocker trim). It is a shortcut for the sequence.

    -paul.

  • Object/image to toggle the selection question

    Went from CS3 to CS5 and discovered that they reorganized image selection. Can't tell if I'm cropping the image or resizing. With the selected object selection tool, the image of the circle seems to indicate that it is safe to crop, but it's still an uncertain when you work quickly. Is there any way to disable this, so I can go back to the more intuitive object select and direct, select as separate functions. (in other words, the default CS3)

    Really a pain when you're importing, cropping, and resizing. These object help executives fail to make the problem worse. I'm happy that they allow you to disable those 5.5.

    TIA

    View > Extras > hide content Grabber will turn off the "donut hole."

  • Add line before or after the selected line in af:Table

    Hello

    Please let me know how we can add a line before or after the selected line in the display: table.

    Currently I have a table with 2 buttons on toolbar. 1. Add 2. Add after.

    The user selects the row and click a button AddBefore and after... then, a blank line must have added in the table according to the clicked button.

    Please suggest me your entries.

    Thank you
    Kiran

    chk this
    http://mjabr.WordPress.com/2011/07/02/how-to-control-the-location-of-the-new-row-in-aftable/

  • Updated all the selected lines in a table.

    Hello

    Jdev Version 11.1.2.3.0

    I'm trying to update all the selected rows in a table with several choices.

            AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
            ViewObject vo = am.findViewObject("RegistrationHistory1");
            RowKeySet selectedRegistrations = historyTable.getSelectedRowKeys();
    
    
            if (selectedRegistrations != null) {
                Iterator iter = selectedRegistrations.iterator();
                    while (iter.hasNext()) {
                        Object facesTreeRowKey = iter.next();
                        Row[] row = vo.findByKey((Key)((List)(facesTreeRowKey)).get(0), 1);
    
    
                        if (row != null && row.length == 1) {
                            Row r = row[0];
                             r.setAttribute("Attr", "1"); 
                        }
                    }
              }
    

    But after I put the attribute on the line. My iterator ignores most of the lines and they don't last updated.

    It works very well for the removal of the line well.

    Any suggestions?

    It turn out that I got a try catch and in the catch, I had a log (e.printStackTrace ()) and I do not see a single line in the diary saying ConcurrentModificationException appearing all the time.

    Looks for read-only access to an attribute or delete lines is OK to iterate over the selected lines, but it's different for the modification of an attribute.

    The code that worked:

    Links DCBindingContainer = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    Entry DCIteratorBinding = bindings.findIteratorBinding ("RegistrationHistory1Iterator");

    RowSetIterator regRSiter = regIter.getRowSetIterator ();

    RowKeySet selectedRegistrations = historyTable.getSelectedRowKeys ();

    Object [] keys = selectedRegistrations.toArray ();

    for (Object key: keys) {}

    Line currentRow = regRSiter.getRow ((Key) ((List) key) .get (0));

    removeOrModify (currentRow);

    }

  • [JDev12c, ADF] How to get the value of a field from the selected line in af:table and...

    Hallo,

    I want to double click on a line of an af:table to call a page that displays a form (based on a View object) with the details of the selected line.

    I need to go to the second page the value of a field on the line that is selected on the first page.

    How can I do this? In particular, how can I get the value of a field from the selected line? How can I call the second page on double-click on the af line: table?

    Thank you

    F.

    Why would user, you need to pass a value of the line to the shape?

    The framework selects the line you want to display in the form. All you have to do is to show the form with the selected line. It is the framework automatically as long as you use e vo even the same data control.

    Timo

    Post edited by: Timo Hahn
    And the handling double-clicks is described here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf

  • How to get the value of row current table when press the button submit

    Hello

    I want to get the current value of the SuccessionPlanId line which is part of the column in a table that is advanced.

    I created a (created using customization, from action through CO) button in the table as column, so each line with a single key, if I press the button of the first line means so I want to extract the first line SuccessionPlanId and if it's the 3rd way so I want to get the value of the value of the third row.

    How in the post of controller?

    Please answer soon, its urgency.

    Thanks in advance,
    SAN

    OK, need to go with a delicate way,

    1.) create a new table with Jdeveloper and there shud be a replica of the room once except the button submit newly added, pls note button type shud be present the type of button.

    2.) hide the existing table area and create a new stacklayoutbean.

    (3.) this stacklayout bean will have the property to extend, you give the full path of the new custom of advanced table box.

    Now you should be able to get the reference of the line during the click on the "submit" button

  • Retrieve all records in the selected master child multi tables

    Hello
    I use JDeveloper 11.1.1.4 version and using ADF - BC in my project.
    I have a one-to-one simple child master [several] in my project.
    In my view page, I display this master child [Ex: EmpVo1-> DeptVo2] in the form of tables.

    I have multi-selection enabled for the main table.
    My requirement is that, on the multi by selecting the lines in the main tables, I want to get all the child records in my grain of support.
    If a master has 3 child records line and another main line has 4 child records and on the selection of several of these two records in the primary table, I should get all the child records in my grain of support.
    I need it to implement the cascade delete feature.
    Here is the sample code coin
    --------------------------------------------

    (1) called on selecting rows in the master table

    {} public void onRSCGrpSelect (SelectionEvent selectionEvent)
    Add the code in the event here...
    ADFUtil.invokeEL ("#{bindings.") RscGroupVO1.collectionModel.makeCurrent} «»
    new class [] {SelectionEvent.class},
    (New Object() {selectionEvent});

    RowKeySet rowKeySet = (RowKeySet) tblRSCGrp.getSelectedRowKeys ();
    CollectionModel cm = (CollectionModel) tblRSCGrp.getValue ();

    for (object facesTreeRowKey: rowKeySet) {}
    cm.setRowKey (facesTreeRowKey);
    RowData = JUCtrlHierNodeBinding
    (JUCtrlHierNodeBinding) cm.getRowData ();
    Line = rowData.getRow ();
    System.out.println ("\n" +)
    row.getAttribute (0) + ":" + row.getAttribute (1) +.
    (":" + row.getAttribute (2));

    System.out.println ("display the child records");
    displayChildRecords (row.getAttribute (0));

    }

    }

    2 private void displayChildRecords (Object rscGrp) {}
    ViewObject rscMapVo = getRscMapViewObj();
    RowSetIterator rsI = rscMapVo.createRowSetIterator (null);
    While (rsI.hasNext ()) {}
    Line = rsI.next ();
    System.out.println ("\n" +)
    row.getAttribute (0) + ":" + row.getAttribute (1) +.
    (":" + row.getAttribute (2));
    }
    rsI.closeRowSetIterator ();
    }

    But the problem is that he is always giving me the last selected lines child details.

    Please suggest the error that I do.

    Thank you
    Praveen

    Your problem is to use makecurrent, which should not be used on a multi selection table. Then, if you have a relationship master detail you should have a view link between them. In this case, you can expose a method as you master to get the related child line. Not need to get the VO itself you can use the accessors of child iterator to obtain registration of the child.

    public void onRSCGrpSelect(SelectionEvent selectionEvent) {
    // Add event code here...
    RowKeySet rowKeySet = (RowKeySet)tblRSCGrp.getSelectedRowKeys();
    CollectionModel cm = (CollectionModel)tblRSCGrp.getValue();
    
    for (Object facesTreeRowKey : rowKeySet) {
    cm.setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData =
    (JUCtrlHierNodeBinding)cm.getRowData();
    Row row = rowData.getRow();
    //cast to the right row class
    EmpEmpVoRow empRow = (EmpEmpVoRow) row;
    // now you cann access the child row iterator
    RowSetIterator it = empRow.getDepVO();
    //now you cna iterate over the child rows
    System.out.println("\n" +
    row.getAttribute(0) + " :: " + row.getAttribute(1) +
    " :: " + row.getAttribute(2));
    
    System.out.println("Displaying Child Records");
    //use hte child rows here
    
    }
    
    }
    

    Don't know if the code compiles out of the box (do this on the train :-)

    Timo

  • selection of rows in table

    I know this was asked (I read all the other posts on the same question), but I have no luck with the 'official' way to do it.

    I'm doing a row of a table (in hot mode) to become selected if you click on one of its cells.  Here is my point:

    int CVICALLBACK TableTest (int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
    {
        Point cell;
    
        switch (event)
        {
            case EVENT_LEFT_CLICK:
                GetTableCellFromPoint(panel,control,MakePoint(eventData2,eventData1),&cell);
                if (cell.x == 0 && cell.y == 0) return 1; // Not on a row/col
                SetTableSelection(panel,control,VAL_TABLE_ROW_RANGE(cell.y));
                break;
        }
        return 0;
    

    What I see, is that the just SetTableSelection is not what it is supposed to do.  I can break the function to the GetTableCellFromPoint and I can see the line concerned implement cell.y, but then selecting the line fails.

    I found a good comment on the other thread about the mode of control of the table.  This poster pointed out that, if the table is in non-indicateur mode, my reminder must swallow the event.  OK, I tried and it works somehow.  I can see the selected line, but it's a strange effect highlighted, not a dark solid grey cell background. See attachment (I've highlighted the line that was clicked).

    Which leads to more questions.  On a hot table, with traditional events which don't are NOT swallowed, event that creates the selection dark grey background of a cell?

    To smile, I also tried to put my table saw mode and do not swallow all of the events. But here there is no selection at all.

    So I'm just very confused about this.  What I am doing wrong?

    I don't think you're doing something wrong, apart from the fact that you're not swallowing the event when you change the selection. But even if your code does not she, you said that you have done this anyway, so it's probably a moot point.

    On the other hand, I don't think you need to swallow the event when the user clicks on a row or column. As your reminder override mouse click in this case, I think you should allow the table to manage the event. Also, I think that your condition should be (cell.x == 0 | cell.y == 0) instead - the difference between the two conditions occurs when the user clicks on a row or column header and the table must already do what you want it to do in this case.

    The only reason that you see the outline instead of the inversion of color is because it's as if the table is not the active control in the Panel. And that's how all the table selections are drawn when the table is not the focus. If you tab through the table, after you change the selection is not the change of plans? In addition, if you try to run a program example with a table (for example, samples\userint\gridview.prj). As you move the selection of this table and then tab away from the control, can't the same thing?

    Luis

  • The selection of two different tables when a value is null or zero in one

    Hi friends,
    I have two tables where the data of...
    so now I have to display the value of tab1.value and if the value that it is) or null I should poster from another table viceversa
    tab1. Value 100 tab2.value 0

    now I get the value of tab1.value

    tab1. Value null tab2.value 200
    now, I should get the value of tab2.value

    If tab1.value is 0 and tab2.value is 0 then display 0

    How to do this

    Thank you
    select  prrv.result_value,
            pg.attribute3,
            case
              when prrv.result_value is null or prrv.result_value = 0 then pg.attribute3,
              else prrv.result_value
            end
    from per_grades pg,pay_run_results prrv
    where prrv.id=pg.id
    /
    

    SY.

  • need a better way to reset the selected cells in a table

    Hi all

    I've been watching the various threads of discussion reset only certain fields in a form and leaving the others unchanged.

    The form, I am currently a table of 20 lines of body with 8 columns. I want to have a reset button that resets the 6 cells in each row.

    I use the following code snippet:

    for (var equal nrow = 1; nrow equal < 21; nrow equal ++)

    for (nCell var = 0; nCell < 6; i ++)

    {

    xfa.host.resetData ("form1.page1.wrapper.ICC.Table1.Row [" + equal nrow + "] .rate [" + nCell + "]");

    }

    It works but it is extremely slow (order of 10 seconds) and my pc is not outdone.  There must be a simpler (and faster!) way to do it.

    I saw a thread where cells that were to be spared from reset could be entered but could not do this work to all the. I thought to put the cells to be spared in a subform, but that went nowhere, because I was able to place cells individual separate subforms.

    Any suggestions will be welcomed with formcalc script if possible :)

    Thank you.

    Harry Ohm.

    Edit: now, it seems that this does not work as I first thought. It works on a single line, but not when the nested for loops are used.

    Post edited by: HarryOhm

    Hi Harry,.

    Just two quick questions. I would wrap the first for loop {} and then you have i ++ in the second loop:

    for (var nRow = 1; nRow < 21; nRow++)
    {
         for (var nCell = 0; nCell < 6; nCell++)
         {
              xfa.host.resetData("form1.page1.wrapper.ICC.Table1.Row[" + nRow + "].rate[" + nCell + "]");
         }
    }
    

    It seems that your table is static (lines do not repeat). One option would be to build a variable/string with object names and reset that. It is an example of a reboot of one of our forms (http://assure.ly/gBJYj9). Here it is set to zero, a line and two fields outside the table:

    // reset page 6 only
    var f1 = Table1.Row1.description.somExpression + ", ";
    var f2 = f1 + Table1.Row1.quantity.somExpression + ", ";
    var f3 = f2 + Table1.Row1.unitPrice.somExpression + ", ";
    var f4 = f3 + positionedSF.myName.somExpression + ", ";
    var f5 = f4 + positionedSF.myAddress.somExpression;
    
    xfa.host.resetData(f5);
    

    Hope that helps,

    Niall

    Ensure the dynamics

  • Import of the first 100 rows of tables selected when importing Datapump

    DB version: 10 gr 2


    I have a dumpfile datapump of a schema that has 120 tables. Out of this 120 tables, there are 3 really big paintings
    1. ERR_LOG
    2. RTE_CONS_DTL
    3. ITEM_ENT_DTL
    During the import, I want only the first 100 lines above mentioned 3 tables. I want that all the lines of the rest of 117 paintings. Is this possible in Datapump Import?

    I think that you will have to do the import for 117 tables first then for three tables (using the QUERY option).

    Please see the following for more details:

    http://www.Stanford.edu/dept/ITSS/docs/Oracle/10G/server.101/b10825/dp_import.htm

    Published by: SKU on April 20, 2009 02:49

  • Enter the selected line only an editable af:table ADF

    Hello

    We have an obligation to engage only the selected lines in a table. All lines in the table must be modifiable. There should be a 'Save' button in a column that has to save the selected line when you click it.

    Could you please share your comments/suggestions.

    Environment:

    JDeveloper and ADF 11.1.1.7

    Thank you

    Srikanth

    Maybe you can add the attribute transitional to EO as an indicator whether the line should be validated in db or not, override EOImpl.doDML () and skip super.doDML () If this attribute is not set.

    Dario

Maybe you are looking for