Compare current row of iterator with row.rowKeyStr of af:iterator

Hi,
I have an af:iterator looping though all employees.
For each employee I display a button. When the user presses the button then the current row of the iterator is set (with setCurrentRowKey).
This works so far.
Now I need to mark the button which represents the current row (e.g. with a red border).
For this purpose I want to compare empRow.rowKeyStr with the currentRowKeyString of the iterator to determine which button represents the current row.
But empRow.rowKeyStr and currentRowKeyString of the ADF binding are always different.
                          <af:iterator id="iter2" var="empRow" varStatus="n"
                                       rows="#{bindings.EmployeesView.rangeSize}"
                                       value="#{deptRow.EmployeesView}"
                                       binding="#{backingBeanScope.backing_test_iterator.iter2}">
                            <af:panelGroupLayout id="pgl1" layout="vertical">
                              <af:outputText value="currentRowKeyString: #{bindings.testEmployeesViewIterator.currentRowKeyString}"
                                             id="ol1x"/>
                              <af:outputText value="rowKeyStr: #{empRow.rowKeyStr}"
                                             id="ol4"/>
                              <af:commandButton text="#{empRow.LastName}"
                                                id="cbEmpPos"
                                                partialSubmit="true"
                                                inlineStyle="height:80px;"
                                                action="#{backingBeanScope.backing_test_iterator.invokeSetCurrentRowWithKey}"
                                                binding="#{backingBeanScope.backing_test_iterator.cbEmpPos}"/>
                            </af:panelGroupLayout>
                          </af:iterator>Any ideas how to solve this issue?
BTW: skining of af:commandButton which has the focus does not fullfill the requirement as the current row must not have the focus too.
regards
Peter

Hello Timo,
Thanks for the input. I checked the code in ADF code and both (rowKeyStr and currentRowKeyString) use toStringFormat(true).
The problem IMO is that I have a tree binding for the nested af:iterator.
So I have to compare empRow.rowKeyStr with the currentRowKeyString of the child iterator which is the Accessor "EmployeesView".
At the moment I compare empRow.rowKeyStr with an extra iterator testEmployeesViewIterator --> the key can never be the same :-(
    <tree IterBinding="testDepartmentsViewIterator"
          id="testDepartmentsViewAFIter">
      <nodeDefinition DefName="model.DepartmentsView"
                      Name="testDepartmentsViewAFIter0">
        <AttrNames>
          <Item Value="DepartmentId"/>
          <Item Value="DepartmentName"/>
        </AttrNames>
        <Accessors>
          <Item Value="EmployeesView"/>
        </Accessors>
      </nodeDefinition>
      <nodeDefinition DefName="model.EmployeesView"
                      Name="testDepartmentsViewAFIter1">
        <AttrNames>
          <Item Value="EmployeeId"/>
          <Item Value="FirstName"/>
          <Item Value="LastName"/>
        </AttrNames>
      </nodeDefinition>
    </tree>If I'm able to access currentRowKeyString from the Accessor "EmployeesView" then I should have solved my problem.
regards
Peter

Similar Messages

  • Compare current time and date with last modified?

    Compare current time and date with last modified?
    What is the ideal way to compared the last modified from the File class with the current date and time? last modifed value from File class is a long.

    798642 wrote:
    So what do I do to compare whether the current date and time and later than the lastModified ?
    if(file.lastModified() < System.currentTimeMillis()) {
    Like that?That tests whether the last modified time is before "now"--that is if the file was not modified in the future, so, yes.

  • Change the current row in an iterator and reflect the change on page

    Hi there,
    I have a jspx with a creation form created as usual draging and droping the data control. In same page, I inserted a commandButton which ActionListener executes a method in a managed bean called validate(). Through such a method what Im trying to do is to fill the form with data from specified entry of the database if certain condition is true. I know it is kinda twisted but unfortunately is the requirement for the page.
    So basically in "validate" method, if the condition I mentioned is reached, I do the following:
    // execute a Rollback (included in Page Definition) in order to cancel the previous auto-invoked "Create".
    FacesContext context = FacesContext.getCurrentInstance();
    Application app = context.getApplication();
    BindingContainer bindings =(BindingContainer)app.getVariableResolver().resolveVariable(context,"bindings");
    OperationBinding opBinding = bindings.getOperationBinding("Rollback");
    opBinding .execute();
    //get the iterator and asociated VO from the binding container
    ValueBinding vb = app.createValueBinding("#{bindings.AccountsVOIterator}");
    DCIteratorBinding dciter = (DCIteratorBinding) vb.getValue(FacesContext.getCurrentInstance());
    ViewObject view = dciter.getViewObject();
    //and set the current row with the specified entry I have mentioned above.
    Object keyValues[] = new Object[2];
    keyValues[0] = "1"; keyValues[1] = "98543";
    Row[] row = view.findByKey(new Key(keyValues),1);
    AccountsVpnVORowImpl client = (AccountsVpnVORowImpl)row[0];
    view.setCurrentRow(client);
    view.executeQuery();
    dciter.setCurrentRowWithKey(client.getKey().toStringFormat(true));
    dciter.executeQuery();
    opBinding = bindings.getOperationBinding("Execute");
    opBinding.execute();
    All this works perfectly when I debbug it but I cannot see the changes in the page(even refreshing browser). I need that when such a condition is met, the creation form turns into a modify-specific entry form, filling all fields with the specific data in order user can modify it, and all in the same page.
    Any clue?
    Thanks so much in advance for your time.

    Hi,
    I could see the problem with call to executeQuery and execute methods at the end of your method which re-sets the current row.
    Once you set the current row you should not call execute or executequery methods. Try removing those calls and also make sure that you have added partialTriggers property on the table is set to commandbutton id and partialSubmit property is set to true on commandButton to refresh the table partially on click of a button
    Sireesha

  • Setting current row using a string key in an iterator

    Hi ,
    I am using Studio Edition Version 11.1.1.6.0 and integrated wls.
    QUESTION:_
    As suggested by Sudipto i want to brief up my query.
    I have a master-detail relationship .Using that relation's Tree model i am displaying through an <af:iterator> . I want to set the current row in the iterator of the parent view object . Is there a way please help .
    Description:_
    I have 2 master-details tables . FormSections is the mater and SectionContents is the child.
    I have an use case and using the tree collection model in an iterator to display the nodes.The jsf page has the following markup
    <iterator id="i1" value="#{bindings.FormSectionsView1.collectionModel}"
    var="section">
    <decorativeBox id="db2">
    <facet name="top">
    <commandLink text="#{section.Sectionname}" id="cl1">
    <showPopupBehavior triggerType="action" popupId="p1"/>
    </commandLink>
    </facet>
    <facet name="center">
    <iterator id="i2" value="#{section.children}" var="field">
    <outputText value="#{field.Fieldlabel}" id="ot3"/>
    </iterator>
    </facet>
    </decorativeBox>
    </iterator>
    on the popup p1 i have #{DesignBean.createField} popupfetch listener.Now i want to insert a new row in the child when i click on the commandlink.
    I have tried the following
    1) Tried binding setCurrentRowWithKey and setCurrentRowWithKeyValue (namedvalue as #{section.Sectionid}) but there was no change i get the current row set to empty
    2) Tried using the following bean codes
    a) DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding sectionsIterator =
    (DCIteratorBinding)bindings.get("FormSectionsView1Iterator");
    System.out.println(sectionsIterator.getCurrentRow());
    String key_str="21";
    sectionsIterator.setCurrentRowWithKeyValue(key_str);
              executeOperationBindings("CreateInsert1");// child createinsert binding execution
         b)     DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding sectionsIterator =
    (DCIteratorBinding)bindings.get("FormSectionsView1Iterator");
    System.out.println(sectionsIterator.getCurrentRow());
    String key_str="21";
    Key key=sectionsIterator.createKey(key_str);
    if(key!=null)
    sectionsIterator.setCurrentRowWithKey(key.toStringFormat(true));
              executeOperationBindings("CreateInsert1");
              Now i have a problem of setting the parent to the current row on the iterator of the parent i am getting null pointer exception when tried to set the key.
    Thanks,
    Raj
    Edited by: RajaSekharReddy.M on Jan 30, 2013 6:11 AM
    Edited by: RajaSekharReddy.M on Jan 31, 2013 4:39 AM

    Rajasekhar ,
    What model layer do you use ? If ADF BC then shouldn't the parent child relationship already been defined as a View Link ?
    Also I'm a little confused as to why you are setting a hardcoded the key with a string , since you are clicking the command link from the row , you should be accessing it as
    #{section.sectionId}
    Also I didnot understand this line-
    Now i have a problem of setting the parent to the current row on the iterator of the parent i am getting null pointer exception when tried to set the key.A small tip is you can start giving briefly what you are trying to achieve and whats failing to get accurate replies . Please refer -
    https://forums.oracle.com/forums/ann.jspa?annID=56

  • Problem with Current row of a VO???

    I have a Advanced table region in which i add many rows..and i get the data in to it from the lov page (lov mappings).
    for each row i add... i have to set a item in main page table region doing some validations the data i get from lov region.
    with examples..more detailed..
    i have paymentAmount and AllocAmount...i get the payment Amount from LOV...after doing some validation on paymnetAmount i have to set the same value to the AllocAmount.
    ARTransactionLine is the VO which contains the above mentioned attributes....and advanced table i mentioned above is based on this VO.
    for this purpose im using the following code..
    ARTransactionLineVOImpl
    vo=(ARTransactionLineVOImpl)findViewObject("ARTransactionLineVO1");
    ARTransactionLineVORowImpl TransDetailsVORow = (ARTransactionLineVORowImpl)vo.getCurrentRow();
    payment_amount = TransDetailsVORow.getPaymentAmount();/*for this paymentAmount i made a lov mapping..so that currentrow contains the value of paymnetAmount from lov page*/
    if(/* some validation*/){
    TransDetailsVORow.setAllocAmount(payment_amount);
    now when i do this ..for the first row it is working fine...but for the second row it is failing...getCurrentRow() is giving the values of previous row..not the current row...
    first of all what does this getCurrentRow return???
    help me ...n tell me where i was wrong...

    I m sure you have not gone through the tutorials completely.
    ARTransactionLineVOImpl vo =(ARTransactionLineVOImpl)findViewObject("ARTransactionLineVO1");
    ARTransactionLineVORowImpl TransDetailsVORow = (ARTransactionLineVORowImpl)vo.getCurrentRow();
    with this row i am doing the below opeations..
    Number x=TransDetailsVORow.getPaymentAmount();
    /* some validations*/
    TransDetailsVORow.setAllocAmount(x);
    Change to
    ARTransactionLineVOImpl vo =(ARTransactionLineVOImpl)findViewObject("ARTransactionLineVO1");
    ARTransactionLineVORowImpl TransDetailsVORow = (ARTransactionLineVORowImpl)vo.first();
    while (TransDetailsVORow!=null)
    Number x=TransDetailsVORow.getPaymentAmount();
    /* some validations*/
    TransDetailsVORow.setAllocAmount(x);
    TransDetailsVORow = (ARTransactionLineVORowImpl)vo.next();
    Tapash

  • How to handle the current row with radio button selection???

    Hi Everyone,
    I have one ADF page with one table and one "Find" button.
    I have created one new attribute with VARCHAR2(1) in the VO and dragged that attribute as first column in the table. And changed that first column to Radio Button to select only one row at a time.
    Upon clicking on the "Find" button i need to get the values of current selected row.
    How can i get the values of selected row?
    What code should i write to get the values of selected row in Method Binding of "Find" button?
    Any suggestions will be really useful.
    Thanks.

    Hello Kumar,
    I have some comments on your case.
    >
    I have created one new attribute with VARCHAR2(1) in the VO
    >
    1- You should create this attribute in the Entity object and then add it to the view object.
    2- Do you need that only one radio button is set at a time for all rows ? If yes then you need to handle the case when the user set more than one row and clear the value of the attribute for all other rows.
    >
    How can i get all the values of current row in backing bean method(method binding of Find method)?
    can u plz provide me the code for that?
    >
    If you mean by the current row is that the row with its value of the selected attribute is set (the radio button is set for that row), then you can write a method in the viewObjectImpl class and expose it to client interface and call it from your bean.
    here is an example based in Department table in HR schema.
    //This method is written in DepartmentsViewImpl   
    public Row getSelectedRadioRow(){
                //create a second row set to not impact the row set used in ADF
                RowSet duplicateRowSet = this.createRowSet("duplicateRowSet");
                //get the current row of the table to set it back after re-executing the VO
                DepartmentsViewRowImpl currentRow = (DepartmentsViewRowImpl)this.getCurrentRow();
                Row[] filteredRows = duplicateRowSet.getFilteredRows("IsSelected", "1");
                DepartmentsViewRowImpl row=null;
                if(filteredRows.length>0){
                    row = (DepartmentsViewRowImpl)filteredRows[0];
                    System.out.println("Department Name " + row.getDepartmentName());              
                this.setCurrentRow(currentRow);
                duplicateRowSet.closeRowSet();
                return row;           
            }

  • How to compare two rows from two table with different data

    how to compare two rows from two table with different data
    e.g.
    Table 1
    ID   DESC
    1     aaa
    2     bbb
    3     ccc
    Table 2
    ID   DESC
    1     aaa
    2     xxx
    3     ccc
    Result
    2

    Create
    table tab1(ID
    int ,DE char(10))
    Create
    table tab2(ID
    int ,DE char(10))
    Insert
    into tab1 Values
    (1,'aaa')
    Insert
    into tab1  Values
    (2,'bbb')
    Insert
    into tab1 Values(3,'ccc')
    Insert
    into tab1 Values(4,'dfe')
    Insert
    into tab2 Values
    (1,'aaa')
    Insert
    into tab2  Values
    (2,'xx')
    Insert
    into tab2 Values(3,'ccc')
    Insert
    into tab2 Values(6,'wdr')
    SELECT 
    tab1.ID,tab2.ID
    As T2 from tab1
    FULL
    join tab2 on tab1.ID
    = tab2.ID  
    WHERE
    BINARY_CHECKSUM(tab1.ID,tab1.DE)
    <> BINARY_CHECKSUM(tab2.ID,tab2.DE)
    OR tab1.ID
    IS NULL
    OR 
    tab2.ID IS
    NULL
    ID column considered as a primary Key
    Apart from different record,Above query populate missing record in both tables.
    Result Set
    ID ID 
    2  2
    4 NULL
    NULL 6
    ganeshk

  • Can't compare a row with other rows within a table.. (many to many compare)

    Hi all..
    I am very new to PL/SQL..
    I need to travers through a table for comparing it's rows with in the table with other rows. For this I am trying to use bellow Pl/sql.
    create or replace compare()
    Declare
    VAR_HIT CHAR(1);
    SEARCH_RECORD_DATA UDB.table1%ROWTYPE;
    CANDIDATE_RECORD_DATA UDB.table1%ROWTYPE;
    CURSOR SEARCH_RECORDS_CURSOR IS SELECT * FROM UDB.table1 order by registration_id;
    CURSOR CANDIDATE_RECORDS_CURSOR IS SELECT * FROM UDB.table1 order by registration_id;
    BEGIN
    FOR SEARCH_RECORD_DATA IN SEARCH_RECORDS_CURSOR LOOP
    FOR CANDIDATE_RECORD_DATA IN CANDIDATE_RECORDS_CURSOR LOOP
    IF (CANDIDATE_RECORD_DATA.DECISION='P') THEN
    VAR_HIT:='y';
    IF(CANDIDATE_RECORD_DATA.FIRST_NAME!='unknown') AND (CANDIDATE_RECORD_DATA.FIRST_NAME!=SEARCH_RECORD_DATA.FIRST_NAME) THEN
    VAR_HIT:='n';
    ELSIF(CANDIDATE_RECORD_DATA.LAST_NAME!='unknown') AND (CANDIDATE_RECORD_DATA.LAST_NAME!=SEARCH_RECORD_DATA.LAST_NAME) THEN
    VAR_HIT:='n';
    ELSIF(CANDIDATE_RECORD_DATA.BIRTH_DATE!='unknown') AND (CANDIDATE_RECORD_DATA.BIRTH_DATE!=SEARCH_RECORD_DATA.BIRTH_DATE) THEN
    VAR_HIT:='n';
    ELSIF(CANDIDATE_RECORD_DATA.GENDER!='U') AND (CANDIDATE_RECORD_DATA.GENDER!=SEARCH_RECORD_DATA.GENDER) THEN
    VAR_HIT:='n';
    ELSIF(CANDIDATE_RECORD_DATA.FATHER_NAME!='unknown') AND (CANDIDATE_RECORD_DATA.FATHER_NAME!=SEARCH_RECORD_DATA.FATHER_NAME) THEN
    VAR_HIT:='n';
    ELSIF (CANDIDATE_RECORD_DATA.MOTHER_NAME!='unknown') AND (CANDIDATE_RECORD_DATA.MOTHER_NAME!=SEARCH_RECORD_DATA.MOTHER_NAME) THEN
    VAR_HIT:='n';
    END IF;
    IF(VAR_HIT='y') THEN
    INSERT INTO UDB.BIO_DI_HIT_RESULT(REGISTRATION_ID,SEARCH_ID,HIT_CANDIDATE_ID,SEARCH_DETAILS,CANDIDATE_DETAILS) VALUES (SEARCH_RECORD_DATA.REGISTRATION_ID,SEARCH_RECORD_DATA.EGM_NO,CANDIDATE_RECORD_DATA.EGM_NO,VAR_SEARCH_DETAILS,VAR_CANDIDATE_DETAILS);
    UPDATE UDB.BIO_RECORDS_DEMOGRAPHICS SET DECISION='D';
    END IF;
    END IF;
    END LOOP;
    commit;
    END LOOP;
    END;
    Outer loop is working fine (it is raversing throughout the table) (say for 8000 records 8000 times)
    But Enner loop is not working fine e.i. it's running just for 8000 times for 8000 records. while it should run more then 8000 time..
    Can any one help me..
    Is the way of using two cursor on one table for comparing each row of record is correct????????? :(

    Finally I come up with this:
    INSERT INTO UDB.BIO_DI_HIT_RESULT(REGISTRATION_ID,SEARCH_ID,HIT_CANDIDATE_ID,SEARCH_DETAILS,CANDIDATE_DETAILS)
    SELECT SEARCH.REGISTRATION_ID, SEARCH.Key_NO,CANDIDATE.Key_NO,
    'First name='||SEARCH.FIRST_NAME||',Last name='||SEARCH.LAST_NAME||',Birth date='||SEARCH.BIRTH_DATE||',Gender='||SEARCH.GENDER||',Fathers name='||SEARCH.FATHER_NAME||',Mother name='||SEARCH.MOTHER_NAME,
    'First name='||CANDIDATE.FIRST_NAME||',Last name='||CANDIDATE.LAST_NAME||',Birth date='||CANDIDATE.BIRTH_DATE||',Gender='||CANDIDATE.GENDER||',Fathers name='||CANDIDATE.FATHER_NAME||',Mother name='||CANDIDATE.MOTHER_NAME
    FROM UDB.BIO_RECORDS_DEMOGRAPHICS SEARCH,UDB.BIO_RECORDS_DEMOGRAPHICS CANDIDATE
    WHERE (SEARCH.FIRST_NAME!='unknown' OR SEARCH.LAST_NAME!='unknown' OR SEARCH.BIRTH_DATE!='unknown' OR SEARCH.GENDER!='unknown' OR SEARCH.FATHER_NAME!='unknown' OR SEARCH.MOTHER_NAME!='unknown')
    AND SEARCH.REGISTRATION_ID != CANDIDATE.REGISTRATION_ID
    AND SEARCH.REGISTRATION_ID < CANDIDATE.REGISTRATION_ID
    AND (SEARCH.FIRST_NAME='unknown' OR CANDIDATE.FIRST_NAME IN (SEARCH.FIRST_NAME,'unknown'))
    AND (SEARCH.LAST_NAME='unknown' OR CANDIDATE.LAST_NAME IN (SEARCH.LAST_NAME,'unknown'))
    AND (SEARCH.BIRTH_DATE='unknown' OR CANDIDATE.BIRTH_DATE IN (SEARCH.BIRTH_DATE,'unknown'))
    AND (SEARCH.GENDER='U' OR CANDIDATE.GENDER IN (SEARCH.GENDER,'U'))
    AND (SEARCH.BIRTH_DATE='unknown' OR CANDIDATE.BIRTH_DATE IN (SEARCH.BIRTH_DATE,'unknown'))
    AND (SEARCH.FATHER_NAME='unknown'OR CANDIDATE.FATHER_NAME IN (SEARCH.FATHER_NAME,'unknown'))
    AND (SEARCH.MOTHER_NAME='unknown' OR CANDIDATE.MOTHER_NAME IN (CANDIDATE.MOTHER_NAME,'unknown'))
    ORDER BY SEARCH.REGISTRATION_ID;
    Now it realy meet all my final table requirement.. I am happy.. :)
    But again last requirement is like..
    In the final BIO_DI_HIT_RESULT table I need to add one more column named as match_count
    This column will have values of total no. of exact match field (not unknown) for each records in the BIO_DI_HIT_RESULT.....
    One way of duing this is--
    Step1: I will use a cursor for traversing through each of the rows in BIO_DI_HIT_RESULT.
    Step 2: And based on count of matches in search_details(substring) and candiate_details(substring) I update each and every rows of the table.
    It will be very slow.. And for records like 2 million records.. I can't think of this idea. :(
    Sooooo,, Is there ANY BETTER WAY OF DOING THIS AS WELL.. BETTER MEANS FAST WAY.. :(
    Thanks in advance....
    Edited by: user13367608 on Jan 8, 2011 2:13 AM

  • How to Select the Current Row When Using af:iterator?

    Hello all,
    I encounter the following problem when using af:iterator to display data from
    a View Object:
    When trying to display the content of a row via a popup, only the first row is
    returned no matter which row is selected. So a selection of the current row
    should exist or some other method which should allow the access to the
    current row.
    The af:table has a selectionListener attribute which permit to achieve this.
    Does anyone know about some similar attribute or some method for
    selecting the current row when the af:iterator is used?
    Thank you,
    Mirela

    I would be interested in the answer to this basic question as well. I cannot get the selected row value of an attribute in an iterator for a view if I simply set-up a attribute binding to the iterator. It seems that this should be possible. I've had no other option but to obtain the current row and the related attributes programmatically. This works fine, but if there is a more elegant option, then I'd certainly like to use it.
              <af:table value="#{bindings.CompaniesView1.collectionModel}"
                            var="row"
                            rows="#{bindings.CompaniesView1.rangeSize}"
                            emptyText="#{bindings.CompaniesView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                            fetchSize="#{bindings.CompaniesView1.rangeSize}"
                            selectedRowKeys="#{bindings.CompaniesView1.collectionModel.selectedRow}"
                            rowBandingInterval="0" id="tCompanies"
                            summary="Companies"
                            width="100%"
                            rowSelection="single"
                            binding="#{CompanyBackingBean.companiesTable}">Page Def:
        <attributeValues IterBinding="CompaniesView1Iterator" id="Id">
          <AttrNames>
            <Item Value="Id"/>
          </AttrNames>
        </attributeValues>I should be able to get the Id attribute value of the current selected row using "#{bindings.Id}", right? Well, it doesn't work for me. Any ideas?
    Thanks

  • Compare two rows in a same table

    Dear all
    I need to compare two rows in the same table, I dont know hoe to do it in pl/sql. Some one please help me on this.
    example:
    tr br price
    xya0001 ama7 12
    xya0003 ama6 14
    xya0004 ama7 16
    in the table tr is a unique value for each row, I need to compare price column and see whether the first value is less or greater than the next value and, if it is greater put the corresponding br value to a variable and if it is smaller put the corresponding br value to another variable. I dont know a method to do it, as I'm new to pl/sql. Some one please help me in this

    not sure what you intend to do as you have mentioned that "TR" is unique and you just want to compare each record with just the next record. Hope below query helps. The value "G" or "L" in flag would indicate if the current records price is greater than or less than the price in next record.
    select tr,br,price,col4, case when price> col4 then 'G'  when price< col4 then 'L' end flag from (
    select tr,br,price,lag(price,1,0) over(order by tr) col4 from testcomp
    )

  • Losing the current row without doing anything

    I using 10g and my page have a VOR (viewobject readonly) to control form data but...
    I'm losing several times the current row ... for example I put this code in a button:
    public String clickAction() {
    AdminUCAtoCartorarioAMImpl am = null;
    try {
    am = ( AdminUCAtoCartorarioAMImpl )super.getApplicationModule( "AdminUCAtoCartorarioAMDataControl" );
    am.getAmbienteEscaninhoVOR().getCurrentRow(); //Here, sometimes brings me null.
    } catch (Exception e) {
    e.printStackTrace();
    return null;
    }

    User,
    You give us the symptom of the problem, but
    I'm losing several times the current rowdoesn't help anyone to help you pinpoint what might be the cause. Under what circumstances does the current row come across as null? Are you manually iterating through the VO's row set somewhere? What happens before the current row is "lost?" What specific version (your tag indicates 10g, but specifically which version) of JDeveloper/ADF are you using? Does this occur only when deployed, or does it occur when running in the embedded OC4J.
    One thing for you to try... if it occurs "sometimes," seemingly randomly under load, try turning off Application Module Pooling and re-test. If it occurs every time with pooling turned off, you are likely seeing some issue related to passivation/activation - which is why it would be critical to mention the exact version; there are known issues with specific versions, and there are patches available.
    John

  • LOV switcher and set current Row

    Hi
    I have a LOV switcher attached to one of the columns in the view object.
    It works fine while switching the LOV's in mostly all conditions.
    But its failing for one case.
    We are using checkboxex to select a row , and do a operation in the row.
    To do this, the button on which the operation is performed ...
    1)we have checked which row has the transient value of check box as checked
    2) Set the current row of the iterator to the row that comes from the selected check box index..
    3) Called the operation.
    But as the code go to step two and the current row is set to the required row, all the LOV 's in all the rows start showing the Default LOV which is selected in the LOV switcher, if i do a f5 fr the page, the original values are restored.
    Also if the VO fecth size is 25 , it gives wrong value for 25 rows, if i scroll through the table again it automatically shows the correct value.
    This has been taking a lot of out time to debug the issue.
    I guess its somethng to do with LOV switcher , set current row and the table getting refreshed incorrectly on set current row

    Hi Timo ,
    Thanks fr the reply..
    Jdev 11.1.1.4
    Code for checkbox selection
    DCBindingContainer dcbindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterator =
    dcbindings.findIteratorBinding(iteratorName);
    Row[] rowSet = iterator.getAllRowsInRange();
    Integer selectCount = 0;
    for (Row row : rowSet) {
    Object selAtt = row.getAttribute(selectAttribName);
    if (selAtt != null && (Boolean)selAtt == true) {
    System.out.println("Row selected");
    selectCount++;
    if (selectCount > 1) {
    System.out.println("More than one row selected!");
    throw new ValidationException("More than one row selected");
    else{
    iterator.setCurrentRowWithKey(row.getKey().toStringFormat(true));
    } else {System.out.println("Row not selected");}
    I actually sorted the issue out
    had to write
    iterator.refresh(Row.REFRESH_CONTAINEES); after iterator.setCurrentRowWithKey(row.getKey().toStringFormat(true));
    But not sure if thts correct ...

  • Pass current row data from table and pass it to a method in AM

    Hi All,
    I have a table with row selection enabled. Also for each row I have a select image which on selection should pass the data from one of the columns of the current row selected to a method in AM.
    Can anybody let me know on "How on selection of the image in any row, can I pass the column data to the method in AM?".
    Thanks,
    Vijay

    Hi,
    the most easiest and straight forward approach is
    - Ckick the "Binding" tab at the bottom of the Visual Editor
    - In the Bindings section click teh green plus icon and choose Generic Bindings | Attribute Value
    - point the iterator selection to the iterator used by the table
    - choose the column's attribute name from the list of attributes
    - Create a method on the ApplicatioNModule IMPL class (should take single argument)
    - expose it as a client interfaces so it shows in the Data Controls panel
    - In the "Binding" tab, create a method binding for this exposed method
    - point the method binding argument to #{bindings.column-attribute-name.inptValue}
    So whenever you need to pass the value on to the AM, you just call the method binding
    OperationBinding oper = (OperationBinding) bindings.get("name of method");
    oper.execute();
    Frank

  • Need Help ::  Current row attribute value returning null

      Hi Frds,
    I am facing the problem that
    Current row attribute value returning null............ even though value is there..... plz.. he
    This is the code in PFR
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("queryBtn")!= null)
        String  pPersonId = pageContext.getParameter("ctrlPersonId");
         String rowReference = pageContext.getParameter(EVENT_SOURCE_ROW_REFERENCE);
         OptionsVORowImpl curRow = (     OptionsVORowImpl) am.findRowByRef(rowReference);
        String dtlsItem =  (String)curRow.getFlexValue();   /*  this is returning null value */
    /*  here creating  the hashmap and calling the page with the hashmap*/
    Thanks & Regards,
    jaya
    Message was edited by: 9d452cf7-d17f-4d1e-8e0e-b22539ea8810

    Hi Jaya,
    You want to catch Flexfield values?
    Try below code for catch value.
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("queryBtn")!= null)
    OADescriptiveFlexBean dfb = (OADescriptiveFlexBean)webBean.findChildRecursive("flexDFF"); //get the DFF bean
    OAWebBean dffbean = (OAWebBean)dfb.findChildRecursive("flexDFF0"); //get the field that applies to the attribute1 column that is being rendered
    OAMessageStyledTextBean Stylebean = (OAMessageStyledTextBean)dffbean;
    String dtlsItem  = (String)Stylebean.getText(pageContext);
    /*  here creating  the hashmap and calling the page with the hashmap*/
    Thanks,
    Dilip

  • Copying values from a row to a current row

    hi all, i have a complex scenario here. i have a table that has the following data.
    WITH table1 AS
      SELECT 111 the_id,  To_Date('6/30/2009','mm/dd/yyyy') dt,  93 src, 'A-C' the_name, 'AA' cod, 'BB' pad, ' CC' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('10/1/2009','mm/dd/yyyy') dt,  93 src, 'B-L' the_name, 'AA' cod, 'NN' pad, ' TT' tek FROM dual UNION all
      SELECT 111 the_id,  To_Date('10/2/2009','mm/dd/yyyy') dt,  93 src, 'C-H' the_name, 'BA' cod, 'RR' pad, ' BAN' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('10/5/2009','mm/dd/yyyy') dt,  93 src, 'D-R' the_name, 'HH' cod, 'FCY' pad, ' BANW' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('10/6/2009','mm/dd/yyyy') dt,  93 src, 'E-C' the_name, 'JJ' cod, 'EE' pad, ' JJ' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('10/7/2009','mm/dd/yyyy') dt,  93 src, 'F-L' the_name, 'DD' cod,  null pad, ' BAN' tek FROM dual UNION all
      SELECT 111 the_id,  To_Date('10/8/2009','mm/dd/yyyy') dt,  93 src, 'G-H' the_name, 'HG' cod, 'YY' pad, ' BAN' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('10/9/2009','mm/dd/yyyy') dt,  93 src, 'K-R' the_name, 'EE' cod, 'FCY' pad, ' BANW' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('7/31/2009','mm/dd/yyyy') dt,  93 src, 'G-H' the_name, 'HG' cod, 'YY' pad, ' BAN' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('8/3/2009','mm/dd/yyyy') dt,  93 src, 'K-R' the_name, 'EE' cod, 'FCY' pad, ' BANW' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('8/4/2009','mm/dd/yyyy') dt,  93 src, 'K-R' the_name, 'EE' cod, 'FCY' pad, ' BANW' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('8/5/2009','mm/dd/yyyy') dt,  93 src, 'K-R' the_name, 'EE' cod, 'FCY' pad, ' BANW' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('8/6/2009','mm/dd/yyyy') dt,  93 src, 'K-R' the_name, 'EE' cod, 'FCY' pad, ' BANW' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('8/7/2009','mm/dd/yyyy') dt,  93 src, 'K-R' the_name, 'EE' cod, 'FCY' pad,  null tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('6/30/2009','mm/dd/yyyy') dt,  22 src, 'A-C' the_name, 'AA' cod, 'BB' pad, ' CC' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('10/1/2009','mm/dd/yyyy') dt,  22 src, 'B-L' the_name, 'AA' cod, 'NN' pad, ' TT' tek FROM dual UNION all
      SELECT 111 the_id,  To_Date('10/2/2009','mm/dd/yyyy') dt,  22 src, 'C-H' the_name, 'BA' cod, 'RR' pad, ' BAN' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('10/5/2009','mm/dd/yyyy') dt,  22 src, 'D-R' the_name, 'HH' cod, 'FCY' pad, ' BANW' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('10/6/2009','mm/dd/yyyy') dt,  22 src, 'E-C' the_name, 'JJ' cod, 'EE' pad, ' JJ' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('10/7/2009','mm/dd/yyyy') dt,  22 src, 'F-L' the_name, 'DD' cod, 'FIC' pad, ' BAN' tek FROM dual UNION all
      SELECT 111 the_id,  To_Date('10/8/2009','mm/dd/yyyy') dt,  22 src, 'G-H' the_name, 'HG' cod, 'YY' pad, ' BAN' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('10/9/2009','mm/dd/yyyy') dt,  22 src, 'K-R' the_name, 'EE' cod, 'FCY' pad, ' BANW' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('10/30/2009','mm/dd/yyyy') dt, 168 src, 'T-C' the_name, 'WW' cod, 'AA' pad, ' NN' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('11/2/2009','mm/dd/yyyy') dt,  168 src, 'Y-L' the_name, 'HH' cod, 'AA' pad, ' BAN' tek FROM dual UNION all
      SELECT 111 the_id,  To_Date('11/3/2009','mm/dd/yyyy') dt,  168 src, 'G-H' the_name, 'BA' cod, 'WW' pad, ' BAN' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('11/4/2009','mm/dd/yyyy') dt,  168 src, 'E-R' the_name, 'JJ' cod, 'XX' pad, ' DD' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('11/5/2009','mm/dd/yyyy') dt,  168 src, 'T-C' the_name, 'TT' cod, 'JJ' pad, ' WW' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('11/6/2009','mm/dd/yyyy') dt,  168 src, 'H-L' the_name, 'EE' cod, 'DD' pad, ' BAN' tek FROM dual UNION all
      SELECT 111 the_id,  To_Date('11/9/2009','mm/dd/yyyy') dt,  168 src, 'S-H' the_name, 'BA' cod, 'WW' pad, ' BAN' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('11/10/2009','mm/dd/yyyy') dt, 168 src, 'H-R' the_name, 'VV' cod, 'FCY' pad, ' YY' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('11/30/2009','mm/dd/yyyy') dt,  90 src, 'V-C' the_name, 'GG' cod, 'FCS' pad, ' BAN' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('12/1/2009','mm/dd/yyyy') dt,  90 src, 'B-L' the_name, 'QQ' cod, 'GG' pad, ' BAN' tek FROM dual UNION all
      SELECT 111 the_id,  To_Date('12/2/2009','mm/dd/yyyy') dt,  90 src, 'A-H' the_name, 'BA' cod, 'WW' pad, ' BAN' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('12/3/2009','mm/dd/yyyy') dt,  90 src, 'N-R' the_name, 'TT' cod, 'JJ' pad, ' TT' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('12/7/2009','mm/dd/yyyy') dt,  90 src, 'C-C' the_name, 'YY' cod, 'QQ' pad, ' WE' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('12/8/2009','mm/dd/yyyy') dt,  90 src, 'X-L' the_name, 'UU' cod, 'JJ' pad, ' BAN' tek FROM dual UNION all
      SELECT 111 the_id,  To_Date('12/9/2009','mm/dd/yyyy') dt,  90 src, 'V-H' the_name, 'BA' cod, 'PP' pad, ' YR' tek FROM dual UNION ALL
      SELECT 111 the_id,  To_Date('12/10/2009','mm/dd/yyyy') dt,  90 src, 'E-R' the_name, 'FIN2' cod, 'FCY' pad, ' RE' tek FROM dual UNION ALL
      SELECT 112 the_id,  To_Date('2/28/2009','mm/dd/yyyy') dt,  93 src, 'V-C' the_name, 'EE' cod, 'FCS' pad, ' BAN' tek FROM dual UNION ALL
      SELECT 112 the_id,  To_Date('3/2/2009','mm/dd/yyyy') dt,  93 src, 'A-S' the_name, 'BA' cod, 'WW' pad, ' TT' tek FROM dual UNION ALL
      SELECT 112 the_id,  To_Date('3/3/2009','mm/dd/yyyy') dt,  93 src, 'N-R' the_name, 'TT' cod, 'JJ' pad, ' TT' tek FROM dual UNION ALL
      SELECT 112 the_id,  To_Date('3/4/2009','mm/dd/yyyy') dt,  93 src, 'C-C' the_name, 'YY' cod, 'QQ' pad, ' WE' tek FROM dual UNION ALL
      SELECT 112 the_id,  To_Date('3/5/2009','mm/dd/yyyy') dt,  93 src, 'X-L' the_name, 'SS' cod, 'JJ' pad, ' BAN' tek FROM dual UNION all
      SELECT 112 the_id,  To_Date('3/6/2009','mm/dd/yyyy') dt,  93 src, 'V-H' the_name, 'BA' cod, 'PP' pad, ' YR' tek FROM dual UNION ALL
      SELECT 112 the_id,  To_Date('3/9/2009','mm/dd/yyyy') dt,  93 src, 'E-R' the_name, 'HH' cod, 'KK' pad, ' RE' tek FROM dual
    )so as you can see, there are month end dates and well and daily dates. the daily are basically business days. what i want to do is the following
    for a particular id, i would like to take the month end date, look forward 5 business day and copy the column values from the 5th business day
    to the current row.
    there is two exceptions:
    1. i am only interested on those src=93 and 168.
    2. the_name column will not be copy, but the rest will
    so lets take an example, id = 111 src = 93. since i am only interested in src=93 and 168, this data fall in that category.
    the month end dates for id=111 and src=93 are 6/30/09 and 7/31/2009.
    in this case i want to look forward 5 business days. in the case of 6/30/09, the 5th business day is 10/7/2009 and for 7/31/2009 is 8/7/2009.
    i want to take all the column values except the_name column and display those values for 6/30/09. same thing with 7/31/2009, take column values from 8/7/2009
    and display those values.
    so the output for 6/30/2009 should look like this
    THE_ID     DT            SRC     THE_NAME     COD       PAD      TEK
    111         6/30/2009     93     A-C           DD               BANif ou notice here 6/30/2009 retain the value for the_name column but took the values for the remaining column from 10/7/2009 (even the null values got copy)
    the same logic should apply to 7/31/2009 and value should be taking from 8/7/2009
    if the src is not equal to 93 or 168. then just display the data and no logic apply, for id=111 and src=90
    no logic apply, the data should just be display.
    i would like to write a query tha give me the output below.
    i tried using last_value function but i am using oracle 9i and ignore null is not supported in oracle 9i. i need to copy null if the 5th day contain null in the columns
    the final ouput for the data above should be this
    THE_ID     DT             SRC     THE_NAME     COD     PAD     TEK
    111         6/30/2009       93     A-C           DD            BAN
    111         10/1/2009       93     B-L           AA     NN      TT
    111         10/2/2009       93     C-H           BA     RR      BAN
    111         10/5/2009       93     D-R           HH     FCY      BANW
    111         10/6/2009       93     E-C           JJ     EE      JJ
    111         10/7/2009       93     F-L           DD     FIC      BAN
    111         10/8/2009       93     G-H           HG     YY      BAN
    111         10/9/2009       93     K-R           EE     FCY      BANW
    111         7/31/2009       93     G-H           EE     FCY
    111         8/3/2009       93     K-R          EE     FCY      BANW
    111         8/4/2009       93     K-R           EE     FCY      BANW
    111         8/5/2009       93     K-R           EE     FCY      BANW
    111         8/6/2009       93     K-R          EE     FCY      BANW
    111         8/7/2009       93     K-R           EE     FCY
    111         6/30/2009       22     A-C           AA     BB      CC
    111         10/1/2009       22     B-L           AA     NN      TT
    111         10/2/2009       22     C-H           BA     RR      BAN
    111         10/5/2009       22     D-R           HH     FCY      BANW
    111         10/6/2009       22     E-C           JJ     EE      JJ
    111         10/7/2009       22     F-L          DD     FIC      BAN
    111         10/8/2009       22     G-H          HG     YY      BAN
    111         10/9/2009       22     K-R           EE     FCY      BANW
    111         10/30/2009     168     T-C           EE     DD      BAN
    111         11/2/2009       168     Y-L           HH     AA      BAN
    111         11/3/2009       168     G-H           BA     WW      BAN
    111         11/4/2009       168     E-R           JJ     XX      DD
    111         11/5/2009       168     T-C           TT     JJ      WW
    111         11/6/2009       168     H-L          EE     DD      BAN
    111         11/9/2009       168     S-H          BA     WW      BAN
    111         11/10/2009     168     H-R           VV     FCY      YY
    111         11/30/2009     90     V-C           GG     FCS      BAN
    111         12/1/2009       90     B-L           QQ     GG      BAN
    111         12/2/2009       90     A-H           BA     WW      BAN
    111         12/3/2009       90     N-R           TT     JJ      TT
    111         12/7/2009       90     C-C           YY     QQ      WE
    111         12/8/2009       90     X-L           UU     JJ      BAN
    111         12/9/2009       90     V-H           BA     PP      YR
    111         12/10/2009     90     E-R           FIN2 FCY      RE
    112         2/28/2009     93       V-C           BA     PP      YR
    112         3/2/2009     93       A-S           BA     WW      TT
    112         3/3/2009     93       N-R           TT     JJ      TT
    112         3/4/2009     93       C-C           YY     QQ      WE
    112         3/5/2009     93       X-L           SS     JJ      BAN
    112         3/6/2009     93       V-H           BA     PP      YR
    112         3/9/2009     93       E-R           HH     KK      RE

    hi i am using oracle 9i 9.2.0.7.0
    you are right about the 5th business day, for 6/30/2010 it should have been 8/7/2010. 7/31/2010 is a month end so it doesnt count when you go down the list of business days. and for 7/31/2010 the 5th business day should have been 10/7/2010.
    sorry for the mistake, i got both of them backwards. so for the output, 6/30/2010 should copy from 8/7/2010 and 7/31/2010 from 10/7/2010
    THE_ID     DT             SRC     THE_NAME     COD     PAD     TEK
    111         6/30/2009       93     A-C           EE    FCY
    111         8/3/2009       93     K-R          EE     FCY      BANW
    111         8/4/2009       93     K-R           EE     FCY      BANW
    111         8/5/2009       93     K-R           EE     FCY      BANW
    111         8/6/2009       93     K-R          EE     FCY      BANW
    111         8/7/2009       93     K-R           EE     FCY
    111         7/31/2009       93     G-H           DD              BAN
    111         10/1/2009       93     B-L           AA     NN      TT
    111         10/2/2009       93     C-H           BA     RR      BAN
    111         10/5/2009       93     D-R           HH     FCY      BANW
    111         10/6/2009       93     E-C           JJ     EE      JJ
    111         10/7/2009       93     F-L           DD             BAN
    111         10/8/2009       93     G-H           HG     YY      BAN
    111         10/9/2009       93     K-R           EE     FCY      BANWEdited by: elmasduro on May 10, 2010 11:53 AM

Maybe you are looking for

  • Toolbar icons are not displaying,  After upgraded to Acrobat 9.4

       Hi All,    We have developed one tool using Acrobat javascript and C++ plugin. It is very well working in Acrobat 9. But after my acrobat is upgraded to 9.4 version. some icons in the toolbar is found missing. I am unable to find the reason behind

  • New in graphic code.

    i want to create a bar chart using graphic2d. Does some one has sample code which creates a Bar chart .

  • FM for position lock check

    Hi All Is there any function module to check whether perticular postion id is locked. Thanks, Shrinivas

  • V570 video drivers don't work with Windows 7 Home Premium 64

    Yesterday I bought a V570 notebook, with an addition Windows 7 Home Premium 64 BIT OEM, since the operating system on it was Free Dos.  I've installed Windows and started to install the drivers from the disk that came with notebook. After I've instal

  • Create schedulers for all existing user jobs

    Hi Forum, In my database (Oracle Database 10g Enterprise Edition Release 10.2.0.4.0), I have 7 DB schemas. There are total existing 50 jobs (usaer_jobs). I want to shift them all to scheduler (user_scheduler_jobs). My plan is, 1.     Create scheduler