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');

Tags: Java

Similar Questions

  • 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

  • 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

  • How to create a popup event which the producer is a 'button' in managed bean

    I can create a contextual action event named "ReportGenerationEvent" for the producer to declaratively: button successfully.

    < af:button text = "OK" id = "b4" actionListener = "#{bindings.eventBinding.listener.processAction}" / > "

    Page definition file:

    < eventBinding id = "eventBinding" Listener = "javax.faces.event.ActionListener" >

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

    < name of the event = "ReportGenerationEvent."

    customPayLoad = "#{pageFlowScope.someManagedBean.reportFormat}" eventType = "Event Action" / > ""

    < / events >

    < / eventBinding >

    but I also want to do something else before publish event contextual action by clicking this button. So I put a method of bean managed as actionListener property value.

    < af:button text = "OK" id = "b4" actionListener = "#{pageFlowScope.someManagedBean.processXXX} '"

    I want to program the contextual publshing event logic in managed bean, but it seems that it is wrong. How to solve my problem?

    {} public void processReportGeneration (ActionEvent actionEvent)

    Add the code in the event here...

    publish the contextual event

    BindingContainer links is BindingContext.getCurrent () .getCurrentBindingsEntry ();.

    JUCtrlActionBinding actionBnd = (JUCtrlActionBinding) bindings.getControlBinding("eventBinding"); This conversion is wrong.

    ((DCBindingContainer) bindings) .getEventDispatcher () .queueEvent (actionBnd.getEventProducer (), "myString");

    ((DCBindingContainer) bindings) .getEventDispatcher () .processContextualEvents ();

    }

    I noticed contextual event can only be created/published on the producer based on a method of action, action, value attribute or list binding.

    but I have not found this link for a contextual action button event, only the following definition exists in the definition of page file. Here, I'm confused.

    < eventBinding id = "eventBinding" Listener = "javax.faces.event.ActionListener" >

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

    < name of the event = "ReportGenerationEvent."

    customPayLoad = "#{pageFlowScope.someManagedBean.reportFormat}" eventType = "Event Action" / > ""

    < / events >

    < / eventBinding >

    Hello

    type of contextual issues event listener. Here is an example in a blog: one size does not fit all: JDev 11 g: contextual events programming

    Frank

  • 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

  • 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

  • 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);

    }

  • 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/

  • [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

  • 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

  • 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

  • Poor performance during the iteration/update rows of a tree table

    Hello

    We have a tree table based on a VO and EO (with transitional attributes). One of the attributes is an indicator.
    The original Version is filled with a complex query with several thousand lines.

    Now, when the user clicks on a node, all children are updated (their flag is set to true) recursively.

    It's really really slow. It may take several minutes, while a similar update via PL/SQL on a real table would take a few seconds.

    Is it possible to improve the performance? We have already applied all the tunings on EO as VO mentioned in the Oracle Documentation, but they had almost no effect:
    -keep the viewlink iterators set line
    -indicators of query
    -Use the batch update

    The algorithm we use is the following:
        private void checkTreeNodes(JUCtrlHierNodeBinding node, Boolean check) {
            if (node == null) {
                return;
            }
    
           TreeVORowImpl nodeRow = (TreeVORowImpl)node.getRow();
            if (nodeRow != null) {
                    nodeRow.setFlag(check);
            }
    
            List<JUCtrlHierNodeBinding> children = null;
            if (!nodeRow.getLevel().equals("4"))  // no more than 4 levels
                children = node.getChildren();
    
            if (children != null) {
                for (JUCtrlHierNodeBinding _node : children) {
                    checkTreeNodes(_node, check);
                }
            }
        }

    Hello

    try to move the logic of the definition of the transitional indicator at the service of the company (method exposed on the client interface) and then refresh the tree instead of a record thousand on the client component analysis.

    Frank

  • ADF table selected displayRow does not display the selected line

    Hello

    JDev 11.1.2.4

    I have a table with selection enabled and displayRow property the value selected. In the workflow, I have an ExecuteWithParams activity, and then a method activity that restores the current iterator of the line. Finally the activity view that displays the table.

    Restore the current line with key

    Iterator DCIteratorBinding = ADFUtils.findIterator ("MyIterator");

    iterator.setCurrentRowWithKey (currentKey); currentKey is a string

    The question I have is that the current line is properly restored, but the table does not display the page of "range" of the current line while the displayRow is the selected value. My table has 500 rows, the table displays the top 25 while the current line is the 500th line. I expect the table to display the line 475 to 500 line.

    What I am doing wrong?

    Thank you

    You can save the index lines before executing your method and then set the iterator to this index.

    The technique is described in this blog https://tompeez.wordpress.com/2016/02/12/naviagting-an-aftable-in-pagination-mode-from-a-bean/

    Timo

Maybe you are looking for

  • Download photo library always on 'update'

    This morning I turned on ICPL download 7000 photos. The MacBook is on wifi, connected and not sleeping. Photos preferences says "updated" and has not yet moved to tell how many pictures have been uploaded. I realize that this process may take days, b

  • magnet mount accelerometers recommended by OR use with USB-4432

    Nice day! Are there recommended accelerometers by OR use with USB-4432. They should also be with magnet mounting option. I need reference numbers to select for general purpose applications. Thanks and greetings

  • HP pavilion dv9000: hp pavilion dv9000

    Hello, I have a hp pavilion dv9000 Laptop running windows vista service pack 2 that has some problems. on the one hand, the laptop will randomly cut off, im not sure if this is the problem standard gpu or something as it will make it even when its on

  • HP photosmart 8050 is invisibel on my Imac

    Thank you respons earlier. No Im Danish, but the translator on this block is enough dissturbing for me. Now, I'm going to try in English and with no translation of the Danish visa versa. My problem: I tried to install my printer HP photosmart 8050 on

  • All plans to support Native Code Android?

    I'm deploying an android game using libgdx framwork which I believe uses native code. Are there plans to support native code on blackberry? Thank you!