Table Selection Listener

Hi,
I wold like to know if there is any way that I can invoke #{bindings.myVO.collectionModel.makeCurrent} from the backing bean. Thanks.
Regards,
K.Hein

Hi,
yes, you can. Just use a method expression
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory expressionFactory =  fctx.getApplication().getExpressionFactory();
    expressionFactory.createMethodExpression(elctx, "#{bindings.myVO.collectionModel.makeCurrent}", Object.class, new Class[]{SelectionEvent.class}).invoke(elctx, new Object[]{selectEvent});Frank
Edited by: Frank Nimphius on Apr 19, 2011 7:46 AM

Similar Messages

  • Ansynchronous tree table selection listener in ADF ?

    Hello,
    We have a tree table in our jsff on which user can select and right click nodes.
    The code in selectionListener takes a long time to execute. At the end it raises a contextual event which refreshes another part of the screen
    User needs to wait for the selectionListener, and the ppr of another region of the screen before he can get the context menu on right click
    Is there a way we can configure the selectionListener and subsequent Contextual Event handler, ppr to be asynchronous.
    Expected Flow
    Select Row
    selectionListener starts..
    Right Click Row
    Context Menu appears .....
    Contextual Event handler completes, ppr of another region of screen completes

    Any pointers ?

  • Getting NullPointerException in ADF form using Custom Selection Listener

    Hi,
    I am getting NullPointerException from getRowKey() in GenericTableSelectionHandler.java while pressing "Page Down" key or continuous pressing of "Down Arrow" key in Read Only ADF form (Query, Sort Enabled) using Custom Selection Listener.
    I have used the custom selection listener as mentioned at http://www.oracle.com/technetwork/developer-tools/adf/learnmore/23-generic-table-selection-listener-169162.pdf
    The requirement to use custom Selection Listener to populate some fields from the selected row.
    J Developer Version: 11.1.1.4.0
    The error is as below
    +<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5+
    javax.el.ELException: java.lang.NullPointerException
    +     at com.sun.el.parser.AstValue.invoke(Unknown Source)+
    +     at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)+
    +     at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1300)+
    +     at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:268)+
    +     at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:144)+
    +     at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:402)+
    +     at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)+
    +     at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:271)+
    +     at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:144)+
    +     at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:402)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)+
    +     at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)+
    +     at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)+
    +     at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)+
    +     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)+
    +     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:312)+
    +     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)+
    +     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)+
    +     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)+
    +     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)+
    +     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)+
    +     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)+
    +     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)+
    +     at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)+
    +     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)+
    +     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)+
    +     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)+
    +     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)+
    +     at java.security.AccessController.doPrivileged(Native Method)+
    +     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)+
    +     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)+
    +     at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)+
    +     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)+
    +     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)+
    +     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)+
    +     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)+
    +     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)+
    +     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)+
    +     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)+
    +     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)+
    +     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)+
    +     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)+
    +     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)+
    +     at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)+
    Caused by: java.lang.NullPointerException
    +     at ibm.view.GenericTableSelectionHandler.makeCurrent(GenericTableSelectionHandler.java:48)+
    +     at ibm.view.backing.Testpage.XxSelectListener(Testpage.java:207)+
    +     at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source)+
    +     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
    +     at java.lang.reflect.Method.invoke(Method.java:597)+
    +     ... 60 more+
    The table structure is as below for your reference
    +<af:table value="#{bindings.TestTableAdfView1.collectionModel}"+
    var="row"
    +rows="#{bindings.TestTableAdfView1.rangeSize}"+
    +emptyText="#{bindings.TestTableAdfView1.viewable ? 'No data to display.' : 'Access Denied.'}"+
    +fetchSize="#{bindings.TestTableAdfView1.rangeSize}"+
    +rowBandingInterval="0"+
    +filterModel="#{bindings.TestTableAdfView1Query.queryDescriptor}"+
    +queryListener="#{bindings.TestTableAdfView1Query.processQuery}"+
    +filterVisible="true" varStatus="vs"+
    +rowSelection="single"+
    +binding="#{backingBeanScope.backing_testpage.t1}"+
    +id="t1"+
    +selectionListener="#{backingBeanScope.backing_testpage.XxSelectListener}">+
    Any help to resolve the issue is highly appreciated.
    Thanks,
    Arijit
    Edited by: user10570755 on Aug 2, 2011 11:19 PM

    //selection with the selection in the ADF model Object
    _selectedRowData = _table.getSelectedRowData();
    //cast to JUCtrlHierNodeBinding, which is the ADF object //that represents a row
    JUCtrlHierNodeBinding _nodeBinding = (JUCtrlHierNodeBinding) _selectedRowData;
    //get the row key from the node binding and set it //as the current row in the iterator
    Key _rwKey = _nodeBinding.getRowKey();i guess nodeBinding becoming null here.. _table.getSelectedRowData().. is not returnign anything                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Issue with Selection Listener when the table has only one row

    Hi All ,
    I have developed a table in which I am using Selection Listener to perform some task when any row is selected.
    It is working fine when I have more than 1 row in the table, but when I have only one row in the table , the selection listener do not call the corresponding method in bean.
    I understand that selection event will be raised only when the row is changed, but in the use case when only one row is there, what should be done to make the selection listener work ?
    In the selection listener I have written code to make the selected row as current row , and perform the required task.
    Please suggest a way out for this situation.
    Thanks in advance.

    Hi,
    try removing this attr from table
    selectedRowKeys="#{bindings.xxx_VO1.collectionModel.selectedRow}"

  • Creating a generic selection listener for af:table

    Hi,
    I'm using JDeveloper 11.1.1.5.0, and I have a simple requirement to set up a custom selection listener for an af:table component.
    So far, I was doing this by using a custom function to invoke the EL to perform the makeCurrent operation. However, I came across Frank Nimphius' PDF on how to build a generic selection listener, and this seemed like a better way to go about it. The problem is, the CollectionModel class used in the sample code is now deprecated. Is anyone aware of the currently supported way to implement a generic selection listener?
    Thanks,
    Gill

    this snap shot of the code i write it to get the current employee id whcich is selected
        public void select(SelectionEvent selectionEvent) {
            // Add event code here...
             RichTable  _table = (RichTable)selectionEvent.getSource();
             CollectionModel _tableModel = (CollectionModel)((RichTable)selectionEvent.getSource()).getValue();
            JUCtrlHierBinding _adfTableBinding = (JUCtrlHierBinding)_tableModel.getWrappedData();
            DCIteratorBinding _tableIteratorBinding = _adfTableBinding.getDCIteratorBinding();
            //Acess the ADF iterator binding that is used with ADF table binding
            Object _selectedRowData = _table.getSelectedRowData();
            JUCtrlHierNodeBinding _nodeBinding =
                (JUCtrlHierNodeBinding)_selectedRowData; //get the row key from the node binding and set it //as the current row in the iterator
              Key _rwKey = _nodeBinding.getRowKey();
              _tableIteratorBinding.setCurrentRowWithKey( _rwKey.toStringFormat(true));
            DCIteratorBinding it = _adfTableBinding.getDCIteratorBinding();
           System.out.println( it.getCurrentRow().getAttribute("EmployeeId"));
        }this code i written 11.1.2

  • Problem getting the Table Data with the selection listener

    Hi All,
    I am working on a tree and table components. I wrote a logic in the backing bean in such a way that when I expand a node the child nodes for the tree are getting added dynamically and also getting the data in the table for the node expanded in the tree using the same Toplink Query . I added the selection listener for the table and when I am selecting a row in the table I am getting the Null Pointer Exception as the RowKeySet Value for the row selected is coming null.
    Can any one please help me out with this problem
    I will be very thankful
    Regards,
    Madhavi.

    Hi All,
    I am working on a tree and table components. I wrote a logic in the backing bean in such a way that when I expand a node the child nodes for the tree are getting added dynamically and also getting the data in the table for the node expanded in the tree using the same Toplink Query . I added the selection listener for the table and when I am selecting a row in the table I am getting the Null Pointer Exception as the RowKeySet Value for the row selected is coming null.
    Can any one please help me out with this problem
    I will be very thankful
    Regards,
    Madhavi.

  • Af:Table retains rows selected and selection listener doesnt work

    Hi
    I have a table with a list of objects passed to it to be rendered. When the user selects an object and clicks on the launch button above the table, it launches a new page and on the new page when the user clicks on cancel it brings back to the same page where the table is present. While coming back to this page, the row that was earlier selected by the user is highlighted and a click on the same row doesnt enable the selection listener. I have to click on some other row and then click the old row if I want to relaunch the old page
    <af:table var="row" rowBandingInterval="0" id="tblProcedures" emptyText="#{dbProcedureMsg.TABLE_EMPTY_TEXT}"
    summary="#{dbProcedureMsg.TABLE_SUMMARY_TEXT}"
    value="#{pageFlowScope.db_provisioning_DeploymentProcedurePageModel.collectionModel}" filterVisible="false"
    columnStretching="column:colDescription" rowSelection="single" width="99.7%"
    selectionListener="#{pageFlowScope.db_provisioning_DeploymentProcedurePageModel.processSelection}">
    There is one more table which behaves the same way. But other tables which are part of my application work correctly.
    Any idea on what I might be doing wrong ?
    Thanks in advance

    Hi,
    To be honest Million rows in excel its questionable for me
    I would try to find alternate solution rather than killing ADF on client and then your DBA will call you for a urgent meeting. Even if you make it work with ADF, people will not going use it due to huge amount of data load.
    What you can do is to call external report like Jasper, BIRT etc. etc. and provide option there to export to Excel based on your criteria (but million rows is again questionable)
    OR
    one idea is to give option at client side to request a report with button at af:TABLE toolbar ...then you can schedule a job at database server level using PL/SQL dbms_scheduler package with OS script to generate text file on server and FTP it to some machine.
    Hope it help,
    ZB

  • Problem with Table Model Listener

    I hava a JTable with three columns and dynamic number of rows. The first column has a text. Second column has check box and each third column has three radio buttons. I am using the table model listener to fetch the row and column which the user clicked. here is the code
    public void tableChanged(TableModelEvent e)
    row = e.getFirstRow();
    column = e.getColumn();
    TableModel model = (TableModel)e.getSource();
    String columnName = model.getColumnName(column);
    Object value = model.getValueAt(row, column);
    System.err.println("Value: "<em>value.toString()</em>" Row: "<em>row</em>" Column: "+column);
    attendanceModel.setHolidays(row, value.toString());
    }Here is the problem
    {color:#ff0000}Case 1{color}: When I click the first radio button in first row and third column it works and the output of print statement is
    *{color:#993300}Value:0 Row:0 Column:2{color}*
    {color:#ff0000}Case 2{color}: Next I clicked the first radio button in second row and third column the method is not called nothing is printed
    {color:#ff0000}Case 3{color}: Now I clicked the first radio button in third row and thrid column, the method is called and the output of print statement is
    {color:#993300}*Value:0 Row:1 Column:2*{color} ; but the actual value of row should be 2*. Here it is showing the row and column of the previously selected item.
    But in {color:#ff0000}case 2{color} instead of first radio button if I selected the second radio button the print statement will print the correct value i.e
    {color:#993300}*Value:1 Row:1 Column:2*{color}
    ie If I select different radio button in each row the print statement shows the correct value. But if in each row the same radio button is selected its not working properly. For first row it prints properly. If same radio button is selected in second row the method is not called. But from next row onwards the row value is showing the previously selected row as in {color:#ff0000}case 3{color}.
    But for the checkboxes in column 2 the same is working properly. Each column has only one check box. So when I select the check box in each row the row and column values are getting changed accordingly.
    Could some one help please?
    Thanks,
    Zach.

    To get better help sooner, post a [SSCCE (Short, Self Contained, Compilable and Executable, Example Program)|http://mindprod.com/jgloss/sscce.html] that demonstrates the incorrect behaviour.
    db

  • Custom Selection Listener not getting fired

    I am using JDeveloper 11.1.1.4 and have been trying to follow the advice given in the ADF Code Corner example 68. The only difference in my application/project, is that I am trying to develop the master table on a page fragment with a task flow attached for the JSFF containing the detail table. My master table on the primary JSFF has a custom selection listener on it. When testing the deployed package--putting the primary task flow on a JSPX page, the tables are showing, but when I select a different row on the master table, the new row is highlighted but nothing happens to execute the custom listener. I am sure of this because I've added a System.out.println as the very first line in it and it doesn't put the message out. I am getting no errors on the weblogic logs. I looked on the client side's html output and can't see anything that would trigger that a change occurred to send back to the server. Any ideas (outside of upgrading to another version of Jdeveloper) would be greatly appreciated. I am not sure if providing any of my code would be of any help in this issue.

    Thanks to all who responded. I have multiple rows showing in my master table and when I select a different row, I get no event that executes my method. I tried adding the "binding.itterator." to the EL for the SelectionListener and that didn't work either. Besides both the examples in the ADF Code Corner 23 and 68 show it just as "class.method" as I have it. A small snippet from my table is below:
              <af:table value="#{bindings.HOT_trans_sumVO1.collectionModel}"
                        var="row" rows="#{bindings.HOT_trans_sumVO1.rangeSize}"
                        emptyText="#{bindings.HOT_trans_sumVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        fetchSize="#{bindings.HOT_trans_sumVO1.rangeSize}"
                        rowBandingInterval="0"
                        selectedRowKeys="#{bindings.HOT_trans_sumVO1.collectionModel.selectedRow}"
                        *selectionListener="#{HotTransSummBean.onTxnSummTblRowSelect}"*                   
                        rowSelection="single" id="txnsummtbl"
                        columnStretching="last" width="100%" autoHeightRows="5"
                        contentDelivery="whenAvailable" immediate="true"
                        clientComponent="true" first="0">Also note that I have this backing bean defined on the task flow as a requestScope as it is in the example 68--example 23 does not state a scope level. Again, my method starts out with an output statement that never gets executed:
        public void onTxnSummTblRowSelect(SelectionEvent selectionEvent) {
          System.out.println("Entered onTxnSummTblRowSelect method.");

  • Tree Table Selection after deletion

    Hi,
    We have a tree table where we are displaying hierarchy of information. We have a "Delete" operation. This operation is available in the context menu associated to each node. When user selects "Delete" operation, the selected row is deleted and the next node is automatically selected. We have implemented a selection listener on this table but when this automatic selection happens after deletion this event is not triggered. How do we trigger the selection event after deletion? We require the selection event because, we are keeping track of the selected nodes. Even for delete, we are identifying the item to be deleted from the list of tracked nodes. When this auto selection happens and the user clicks delete menu, the auto selected row it is not available in the tracked list as the selection listener is not fired for the auto selection.
    Can any throw some light on how to address this?
    thanks,

    Hi,
    what if - after deleting a node - you call for the selectedRowKeys on the tree to get the new selected row. This way you can update what otherwise the listener does.
    Frank

  • Selection listener

    i have written a bean in the selection listener of an af:table... but this does not get called on pageload
    I am refreshing a region which contains child records... based on the selection of a particular record in the af:table
    How to call this one on pageload. after pageload when i select the master records it works well... but on pageload my method doesnt get called and all records are coming

    Hi,
    you can queue a SelectionListener from Java
    SelectionListener selListener = new SelectionListener(...,...,...);
    selListener.queue();So if you find a method that is invoked on page load (e.g. phaseListener on f:view) then this can be used
    Frank

  • How to get table selected row without SelectedRowKeys

    Greetings,
    i am using JDeveloper 11.1.2.4.0 ADF application,
    and i have few table that contains only 1 and some times 2 rows. When the table loads,
    by default, the first row is selected, and i cant call a selection listener (by selecting a row and calling
    a function). What i did (and it worked on the past, i don't know why now it doesn't) is:
    i removed the "SelectedRowKeys" property, so it will not auto select the 1st row on load,
    and on selection event i use this function code:
        public void selectDisease(SelectionEvent selectionEvent) {
            Object _selectedRowData =  Disease_Table.getSelectedRowData(); //the table i select a row
            JUCtrlHierNodeBinding _nodeBinding = (JUCtrlHierNodeBinding)_selectedRowData;
            Row rw = _nodeBinding.getRow(); //getting error here
      OperationBinding operation = bindings.getOperationBinding("ExecuteWithParams7");
            operation.getParamsMap().put("disease_id", rw.getAttribute("disease_id").toString());
            operation.execute();
            AdfFacesContext.getCurrentInstance().addPartialTarget(panelTabbed);              
    The error:
    <RichExceptionHandler> <_logUnhandledException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    javax.el.ELException: //C:/Users/Philip/AppData/Roaming/JDeveloper/system11.1.2.4.39.64.36.1/o.j2ee/drs/MyApp/ViewControllerWebApp.war/main.jsf @470,113 selectionListener="#{backingBeanScope.BeanNavigation.selectDisease}": java.lang.NullPointerException
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1589)
      at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:276)
      at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
      at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:486)
      at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
      at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:279)
      at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
      at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:482)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:361)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
      at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
      at view.navigation.selectArrergy_MED(navigation.java:489)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.el.parser.AstValue.invoke(Unknown Source)
      at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
      ... 48 more
    <RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: //C:/Users/Philip/AppData/Roaming/JDeveloper/system11.1.2.4.39.64.36.1/o.j2ee/drs/MyApp/ViewControllerWebApp.war/main.jsf @470,113 selectionListener="#{backingBeanScope.BeanNavigation.selectDisease}": java.lang.NullPointerException
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:111)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1589)
      at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:276)
      at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
      at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:486)
      at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
      at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:279)
      at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
      at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:482)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1137)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:361)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:202)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
      at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
      at view.navigation.selectDisease(navigation.java:489)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.sun.el.parser.AstValue.invoke(Unknown Source)
      at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
      at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
      ... 48 more
    I use the same method on the past on different application, on same jdeveloper version and it worked, i don't understand
    what i am doing wrong here,
    thanks for any help.

    I finally found the solution, since i don't use the table's property to make a current row, i add it programmatically:
        public static Object invokeEL(String el, Class[] paramTypes, Object[] params) {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            ELContext elContext = facesContext.getELContext();
            ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
            MethodExpression exp = expressionFactory.createMethodExpression(elContext, el, Object.class, paramTypes);
            return exp.invoke(elContext, params);
        public static Object evaluateEL(String el) {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            ELContext elContext = facesContext.getELContext();
            ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
            ValueExpression exp = expressionFactory.createValueExpression(elContext, el, Object.class);
            return exp.getValue(elContext);
        public void rowSelected(SelectionEvent selectionEvent) {
            invokeEL("#{bindings.MyVO.collectionModel.makeCurrent}",
                             new Class[] { SelectionEvent.class },
                             new Object[] { selectionEvent });
            Row rw =
                (Row)evaluateEL("#{bindings.MyVOIterator.currentRow}");
            rw.getAttribute("TheAttribueINeed").toString()); //etc....

  • 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

  • Detail Table Not Changing When Master Table Selection Changes

    Using JDev 11.1.1.6.
    I am working through some Oracle tutorials (Storefront Demos).
    I am accessing the Fusion Order Demo (FOD) schema.
    I have created VOs based on BCs for Categories, Subcategories and Products.
    I have added all to my data model and tested functionality using the AppModule.  This works as expected.
    When I drag the Subcategories onto my jsf page as Master-Detail (Table-Table), the initial list is based on the first index of the BrowseCategory data control.
    When I click on another row in the master table, the detail table refreshes but the same data appears.
    I confirmed that the selection changes on the master table.
    I added a button on the page and checked the BrowseCategoryIterator using some backing bean code and the iterator remains on the first record.
    I checked the SelectionListener on the table and it is set correctly as   "#{bindings.BrowseCategory1.collectionModel.makecurrent}"
    Does anyone have any idea why the detail table is not getting updated based on a relationship to the master table?
    Thanks,
    Raymond

    Hi,
    From what you are saying:
         1. it's working in application module tester
         2. you verified the current row of the iterator and you found that it is stuck on the first row
    The problem is then that the selection in the table is not setting the current row in the iterator.
    Try to add a custom selection listener where you just execute the "#{bindings.BrowseCategory1.collectionModel.makecurrent}" expression. this is just to make sure that the listener is being called.
    Also, the problem might be that the current row is correctly set by the table selection, but later in the life cycle it is being reset. so maybe you can also overwite the methods that set the current row in your VOimpl (again by jsut calling the supper) to check if and when these methods are called.
    Regards,
    Elias.

  • In the af:table selected row need to display in the next page?

    Hi,
    I am using jdev 11.1.2.3.0.
    I tried one sample application, in that jspx page, I am having the af:table and button in my view activity. In that table select one row and click on the button that time, the navigation page always show the first row. Suppose I select the 5th ro and navigate the page also displaying the first row only. So I don't know how to proceed this? Kindly suggest me.
    Regards,
    Ragu

    Hi Timo,
    I used the selectionListener tag also.
    Anyway Here I posted my jspx page.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document title="EmployeesView.jspx" id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:panelCollection id="pc1">
    <f:facet name="menus"/>
    <f:facet name="toolbar">
    <af:toolbar id="t2">
    <af:commandButton text="Edit Employee" id="cb1" action="Edit" />
    </af:toolbar>
    </f:facet>
    <f:facet name="statusbar"/>
    <af:table value="#{bindings.EmployeesVO.collectionModel}" var="row" rows="#{bindings.EmployeesVO.rangeSize}"
    emptyText="#{bindings.EmployeesVO.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.EmployeesVO.rangeSize}" rowBandingInterval="0"
    filterModel="#{bindings.EmployeesVOQuery.queryDescriptor}"
    queryListener="#{bindings.EmployeesVOQuery.processQuery}" filterVisible="true" varStatus="vs"
    selectedRowKeys="#{bindings.EmployeesVO.collectionModel.selectedRow}"
    selectionListener="#{bindings.EmployeesVO.collectionModel.makeCurrent}" rowSelection="single"
    id="t1">
    <af:column sortProperty="#{bindings.EmployeesVO.hints.EmployeeId.name}" filterable="true" sortable="true"
    headerText="#{bindings.EmployeesVO.hints.EmployeeId.label}" id="c1">
    <af:outputText value="#{row.EmployeeId}" id="ot1">
    <af:convertNumber groupingUsed="false" pattern="#{bindings.EmployeesVO.hints.EmployeeId.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="#{bindings.EmployeesVO.hints.FirstName.name}" filterable="true" sortable="true"
    headerText="#{bindings.EmployeesVO.hints.FirstName.label}" id="c2">
    <af:outputText value="#{row.FirstName}" id="ot2"/>
    </af:column>
    <af:column sortProperty="#{bindings.EmployeesVO.hints.LastName.name}" filterable="true" sortable="true"
    headerText="#{bindings.EmployeesVO.hints.LastName.label}" id="c3">
    <af:outputText value="#{row.LastName}" id="ot3"/>
    </af:column>
    <af:column sortProperty="#{bindings.EmployeesVO.hints.Email.name}" filterable="true" sortable="true"
    headerText="#{bindings.EmployeesVO.hints.Email.label}" id="c4">
    <af:outputText value="#{row.Email}" id="ot4"/>
    </af:column>
    <af:column sortProperty="#{bindings.EmployeesVO.hints.PhoneNumber.name}" filterable="true" sortable="true"
    headerText="#{bindings.EmployeesVO.hints.PhoneNumber.label}" id="c5">
    <af:outputText value="#{row.PhoneNumber}" id="ot5"/>
    </af:column>
    <af:column sortProperty="#{bindings.EmployeesVO.hints.HireDate.name}" filterable="true" sortable="true"
    headerText="#{bindings.EmployeesVO.hints.HireDate.label}" id="c6">
    <f:facet name="filter">
    <af:inputDate value="#{vs.filterCriteria.HireDate}" id="id1">
    <af:convertDateTime pattern="#{bindings.EmployeesVO.hints.HireDate.format}"/>
    </af:inputDate>
    </f:facet>
    <af:outputText value="#{row.HireDate}" id="ot6">
    <af:convertDateTime pattern="#{bindings.EmployeesVO.hints.HireDate.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="#{bindings.EmployeesVO.hints.JobId.name}" filterable="true" sortable="true"
    headerText="#{bindings.EmployeesVO.hints.JobId.label}" id="c7">
    <af:outputText value="#{row.JobId}" id="ot7"/>
    </af:column>
    <af:column sortProperty="#{bindings.EmployeesVO.hints.Salary.name}" filterable="true" sortable="true"
    headerText="#{bindings.EmployeesVO.hints.Salary.label}" id="c8">
    <af:outputText value="#{row.Salary}" id="ot8"/>
    </af:column>
    <af:column sortProperty="#{bindings.EmployeesVO.hints.CommissionPct.name}" filterable="true" sortable="true"
    headerText="#{bindings.EmployeesVO.hints.CommissionPct.label}" id="c9">
    <af:outputText value="#{row.CommissionPct}" id="ot9"/>
    </af:column>
    <af:column sortProperty="#{bindings.EmployeesVO.hints.ManagerId.name}" filterable="true" sortable="true"
    headerText="#{bindings.EmployeesVO.hints.ManagerId.label}" id="c10">
    <af:outputText value="#{row.ManagerId}" id="ot10">
    <af:convertNumber groupingUsed="false" pattern="#{bindings.EmployeesVO.hints.ManagerId.format}"/>
    </af:outputText>
    </af:column>
    <af:column sortProperty="#{bindings.EmployeesVO.hints.DepartmentId.name}" filterable="true" sortable="true"
    headerText="#{bindings.EmployeesVO.hints.DepartmentId.label}" id="c11">
    <af:outputText value="#{row.DepartmentId}" id="ot11">
    <af:convertNumber groupingUsed="false" pattern="#{bindings.EmployeesVO.hints.DepartmentId.format}"/>
    </af:outputText>
    </af:column>
    </af:table>
    </af:panelCollection>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    After click the Edit Employee button it should navigate the another page and which record I choose.

Maybe you are looking for