Refreshing/clearing iterator (ADF bug?)

Hi,
I have three cascading SelectOneChoice lists.
List A
List B
List C
The user can select a value in List A, which Populates List B and List C. The user can then select a value in List B, which then narrows down the contents of List C. The problem is that list C now contains the results from the List A event and the List B event, instead of just containing the results of the new query.
I am using EJB3, ADF Faces
many thanks
R

Just realised that it's not a problem of not being able to refresh the iterator - I can - it's that the iterator still contains the data from the previous query... AND then the data from the requery. All I need to know is how to empty the contents of the iterator?
Come on expert Oracles, I'm feeling lonely here :-)
R

Similar Messages

  • ADF Bug? SelectOneChoice in af:column becomes null after refresh

    Hello,
    I just discovered a serious issue in my code (ADF 11.1.1.4/Windows 7). I was able to reproduce the issue using the following code :
    I have a table mapped to a Widget ViewObject listing some widget definitions. On of the column represents the widget type id. I use an af:selectOneChoice and the widgetTypeId is mapped to the WidgetType ViewObject (the category name is displayed)
    The page definition :
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
                    version="11.1.1.59.23" id="testFramePageDef"
                    Package="com.test.view.pageDefs">
      <parameters/>
      <executables>
        <variableIterator id="variables"/>
        <iterator Binds="WidgetView1" RangeSize="25"
                  DataControl="AppModuleDataControl" id="WidgetView1Iterator"/>
        <iterator Binds="WidgetTypeView1" RangeSize="-1"
                  DataControl="AppModuleDataControl" id="WidgetTypeView1Iterator"/>
      </executables>
      <bindings>
        <tree IterBinding="WidgetView1Iterator" id="WidgetView1">
          <nodeDefinition DefName="com.test.model.views.dashboard.WidgetView"
                          Name="WidgetView10">
            <AttrNames>
              <Item Value="WidgetId"/>
              <Item Value="WidgetTypeId" Binds="WidgetTypeId"/>
              <Item Value="Name"/>
              <Item Value="Reference"/>
              <Item Value="Description"/>
              <Item Value="StrId"/>
            </AttrNames>
          </nodeDefinition>
        </tree>
        <list IterBinding="WidgetView1Iterator" id="WidgetTypeId"
              DTSupportsMRU="true" StaticList="false"
              ListIter="WidgetTypeView1Iterator">
          <AttrNames>
            <Item Value="WidgetTypeId"/>
          </AttrNames>
          <ListAttrNames>
            <Item Value="WidgetTypeId"/>
          </ListAttrNames>
          <ListDisplayAttrNames>
            <Item Value="Name"/>
          </ListDisplayAttrNames>
        </list>
      </bindings>
    </pageDefinition>The jsf page displays the widgets name and type, which are both modifiable. I also added previous/next buttons :
    <?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:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:c="http://java.sun.com/jsp/jstl/core">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:messages id="m1"/>
          <af:form id="f1">
            <af:panelStretchLayout id="ptstc">
              <f:facet name="top">
                <af:panelGroupLayout id="pglact" layout="horizontal">
                  <af:commandButton id="cbprv" action="#{userBean.previous}" text="Previous"/>
                  <af:commandButton id="cbnxt" action="#{userBean.next}" text="Next"/>
                </af:panelGroupLayout>
              </f:facet>
              <f:facet name="center">
                <af:table value="#{bindings.WidgetView1.collectionModel}" var="row"
                          rows="#{bindings.WidgetView1.rangeSize}"
                          emptyText="#{bindings.WidgetView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                          fetchSize="#{bindings.WidgetView1.rangeSize}"
                          rowBandingInterval="0"
                          selectedRowKeys="#{bindings.WidgetView1.collectionModel.selectedRow}"
                          selectionListener="#{bindings.WidgetView1.collectionModel.makeCurrent}"
                          rowSelection="single" id="t1">
                  <af:column sortProperty="WidgetId" sortable="false"
                             headerText="#{bindings.WidgetView1.hints.WidgetId.label}"
                             id="c3">
                    <af:inputText value="#{row.bindings.WidgetId.inputValue}"
                                  label="#{bindings.WidgetView1.hints.WidgetId.label}"
                                  required="#{bindings.WidgetView1.hints.WidgetId.mandatory}"
                                  columns="#{bindings.WidgetView1.hints.WidgetId.displayWidth}"
                                  maximumLength="#{bindings.WidgetView1.hints.WidgetId.precision}"
                                  shortDesc="#{bindings.WidgetView1.hints.WidgetId.tooltip}"
                                  id="it5">
                      <f:validator binding="#{row.bindings.WidgetId.validator}"/>
                      <af:convertNumber groupingUsed="false"
                                        pattern="#{bindings.WidgetView1.hints.WidgetId.format}"/>
                    </af:inputText>
                  </af:column>
                  <af:column sortProperty="WidgetTypeId" sortable="false"
                             headerText="#{bindings.WidgetView1.hints.WidgetTypeId.label}"
                             id="c1">
                    <af:selectOneChoice value="#{row.bindings.WidgetTypeId.inputValue}"
                                        label="#{row.bindings.WidgetTypeId.label}"
                                        required="#{bindings.WidgetView1.hints.WidgetTypeId.mandatory}"
                                        shortDesc="#{bindings.WidgetView1.hints.WidgetTypeId.tooltip}"
                                        id="soc1">
                      <f:selectItems value="#{row.bindings.WidgetTypeId.items}"
                                     id="si1"/>
                    </af:selectOneChoice>
                  </af:column>
                </af:table>
              </f:facet>
            </af:panelStretchLayout>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>Here is the code from my backing bean :
        private int widgetId = 1010;
        public void previous(){
          text = "action";
          AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
          ViewObject vo = am.getWidgetView1();
          widgetId--;
          vo.setWhereClause("WIDGET_ID="+widgetId);
          vo.executeQuery();
        public void next(){
          text = "action";
          AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
          ViewObject vo = am.getWidgetView1();
          widgetId++;
          vo.setWhereClause("WIDGET_ID="+widgetId);
          vo.executeQuery();
        }Now the issue : if I open the page, the entire widget table is displayed. I click on 'next' and the first record is displayed with correct name and type. If a do a refresh by hitting F5, the action is re-executed and the second row is displayed, also with correct name and type. But if I select 'previous', I come back to the first row but the type is now set to null(0).
    Can you tell me if this code is correct and if yes : are you able to reproduce it? / is this an ADF bug?
    Thank you
    Stephane
    Edited by: drahuks on 9 mai 2011 01:32

    Frank,
    The backing bean is session scoped.
    I tried a second solution using af:iterator and af:selectItem instead of af:selectItems :
    pageDef :
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
                    version="11.1.1.59.23" id="testFramePageDef"
                    Package="com.test.view.pageDefs">
      <parameters/>
      <executables>
        <variableIterator id="variables"/>
        <iterator Binds="WidgetView1" RangeSize="25"
                  DataControl="AppModuleDataControl" id="WidgetView1Iterator"/>
        <iterator Binds="WidgetTypeView1" RangeSize="-1"
                  DataControl="AppModuleDataControl" id="WidgetTypeView1Iterator"/>
      </executables>
      <bindings>
        <tree IterBinding="WidgetView1Iterator" id="WidgetView1">
          <nodeDefinition DefName="com.test.model.views.dashboard.WidgetView">
            <AttrNames>
              <Item Value="Name"/>
              <Item Value="WidgetTypeId"/>
            </AttrNames>
          </nodeDefinition>
        </tree>
        <table IterBinding="WidgetTypeView1Iterator" id="WidgetTypeLov">
          <AttrNames>
            <Item Value="Name"/>
            <Item Value="WidgetTypeId"/>
          </AttrNames>
        </table>
      </bindings>
    </pageDefinition>jspx :
    <af:selectOneChoice value="#{row.WidgetTypeId}"
                                        id="soc1">
                      <af:forEach var="typeNode"
                                  items="#{bindings.WidgetTypeLov.rangeSet}">
                        <af:selectItem id="sit" value="#{typeNode.WidgetTypeId}"
                                        label="#{typeNode.Name}"/>
                      </af:forEach>
                      <!--<f:selectItems value="#{row.bindings.WidgetTypeId.items}"
                                     id="si1"/>-->
                    </af:selectOneChoice>Still get an issue : when hitting F5 I get a nullpointer exception. Here is the debug :
    <ADFLogger> <begin> Execute query
    <ViewObjectImpl> <buildQuery> [1960] _LOCAL_VIEW_USAGE_com_test_model_views_dashboard_WidgetView_WidgetTypeView1>#q computed SQLStmtBufLen: 112, actual=85, storing=115
    <ViewObjectImpl> <buildQuery> [1961] SELECT WidgetType.WIDGET_TYPE_ID,         WidgetType.NAME FROM WIDGET_TYPE WidgetType
    <ViewObjectImpl> <getPreparedStatement> [1962] ViewObject: [com.test.model.views.WidgetTypeView]AppModule._LOCAL_VIEW_USAGE_com_test_model_views_dashboard_WidgetView_WidgetTypeView1 Created new QUERY statement
    <ViewObjectImpl> <bindParametersForCollection> [1963] Bind params for ViewObject: [com.test.model.views.WidgetTypeView]AppModule._LOCAL_VIEW_USAGE_com_test_model_views_dashboard_WidgetView_WidgetTypeView1
    <ViewObjectImpl> <bindParametersForCollection> [1964] For RowSet : _LOCAL_VIEW_USAGE_com_test_model_views_dashboard_WidgetView_WidgetTypeView1_0
    <ADFLogger> <addContextData> Execute query
    <ADFLogger> <addContextData> Execute query
    <ADFLogger> <addContextData> Get LOV list
    <MessageFactory> <getMessage>
    java.lang.NullPointerException
         at oracle.jbo.uicli.binding.JUCtrlListBinding.processNewInputValue(JUCtrlListBinding.java:3834)
         at oracle.adfinternal.view.faces.model.HierNodeBindingELResolver.setValue(HierNodeBindingELResolver.java:77)
         at oracle.adfinternal.view.faces.model.AdfELResolver.setValue(AdfELResolver.java:132)
         at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:283)
         at com.sun.faces.el.DemuxCompositeELResolver._setValue(DemuxCompositeELResolver.java:252)
         at com.sun.faces.el.DemuxCompositeELResolver.setValue(DemuxCompositeELResolver.java:278)
         at com.sun.el.parser.AstValue.setValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.setValue(Unknown Source)
         at org.apache.myfaces.trinidad.component.UIXEditableValue.updateModel(UIXEditableValue.java:289)
         at org.apache.myfaces.trinidad.component.UIXEditableValue.processUpdates(UIXEditableValue.java:252)Stephane
    Edited by: drahuks on 10 mai 2011 04:09

  • Refresh Vo Iterator

    Hi,
    I m using Jdeveloper 11 g.
    My requirement is to refresh(clear the cache) Vo Iterator on page load.
    For that I tried Vo Object.
    1.
        ViewObject iterator =
                      ((DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry()).findIteratorBinding("CustCGUnmappedListVO1Iterator").getViewObject();
        iterator.clearCache();
        iterator.executeQuery();but this is not refreshing or clearing the cache of iterator.
    and also I used
    2. iterator.getApplicationModule().clearVOCaches(null , true);
    3. In VO, create the VO impl class and override the executeQuery method and executeQueryForCollection method.
    so please suggest is there any other solution to clear the cache then please replay.
    Thank You ,
    Dilkhush

    Hi,
    Sure,
    on my page there are three table's(A,B,C) of different VO Object's (V1,V2,V3).
    On page Load 'A' table has data and 'B' & 'C' tables are empty.
    on the first table selection (A) populates data in Other Two tables (B & C).
    Here I i Fire ExecuteWithParam on remaining VO to get data.
    when I change the menu and go on other page and come back to the previous page that time it show the last executed data in Table 'B' & 'C'.
    Here I required to clear both the table.
    Becoz unless n until user select the table 'A' Don't populate record in Table 'B' & 'C'.
    the Code which i had posted above was written in AfterPahse() Method of PhaseListener Interface.
    So please guide me.
    Thank you,
    Dilkhush

  • Refresh clear.

    hi mates,
         what is the difference bt refresh and clear. whats their usage in internal table. can anyone give sample code on usage of refresh , clear on internal tables.
    regards
    Manoharan

    Hi
    Clear will cleras the header information where as Refresh will also do same but it will remove all the BODY data available in internal table
    CLEAR
    Structures are set to their initial values component by component
    means only header information
    REFRESH
    This statement sets an internal table itab to its initial value, meaning that it deletes all rows of the internal table. The memory space required for the table is freed up to the initial memory size INITIAL SIZE. For itab, you must specify an internal table.
    To delete all rows and free the entire memory space occupied by rows, you can use the statement FREE.
    The statement REFRESH itab acts for all internal tables like CLEAR itab[]. If an internal table itab has a header line, then the table body and not the header line is initialized. If the internal table itab has no header line, REFRESH itab acts like CLEAR itab. Therefore, you should always use CLEAR instead of REFRESH.

  • Orchestrate between 2 iterator adf 11g

    hi,
    i have 2 page ,the first to show the data in a table and the second to update the selected row ,when i select a row and i try to update it it juste update the first row ,
    i think that the probleme is the iterator we must put the same iterator in the too page ,haw can i put it?are there any help please?

    So there is absolutely NO difference between the working example and the example that fails?
    In which case, why not use the working example to accomplish your work?
    I notice you are new to the forums and looking at the questions you are posting it seems like you might be getting confused by how to best use the technology - maybe it would be worth taking a quick refresher on some of the on line tutorials. The problems you are having should pretty much just be drag and drop solutions in ADF and I wonder if you might be doing something different and not telling us. I also appreciate that online/remote communication can be a challenge sometimes but you are not very clear on the steps you are doing and what you are looking to achieve. The clearer you can be the easier it will be for us to help you.
    Regards
    Grant

  • Scrollbar refresh issue in ADF Table

    Hello, All
    We have an issue regarding the ADF Tables. Please let me know if it is a Oracle bug. All of us know that 'ExecuteQuery' operation refreshes the cache in View Objects.
    But, based on our testing results, there might be a table refresh issue on vertical scrollbars after this opertion is executed.
    Settings:
    In the attached example project, we have a ADF RichTable included in a PanelCollection.
    In addition, We set 'AutoHeightRows' property on this ADF RichTable in order to show scrollbars on the PanelCollection.
    Furthremore, a standard CommandButton is created on the toolbar to execute queries.
    Experimental Steps:
    1. Use your mouse to move the vertical scrollbar to around the center of its range. This behavior causes the scrollbar scrolling vertically.
    2. Click on any row showing in the table right now, make it to be the active row.
    3. Press the 'ExecuteQuery' button, waiting for the table refresh.
    Results:
    1. Active row moves to the first row in the rowset.
    2. Vertical scrollbar stay in the center of its range without moving to the first row.
    3. The first row is hidden from end users. The user can not see the active row in this case.
    FYI:
    The attached project can be accessed from the following link:
    http://www.4shared.com/zip/Xn4Ki0DP/Application3.html
    In this project, we tried to set 'partialTriggers' on RichTable and its surrounding PanelCollection separately. But, the refreshing issue still exists.
    Regards,
    David He

    Welcome David to forums.
    Always mention your exact Jdev version. For more information read this: https://forums.oracle.com/forums/ann.jspa?annID=56
    I too faced the similar kind of issue in one of my application.
    As you have not mentioned the exact jdev version, I will tell you what I did in my application which was developed using Jdev 11.1.2.0
    After the VO is executed, you can write the below line of code to show the first rows in the table.
    applicationsRichTable.setDisplayRow(applicationsRichTable.DISPLAY_ROW_FIRST);
    //applicationRichTable is the binding for the RichTable in managed beanHope it helps.

  • How to refresh an iterator with PPR set to none after task flow operation?

    Using JDev 11.1.2.1.0.
    Doing the sample here: http://www.gebs.ro/blog/oracle/oracle-adf-creating-an-addedit-bounded-task-flow-using-a-new-transaction/
    For this to work, you've got to set your page iterator/executable's ChangeEventPolicy to "none". Otherwise, you can't set the selected row correctly due to the iterator refreshing on commit.
    I'm trying to extend this example to include a Delete operation setup in the task flow. However, I can't figure out how to refresh the page's iterator to display the updated results. The Delete doesn't run in a dialog so it doesn't invoke the calling button's returnListener.
    Any ideas?
    Thanks,
    Will

    Thank you for your response.
    I'm trying to call the delete operation from a task flow. Once the delete occurs, the page should somehow call a refresh on the iterator displayed. However, since the iterator can not have PPR set, the refresh doesn't happen automatically. Additionally, since the delete doesn't happen as part of a dialog window, the returnListener for the calling button does not fire.

  • Azure SQL DB Basic Edition Preview: "Session Request Limit Reached" Stuck and Doesn't Clear - SQL DB Bug?

    Edit: I have updated the below to reflect that it took four hours for the database to unblock. This looks like a bug to me. SQL Server seemed to believe there were 30 running sessions with open requests nearly four hours after the client
    side connections were terminated (and thus in the process blocking SQL Server from accepting new connections).
    Problem
    I am running a preview "Basic" edition SQL DB and have hit a problem with Azure SQL DB blocking database access for an extended time period.
    I was running a test, which was running normally for several hours (loading small batches of data), then suddenly lots of connection timeouts (error type 1 below).  My workload was constant over the whole test - but if the server was suddenly under
    pressure, I accept this might happen - no problem with me so far. 
    Upon retrying, the errors then changed to request limit exceeded (error type 2 below).
    I am surprised I hit the limit in the first place, since the test code closes the SQL Connection on a timeout error and reopens.  (In C#, the code is wrapped in a using{} to ensure prompt connection closure).  Still, perhaps the amount of concurrent
    work on the server did momentarily hit this limit.  Perhaps fair enough on this point too.
    BUT:  Surprisingly, nearly four hours later, I was still unable to connect to the database - it was refusing new connections.  Either from my worker role or from the Azure Management Website.  The Management Window, upon trying to connect,
    failed with exactly the same text as error type 2 below.
    Further, sys.resource_stats (from the master db, which is still accessible) is reporting that there were 30 active sessions, 30 active workers (see extract below) for four afters after the test ended.  Even though during this time period the Azure Cloud
    Service that was generating the SQL requests was stopped too (so the client side of any open requests were long since dead).  Also,
    the CPU, Log Write and Phys Data Read columns in sys.resource_stats are all showing 0 for the four hours after the test ended.  This to me suggests a fault condition that isn't clearing server-side.
    Why was the database unavailable for four hours?  Why did Azure believe that there were 30 open requests? (each request was an insert of 1000 rows, each of 400 bytes, i.e. pretty small so no way should they take this long to process).
    PS.  To be clear, none of the above is a complaint.  I completely accept that the service in in preview, different SLA, etc.  I am writing to a) check that I haven't missed anything and b) if this is a bug, to report it.
    Appendix
    Error Type 1
    System.Data.SqlClient.SqlException:  Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
    Error Type 2
    SqlException: Resource ID : 1. The request limit for the database is 30 and has been reached. See 'http://go.microsoft.com/fwlink/?LinkId=267637' for assistance.
    Metrics
    The following is an extract from sys.resource_stats for the affected time period.  SQL Server seems to wrongly believe/report that there are 30 pending requests between 6:20 and 10:45.  It thus blocks any further requests during this time.  There
    were NO client connections during this time, either new or previously opened.
    start time
    end time
    sku
    session count
    worker count
    avg cpu
    avg phys data read
    avg log write
    07 Jun 11:15
    07 Jun 11:20
    Basic
      0
    0
    0
    0
    0
    07 Jun 10:50
    07 Jun 10:55
    Basic
      0
    0
    0.5
    0
    0
    07 Jun 10:40
    07 Jun 10:45
    Basic
      30
    30
    0.01
    0
    0
    07 Jun 09:35
    07 Jun 09:40
    Basic
      30
    30
    0.02
    0
    0
    07 Jun 09:20
    07 Jun 09:25
    Basic
      30
    30
    0
    0
    0
    07 Jun 09:10
    07 Jun 09:15
    Basic
      30
    30
    0.01
    0
    0
    07 Jun 08:40
    07 Jun 08:45
    Basic
      30
    30
    0
    0
    0
    07 Jun 08:20
    07 Jun 08:25
    Basic
      30
    30
    0.01
    0
    0
    07 Jun 08:10
    07 Jun 08:15
    Basic
      30
    30
    0.01
    0
    0
    07 Jun 07:55
    07 Jun 08:00
    Basic
      30
    30
    0
    0
    0
    07 Jun 07:25
    07 Jun 07:30
    Basic
      30
    30
    0.01
    0
    0
    07 Jun 07:15
    07 Jun 07:20
    Basic
      30
    30
    0
    0
    0
    07 Jun 07:05
    07 Jun 07:10
    Basic
      30
    30
    0.01
    0
    0
    07 Jun 06:55
    07 Jun 07:00
    Basic
      30
    30
    0
    0
    0
    07 Jun 06:45
    07 Jun 06:50
    Basic
      30
    30
    0.15
    0
    0
    07 Jun 06:20
    07 Jun 06:25
    Basic
      30
    30
    0.01
    0
    0
    07 Jun 06:15
    07 Jun 06:20
    Basic
      30
    30
    0.22
    0
    0
    07 Jun 06:10
    07 Jun 06:15
    Basic
      26
    26
    0.13
    0
    0
    07 Jun 06:05
    07 Jun 06:10
    Basic
      20
    20
    0.14
    0
    0
    07 Jun 06:00
    07 Jun 06:05
    Basic
      13
    13
    0.12
    0
    0
    07 Jun 05:55
    07 Jun 06:00
    Basic
      7
    7
    0.12
    0
    0
    07 Jun 05:50
    07 Jun 05:55
    Basic
      1
    1
    54.04
    0
    93.47
    07 Jun 05:45
    07 Jun 05:50
    Basic
      1
    0
    1.4
    0
    2.06
    07 Jun 05:40
    07 Jun 05:45
    Basic
      1
    1
    55.17
    0
    88.35
    07 Jun 05:35
    07 Jun 05:40
    Basic
      1
    0
    52.05
    0
    90.01
    07 Jun 05:30
    07 Jun 05:35
    Basic
      1
    1
    54.95
    0
    90.1
    07 Jun 05:25
    07 Jun 05:30
    Basic
      1
    1
    56.38
    0
    89.82
    07 Jun 05:20
    07 Jun 05:25
    Basic
      1
    0
    52.15
    0
    90.19
    07 Jun 05:15
    07 Jun 05:20
    Basic
      1
    0
    52.76
    0
    87.86

    Hi Chris,
    Thanks for testing the new Basic edition and for reporting this issue. Without some more investigation it is hard to tell what exactly has happened here.
    To be able to take a closer look I would need some more information from you. Could you please reach out to me via email (firstname DOT lastname AT microsoft DOT com)? I will then let you know what additional information we and will kick-off
    the investigation.
    Thanks,
    Jan

  • Lifecycle issue with table binding + read-only attributes: ADF BUG

    Hello all,
    I have found what I believe to be an easily reproducible bug in ADF that reproduces in 10.1.3.x, but not in 11g (at least not in drop 6). The best way to describe the bug would be to walk through a simple set of steps to reproduce the bug:
    1). Create a new application (ADF BC + ADF Faces).
    2). In the model project, create a new Entity Object from the Employee table in the default HR schema. Allow JDev to create an updatable view object and an AM as well.
    3). Put a validation rule on the first name attribute of the EO (can be anything, really - I made mine so that the first name cannot be "foo").
    4). Test everything using the BC tester if you like.
    5). In the UI project, create a new JSPX page.
    6). Drag the updatable VO on to your page as an updatable af:table.
    7). Put an af:commandButton on the page. Bind its Action or ActionListener to a method in a new backing bean. Put some simple code (I used System.out.println) in the backing bean method.
    8). Run the jspx page.
    9). Put some invalid data in (e.g. "foo" in the first name field) and click the af:commandButton. Verify that you get an error message and that the Action/ActionListener method DOES NOT fire. So far, so good.
    10). Now, to demonstrate the problem. First, look at the page definition for the jspx file. Identify the first attribute that is mentioned (in my case, it was the employee id).
    11). Go to the updatable view object and make the attribute from #10 read-only or updatable when new only.
    12. Now, repeat step 9 - you should see the error message AND also see that the Action/ActionListener method was executed. You will also see in the messages window that ADF attempted to set the value of the read-only attribute, and thus got a ReadOnlyAttrException.
    This issue only happens if the first attribute mentioned in the table binding is read-only. A workaround would simply be to re-order the attributes in the table binding of the pagedef so that the first attribute isn't read-only.
    Don't ask how I figured this out ;)
    Best,
    John

    Hi Frank,
    Yes, I simply scripted it out this way to contrast the behaviour if the first attribute was read-only vs not read-only. I found the issue on a page in our app that was simply drag-and-drop the VO from the data control on the page.
    It's quite annoying, because our particular use case that hit this error is a "save" button on the page. If the commit operation doesn't return any errors (and it doesn't in this use case!), we add a JSF message saying "save successful" - then the attribute errors are further added later in the page lifecycle, so we get 3 messages: "Save successful" and "Fix this error" and "Tried to set read-only attribute" - quite confusing to the end-user when the only message they should see is "fix this error."
    At any rate, the fix is to simply re-order the attributes in the page definition - that doesn't affect the UI at all, other than to fix this issue.
    John

  • What is causing this? Downloads do not complete, being partial and/or limited requiring refreshing/clearing History or stop-and-start Retry.

    Sometimes a download will not start at all if it is not small, (@ 1MB or greater) it will not download completely, requiring a Pause, then a Retry and/or clearing of the History and a reload of the page. Some downloads take as many a 5-10 such cycles to complete the download. This is also giving one particular secure site, my online college site, Argosy University Online, extreme issues just logging on to the Log-In page, and subsequent pages within the Online Campus.

    I checked  that yesterday and it wasn't set to do so... So I'm really confused. My fetch data is also on manually!

  • Format issue for Number field in af:query. Is it an ADF Bug?

    Hi OTN,
    Requirement : Format DepartmentId in query panel
    I have created a view criteria from Employees table (HR Schema). I have four view criteria items called EmployeeId, DepartmentId, Firstname, LastName and all the items having validation property as Selectively Required. DepartmentId attribute have UI Hints property as Format Type = Number and Format = *0000* and Auto Submit=true.
    But in UI, I am not able to do search from af:Query panel. It works fine without setting UI Hints property Format Type* and Format
    Step 1 : Enter 123 in DepartmentId field
    Step 2 : Click Search Button
    Error : Please provide a value for atleast one of the indicated fields
    Error Screen : http://www.freeimagehosting.net/24d51
    Please check the below link for downloading the sample application
    http://formatissue.googlecode.com/svn/trunk/FormatTest/FormatTest.zip
    http://formatissue.googlecode.com/svn/trunk/FormatTest ( SVN version)
    Note:
    JDev Version : 11.1.1.5.0
    I am using ADF BC and ADF Faces Components
    Any recommendations fully appreciated
    Thanks,
    Dinil Mithra
    Edited by: Dinil Mithra on Nov 23, 2011 4:51 PM
    Edited by: Dinil Mithra on Nov 23, 2011 5:21 PM

    Please find the metadata for VO attribute and View Criteria
    <ViewAttribute
    Name="DepartmentId"
    PrecisionRule="true"
    EntityAttrName="DepartmentId"
    EntityUsage="Employees"
    AliasName="DEPARTMENT_ID">
    <Properties>
    <SchemaBasedProperties>
    <CONTROLTYPE
    Value="edit"/>
    <FMT_FORMATTER
    ResId="model.EmployeesView.DepartmentId_FMT_FORMATTER"/>
    <FMT_FORMAT
    ResId="model.EmployeesView.DepartmentId_FMT_FORMAT"/>
    <AUTOSUBMIT
    Value="true"/>
    </SchemaBasedProperties>
    </Properties>
    </ViewAttribute>
    <ViewCriteria
    Name="EmployeesViewCriteria"
    ViewObjectName="model.EmployeesView"
    Conjunction="AND">
    <Properties>
    <CustomProperties>
    <Property
    Name="displayOperators"
    Value="InAdvancedMode"/>
    <Property
    Name="autoExecute"
    Value="false"/>
    <Property
    Name="allowConjunctionOverride"
    Value="true"/>
    <Property
    Name="showInList"
    Value="true"/>
    <Property
    Name="mode"
    Value="Basic"/>
    </CustomProperties>
    </Properties>
    <ViewCriteriaRow
    Name="vcrow103"
    UpperColumns="1">
    <ViewCriteriaItem
    Name="EmployeesViewCriteria_vcrow103_EmployeeId"
    ViewAttribute="EmployeeId"
    Operator="="
    Conjunction="AND"
    Required="SelectivelyRequired"
    GenerateIsNullClauseForBindVars="false"/>
    <ViewCriteriaItem
    Name="EmployeesViewCriteria_vcrow103_DepartmentId_EmployeesViewCriteria_vcrow103_DepartmentId_itemHolder_vcrow105_DepartmentId"
    ViewAttribute="DepartmentId"
    Operator="="
    Conjunction="AND"
    Required="SelectivelyRequired"
    GenerateIsNullClauseForBindVars="false"/>
    <ViewCriteriaItem
    Name="FirstName"
    ViewAttribute="FirstName"
    Operator="CONTAINS"
    Conjunction="AND"
    Required="SelectivelyRequired"
    GenerateIsNullClauseForBindVars="false"/>
    <ViewCriteriaItem
    Name="LastName"
    ViewAttribute="LastName"
    Operator="CONTAINS"
    Conjunction="AND"
    Required="SelectivelyRequired"
    GenerateIsNullClauseForBindVars="false"/>
    </ViewCriteriaRow>
    </ViewCriteria>

  • Shuttle Component Refresh Issue in ADF

    Hi,
    I have 2 screens back and forth. On 1st screen, I have the search table where the records are being displayed. There, we have a button to add records, which takes the user to the next screen. On the 2nd screen, I have a dropdown and a shuttle box, The values of the shuttlebox are dependent on the dropdown.On page load, the dropdown and shuttle should be blank. When we select something in the dropdown, the shuttle box should have the values changed according to the dropdown. The listener works fine and filters as expected.Now, when we add the records, the page is redirected to the search page. Now, again, when I come to the 2nd scree, the dropdown is black, but the shuttlebox still has values available previously as per the dropdown selected.
    Can someone please provide some ideas to refresh the shuttle box on page load?
    Please let me know if any more information is required.
    Thanks in advance!
    Abhishek

    Bean code for LOV:
    public List<SelectItem> getAvailableBusinessUnits() {
    DCIteratorBinding buIter =
    ADFUtils.findIterator("GmBusinessUnitVO1Iterator");
    ViewCriteria vc =
    buIter.getViewObject().getViewCriteriaManager().getViewCriteria("ActiveGmBusinessUnitVC");
    buIter.getViewObject().getViewCriteriaManager().applyViewCriteria(vc);
    buIter.getViewObject().executeQuery();
    if (availableBusinessUnits == null) {
    availableBusinessUnits =
    ADFUtils.selectItemsForIterator("GmBusinessUnitVO1Iterator",
    "GmBusinessUnitId",
    "BusinessUnitName");
    return availableBusinessUnits;
    Bean code for the shuttle box:
    public void buCountryList(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    buId = valueChangeEvent.getNewValue().toString();
    DCIteratorBinding countryList =
    ADFUtils.findIterator("CountryOfVehSalesBasedLOVOnBUSecurityVO1Iterator");
    countryList.getViewObject().ensureVariableManager().setVariableValue("business_unit",
    buId);
    countryList.getViewObject().executeQuery();
    Thanks
    Abhishek

  • Context menu refresh issue in adf tree.

    Hi All,
    I am using jdeveloper 12.1.2.2.0.
    I have a programmatically generated tree in which I have added two buttons in the context menu using context menu facet.
    * I have selection listener in the tree and right click also selects the node.
    There are two issues regarding the context menu:
    1. If I right click the tree node, the context menu is showing only the two buttons I added and it is not showing the default expand/collapse, expand all/collapse all below and show as top options of context menu. Once I refresh the tree region doing some actions in the page, it is showing all the options.
    2. The buttons I added inside the context menu have disabled conditions and the trigger is given for the parent container "popup" which will be triggered by tree node selection. The problem is that whenever I right click the tree node, the popup is refreshed because of the trigger and the expand/collapse functions are not working. If I right the same node again the functions are working fine.
    How to resolve these issues?
    Thanks in advance.
    - Vignesh S.

    Any suggestions would be helpful.
    The below is the xml of the tree:
                                                           <af:tree var="node" value="#{dmc.btm.model}" id="btc"
                                                                     rowSelection="#{(viewScope.fc.editable || viewScope.cc.editable || viewScope.bc.editable) ? 'none' : 'single'}"
                                                                     immediate="false" initiallyExpanded="false"
                                                                     selectionListener="#{dmc.selectionListener}"
                                                                     fetchSize="100" expandAllEnabled="true">
                                                                <f:facet name="nodeStamp">
                                                                    <af:group id="g3">
                                                                        <af:image source="#{node.icon}" id="i1"/>
                                                                        <af:outputText value="#{node.id}" id="ot4"/>
                                                                    </af:group>
                                                                </f:facet>
                                                                <f:facet name="contextMenu">
                                                                    <af:popup childCreation="deferred" autoCancel="enabled"
                                                                              id="p1" partialTriggers="::btc"
                                                                              contentDelivery="lazyUncached">
                                                                        <af:menu text="menu 1" id="m1">
                                                                            <af:toolbar id="t4">
                                                                                <af:commandToolbarButton shortDesc="Create"
                                                                                                         text="#{prop['label.new']}"
                                                                                                         icon="images/new_ena.png"
                                                                                                         disabledIcon="images/new_dis.png"
                                                                                                         id="ctb4"
                                                                                                         actionListener="#{dmc.newListener}"
                                                                                                         partialSubmit="true"
                                                                                                         disabled="#{!dmc.createButtonEnabled || viewScope.fc.editable || viewScope.cc.editable}"/>
                                                                            </af:toolbar>
                                                                            <af:toolbar id="t5">
                                                                                <af:commandToolbarButton shortDesc="Delete"
                                                                                                         text="#{prop['label.delete']}"
                                                                                                         icon="images/delete_ena.png"
                                                                                                         disabledIcon="images/delete_dis.png"
                                                                                                         id="ctb5"
                                                                                                         actionListener="#{dmc.deleteListener}"
                                                                                                         disabled="#{!dmc.deleteButtonEnabled || viewScope.fc.editable || viewScope.cc.editable}"/>
                                                                            </af:toolbar>
                                                                        </af:menu>
                                                                    </af:popup>
                                                                </f:facet>
                                                            </af:tree>

  • ShowPrintablePageBehavior is not working inside popup. Is it an ADF Bug?

    Hi,
    I am facing some issues with showPrintablePageBehavior component.
    1. I have placed a command button with showPrintablePageBehavior inside a popup. But I am getting a blank page in print mode. But the showPrintablePageBehavior is working fine without popup.
    2. I have a pivot table with a button having showPrintablePageBehavior and these components are surrounded with panelSplitter. But pivot table is not rendering in print mode.
    Using JDeveloper 11.1.1.5.0 / 11.1.1.6 - adfbc
    code:
    <af:form id="f1">
    <af:panelSplitter id="ps1">
    <f:facet name="first">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl1">
    <af:commandButton text="Popup" id="cb1">
    <af:showPopupBehavior triggerType="action" popupId="p1"/>
    </af:commandButton>
    <af:commandButton text="Print" id="cb3">
    <af:showPrintablePageBehavior/>
    </af:commandButton>
    <af:outputText value="Hai Output Text" id="outputText1"/>
    <af:popup id="p1">
    <af:dialog id="d2">
    <af:panelSplitter id="ps2">
    <f:facet name="first">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl2" clientComponent="true">
    <af:commandButton text="Print" id="cb2">
    <af:showPrintablePageBehavior/>
    </af:commandButton>
    <af:outputText value="Hai Popup Output Text" id="it9"/>
    <af:clientAttribute name="print" value="true"/>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelSplitter>
    </af:dialog>
    </af:popup>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelSplitter>
    </af:form>
    Thanks,
    Dinil Mithra V S

    Thank you Srinivas,
    Point 1.
    I wanted to print the content of popup. So I have placed an af:outputText text inside af:panelSplitter component. But this layout is not rendering in print mode while printing from a popup ant it works without popup.
    Point 2.
    I have downloaded and deployed oracle dvt-demo war into my local wls.I can see the same issue (pivot table is not rendering in print mode) in my local deployed version.
    Thanks,
    Dinil Mithra V S

  • How to clear the ADF Entity cache

    Hi All,
    While I'm using an entity based updatable view object,after deleting a record,I created a new record with the same key,It displays the deleted record instead of new record.
    Sample steps:
    1.Create a updatable view object with key attribute name sequence.
    2.I dropped this as table in the view page.
    3.I created a new record for this using CreateInsert action
    4.I entered the values for this new record.
    5.I deleted the new record
    6.Again I created a new record.
    7.If I enter the previous sequence value,it displays the old record values, If I enter a different value the delete record does not affect this.
    So I think,I need to clear the entity cache, but I have used clearCache() of ViewObjectImpl, there is no change.
    If anyone came across the problem and fixed,Please let me know the solution.
    Regards,
    Felix

    You are wrong here. if you don't commit the delete, the record is still there.
    You should not enter the same sequence again anyway. a sequence should be a one time number, once used it's gone. set the new key using a groovy expression and make it read inky in the ui.
    Timo

Maybe you are looking for

  • [CS3 JS]Get all the tables in the document

    Hello All, I want to return all of the tables in the document, including those in table cells. I am using this: var aTables = app.activeDocument.stories.everyItem().tables.everyItem().getElements(); but it doesn't get tables inside of tables. Is ther

  • Hyperion Financial data quality management

    Hi there, We are planning to implement Hyperion public sector planning and budgeting in school and we have SchoolMax systerm (Student information System) that contain student information. Now we want to use Hyperion FDQM to fetch data from Schoolmax

  • How to truncate the Table Subpartition ??

    Hi, I have 3 tables on my Oracle 10g database. They are interrelated as 1 --> 2 ---> 3, Table 1 & 2 are composite partiitoned with Partition By Rage and Sub Pratition by list. Now i have to truncate few listed subpartitions i.e Say If Subpartition (

  • RE: purpose of Personalization option (check box) while doing transports.

    Hi all, i am creating transport request and we recently upgraded from ECC6.0 to EPH4, after the upgrade we are getting warning messages if we select personalization option,  can any one tell me the purpose of personalization option while creating a t

  • Master detail using using java

    Hi , I am using jdev 11.1.1 5 My requirement to create master detail using java code.My view don't have view link.How to achive through code