Use of "ViewObject.QUERY_MODE_SCAN_VIEW_ROWS" in OAF

Hello,
how to do in memory searching or sorting in OAF appliation?
Actual problem is: we insert rows in table, before commit we apply search(written custom search code). This search is executed on Database data not on newly created records.
I have tried using following code to retain created rows in search:
ViewObject vo = am.findViewObject("XxTbxEmployeesTblVO");
RowMatch rm = new RowMatch("FirstName like '" + paramFName + "'");
XxTbxEmployeesSwatiTblVO.setRowMatch(rm);
vo.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
vo.executeQuery();
but the problem is once we have set QueryMode then after no any other search is to be executed on the same viewObject.
please suggest how to retain view object's in memory data.
Thank you.
Swati
Edited by: Swati on Jan 10, 2012 3:31 AM

OAF Advanced table supports In memory sorting from 12.1.2, please verify whether its suits your requirement. You can find additional details in the Advanced Table section of the developers guide.

Similar Messages

  • How can i use AME for the new OAF page.

    Dear all,
    I have developed a new OAF page and registered under Employee Self Service.
    How can i use AME for the approval process.
    Appreciate your ideas?
    zamora

    I will try to answer based on my experience of working with iProcurement and AME. It depends on how you want to make a call to AME , directly from OAF Page or from Workflow and your requirement. You didn't specify what you want to show the users on OAF Page and your business requirement.
    Before calling AME Engine from the OAF page or workflow, I guess you did already setup AME Transaction Type and it's Approval Groups, Conditions, Action Types and Rules. Do some testing from AME Business Analyst Test Workbench. Please note that, AME provides lot of PL/SQL API's that you have to call from your programs (java or workflow pl/sql)
    Let's look at the workflow and putting an OAF Page as notification.
    As Sameer said, you have kick-off workflow process from PR of CO and with in the workflow function, you make a call to AME Engine API's with the AME Transaction ID. This transactionId belongs to the AME Transsaction Type that you setup. Based on the rules setup, AME Engine generates list of approvers/approver and stores them AME Tables for that transactionId. Then, it sends a notification to the approver.
    In the workflow, where that notification is defined, in the message body you have to put an attribute(&XX_WF_FWK_RN) of type document/send. And this attribute will have the constant JSP:/OA_HTML/OA.jsp?OAFunc=XX_FUNC&paramId=-&DOCUMENT_ID-. This function is SSWA Jsp function that makes a web html call to your OAF Region.
    If your requirement is to just show the list of approvers on the OAF Page, you may have to call AME API diectly passing your AME TrasnactionId with other parameters. Then AME generates list of approvers and stores them in AME tables with each approver status. You can pickup those approvers using VO and show them on OAF Page.
    Hope this gives some idea.

  • Creating Tree using programmed ViewObject

    Hi,
    I'm currently trying to create a Tree in a JSF page using a programmatic ViewObject, wich means that I don't have any entity objects, only one ViewObject that is recursive through itself using a ViewLink to connect it.
    Structure:
    ViewObject name: GroupsView
    Atributes:
    -Name: String; PK
    -Owner: String;
    ViewLink name: GroupsLink
    Connects like this:
    -Cardinality: 1 to *
    -Source: GroupsView.Name
    -Destination: GroupsView.Owner
    and then I drag the link to the page and generate a tree from it, using GroupsView(<NameGroupsview>) level rules, but it seem to give me all the levels inside each level to the infinity, so it doesn't seem to verify the content groups inside each other.
    is there any problem with the structure I've used?
    thanks

    Yes thanks, I've already seen that link before and it worked when using an entity based View Object, my problem is when using a programmatic ViewObject, the link doesn't seem to recognize the structure.
    this is what I have in the GroupViewImpl.java:
    protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet rs) {
    // Create and populate a new row
    ViewRowImpl r = createNewRowForCollection(qc);
    int pos = getFetchPos(qc);
    try {
    int a = 0;
    RoleProfile Group = rowData.get(pos).getRoleProfile();
    populateAttributeForRow(r, a++, new Number(pos));
    populateAttributeForRow(r, a++, Group.getName());
    populateAttributeForRow(r, a++, null);
    //populateAttributeForRow(r, 2, Group.getName());
    } catch (IMException e) {
    e.printStackTrace();
    setFetchPos(qc, pos + 1);
    return r;
    and this is my selectionlistener from the Bean class:
    public void groupSelectionListener(SelectionEvent selectionEvent) {
    JSFUtils.invokeMethodExpression("#{bindings.GroupsView1.treeModel.makeCurrent}", Object.class, SelectionEvent.class, selectionEvent);
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("setroleNameVar");
    operationBinding.execute();
    CurrentUser = getSelectedUser();
    CurrentGroup = getSelectedGroup();
    try {
    System.out.println(CurrentGroup.getName());
    } catch (IMException e) {
    but I still get the entire collection repeated inside each item of the tree, I wasn't suposed
    This is irritating me, because I've searched much for this and still nothing
    Thanks again

  • Upload a file to the application top using File Upload feature of OAF

    Hi,
    I am facing some problem when trying to upload a file from my desktop to the application directory (e.g. AR TOP).
    I do not want to use the fnd_lob table,want to load the file to that directory directory, is it possible using OAF file upload?

    Refer the following code
    * Method used to write the contents (data) from an Oracle BLOB column to
    * an O/S file. This method uses one of two ways to get data from the BLOB
    * column - namely using Streams. The other way to read data from an
    * Oracle BLOB column is to use getBytes() method.
    * @throws java.io.IOException
    * @throws java.sql.SQLException
    public void readBLOBToFileStream()
    throws IOException, SQLException {
    FileOutputStream outputFileOutputStream = null;
    InputStream blobInputStream = null;
    String sqlText = null;
    Statement stmt = null;
    ResultSet rset = null;
    BLOB image = null;
    int chunkSize;
    byte[] binaryBuffer;
    int bytesRead = 0;
    int bytesWritten = 0;
    int totBytesRead = 0;
    int totBytesWritten = 0;
    try {
    stmt = conn.createStatement();
    outputBinaryFile2 = new File(outputBinaryFileName2);
    outputFileOutputStream = new FileOutputStream(outputBinaryFile2);
    sqlText =
    "SELECT image " +
    "FROM test_blob " +
    "WHERE id = 2 " ;
    rset = stmt.executeQuery(sqlText);
    rset.next();
    image = ((OracleResultSet) rset).getBLOB("image");
    // Will use a Java InputStream object to read data from a BLOB (can
    // also be used for a CLOB) object. In this example, we will use an
    // InputStream to read data from a BLOB.
    blobInputStream = image.getBinaryStream();
    chunkSize = image.getChunkSize();
    binaryBuffer = new bytechunkSize;
    while ((bytesRead = blobInputStream.read(binaryBuffer)) != -1) {
    // Loop through while reading a chunk of data from the BLOB
    // column using an InputStream. This data will be stored
    // in a temporary buffer that will be written to disk.
    outputFileOutputStream.write(binaryBuffer, 0, bytesRead);
    totBytesRead += bytesRead;
    totBytesWritten += bytesRead;
    outputFileOutputStream.close();
    blobInputStream.close();
    conn.commit();
    rset.close();
    stmt.close();
    System.out.println(
    "==========================================================\n" +
    " INPUT STREAMS METHOD\n" +
    "==========================================================\n" +
    "Wrote BLOB column data to file " + outputBinaryFile2.getName() + ".\n" +
    totBytesRead + " bytes read.\n" +
    totBytesWritten + " bytes written.\n"
    } catch (IOException e) {
    System.out.println("Caught I/O Exception: (Write BLOB value to file - Streams Method).");
    e.printStackTrace();
    throw e;
    } catch (SQLException e) {
    System.out.println("Caught SQL Exception: (Write BLOB value to file - Streams Method).");
    System.out.println("SQL:\n" + sqlText);
    e.printStackTrace();
    throw e;
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Get Total of a Column of Advanced Table and use it in Controller in OAF

    I have an advanced table on my custom page. I am calculating total of a column in my footer. I am acheiving this using the standard functionality of advanced table by setting total value property of my column to "TRUE" and displaying the total in the tablefooter components.
    In addition to this I want to retreive the total value from my footer and use it in my Controller for further validations but I am not able to acheive this.
    I tried some code already present in the Community for the same but nothing turned out right for me.
    Can anyone please help me on this.

       Hi there ,
      You can manually add the values of each row of a  column and make use of the value obtained in your controller .
    Here is the logic ,
    1) get the vo instnace attached to that table .
    2) Loop through every single row in the table .
    3) get the value and sum up the value and use it in your controller .
    int fetchRowCount = vo.getFetchRowCount();  
    voRowImpl row = null;  
    int count =0;
    if (fetchRowCount  > 0) { 
    RowSetIterator iter = vo.createRowSetIterator("Iter"); 
    iter.setRangeStart(0);
      iter.setRangeSize(fetchBidderRowCount);
       for (int i = 0; i < fetchBidderRowCount; i++) {
      row = voRowImpl iter.getRowAtRangeIndex(i);
       //use RowImpl getters   10.   
             Number personId = row.getPersonId();
    count =personId+count;         // add each and every value and have in variable
    iter.closeRowSetIterator();
    Regards ,
    Keerthi

  • Using a viewobject with foreach tag in .jsp

    Hi guys I have the following scenario:
    1- I call a certain .jsp page
    2- a controller class (extends servlet) is called, this class: takes a view object (let's call it view), executes it's query, forwards the result to the jsp page.
    3- jsp page has a foreach tag that iterates over the query result.
    My problem is that foreach tag only takes list or array in its "items" attribute.
    Now is there a way to put the view object result in an array/list? in other words in my servlet what should I put in the request so that the foreach tag can iterate over the rows of the query. Thank you in advance for the reply.

    This code works fine for me:
    <%@ taglib uri="/jstl-c" prefix="c" %>
    <html>
         <body>
         <%
              int array[] = new int[] {1,2};
              session.setAttribute("array", array);
              String arrayNames[] = new String[]{"One", "Two"};
              session.setAttribute("arrayNames", arrayNames);
         %>
              <form action="?">
              <select name="select">
                   <c:forEach items='${ sessionScope.array}' var="row">
                        <c:choose>  
                             <c:when test="${param.select== row}"> >
                                  <option value="<c:out value='${row}'/>" selected><c:out value="${sessionScope.arrayNames[row-1]}"/></option>
                             </c:when>   
                             <c:otherwise>
                                  <option value="<c:out value='${row}'/>"><c:out value="${sessionScope.arrayNames[row-1]}"/></option>
                             </c:otherwise>
                        </c:choose>
                   </c:forEach>
              </select>
              <input type="submit" name="submit" value="submit"></input>
              </form>
         </body>
    </html>
    good luck.
    MatrixPooh
    www.bizdisplay.com

  • ViewObject - How to use setQueryMode

    Hi,
    I'm using a viewObject as a collection model in af:table.
    I would like that on sorting, it will take into account the 'in memory' rows (so it will sort also new rows that were added and weren't commited yet).
    I found some posts about the function setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS).
    But I don't know exactly how to use it.
    I would like that it will happen each time of sorting this view, I was trying to override sortRows function in the viewObjectImpl but it didn't work.
    Is there any place to define it on the viewObject itself (not in view criteria)?
    Or could you help me with specific code of setQueryMode, maybe I didn't use it correctly?
    Thanks a lot

    Hi,
    have you tried overriding executeQueryForCollection ? Have a look at this blog post and its sample code https://blogs.oracle.com/imc/entry/adf_bussiness_components_in_memory (did find it in a quick Google search. Not sure this meets your requirements though)
    Frank

  • How to get values in table using viewobject ?

    hi,iam using jdev 11.1.2.3.0
    my requirement as follows ..
    i have login form with  username and password and i was gave the option of forgot password.when ever the user clicks the forgot password link .i need to get the data from smtp configuration table(consists smtp port,smtp host,usermail,password) based on the usermail i need to get the data from the smtp table .
    when ever the user clicks forgot password it wil send the password to the respected email id given in the smtp tablem how tom achieve this requirement using view object ..............

    Hi,
    1. create VO and define Ciew Criteria to query rows based on a bind variable
    2. Go to Application Module and select VO, then press Edit button to associate View Criteria
    3. Build public method in Application Module Impl class to take user name as an input argument
    4. Expose this method on the AM client interface (also shown on the Java category of the AM editor)
    5. In the method, use this this.findViewObject("instance name"); to get a hold onto the VO
    6. Add the user name to the bind variable using the viewObject.getVariableManager()
    7. Execute VO
    8. get first row
    9. send mail
    10. Drag and drop method from the Data Control panel to your login page
    11. Use EL to reference the username provided by the user (managed bean reference?)
    This should be it
    Frank

  • How to cause POJO data control to use custom base ViewObject class

    ADF 11.1.1.4
    We have a POJO data control that displays data in a table.  We can filter the table using the column filters and this performs in-memory filter.   If an exception occurs I see that it is using a ViewObject for the in-memory filtering because this shows up in the stack trace.
    oracle.jbo.server.ViewObjectImpl.rowQualifies(ViewObjectImpl.java:2811)
    It uses DCDataVO which extends ViewObjectImpl
    We have a Custom base view object defined that all our normal view objects inherit from, defined in Project Properties/BC/Base Classes
    Is there any way to make the DCDataVO also extend from  our Custom View Object that inherits from ViewObject so that we can override methods?  For example if I wanted to customize the rowQualifies method.
    In DCBeanDataControl.Java I see where it actually gets created.
    vo = DCDataVO.createViewObjectFromDef(vdef, this, getApplicationModule());

    So you have already overridden then rowQualifies() method in your custom base View Object ? Are you calling super in that ?
    Cheers
    AJ

  • How to use OAF transform sotred xml documents using XSLT...

    Does anyone have any experience using XSLT in OAF? Specifically, I have xml documents stored in a clob to which I wish to apply an XSLT transformation and then store the transformed documents back into the clob. Is there a way to apply an XSLT transformation using say BI-Publisher via OAF?

    "XML DIFF" are the keywords you can use to search for products that do this. Last time I looked there was a lot of XML Diff implementations, but none of them produced human-readable output that I really liked. I expect that's because XML diff is an easy thing for people to ask for but not an easy thing to do, given the considerable number of ways there are to change a document.

  • How can i display collection of  records in HTML Table using DWR framework

    Dear All,
    Just i start using the Direct Web Remoting framework.I am worrying to get the list of records to display html table using this concept.I did the same like.
    index.js
    var cellFuncs = [
    function(data) { return data; },
    function(data) { return data.toUpperCase(); },
    function(data) { return "<input type='button' value='Test' onclick='alert(\"Hi\");'/>";  },
    function(data) { return count++; }
    function update() {
    var name = dwr.util.getValue("demoName");
    Demo.sayHello(name, function(data) {    dwr.util.setValue("demoReply", data);   } );
    var count = 1;
    dwr.util.addRows( "tabs",[ 'Africa', 'America', 'Asia', 'Australasia', 'Europe' ], cellFuncs);
    alert("hai");
    index.jsp
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <script type='text/javascript' src='dwr/engine.js'> </script>
    <script type='text/javascript' src='dwr/util.js'> </script>
    <script type='text/javascript' src='dwr/interface/Demo.js'> </script>
    <script type="text/javascript" src='index.js'> </script>
    </head>
    <body>
    <div id="tabContents">
    <div id="demoDiv">
    <p>
    Name:
    <input type="text" id="demoName" value="Joe"/>
    <input value="Send" type="button" onclick="update()"/>
    Reply: <span id="demoReply" style="background:#eeffdd; padding-left:4px; padding-right:4px;"></span>
         <table id="tabl1">
         <tbody id="tabs">
         <tr>
         <td>name</td>
         <td>name1</td>
         <td>name2</td>
         <td>name3sdf</td>
         </tr>
         <tbody>
         </table>
    </p>
    </div>
    </div>
    </body>
    </html>
    dwr.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN" "http://getahead.org/dwr/dwr20.dtd">
    <dwr>
    <allow>
    <!-- simpletext -->
    <create creator="new" javascript="Demo">
    <param name="class" value="org.getahead.dwrdemo.simpletext.Demo"/>
    </create>
    </allow>
    </dwr>
    web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app id="dwr">
    <display-name>DWR (Direct Web Remoting)</display-name>
    <description>A Simple Demo DWR</description>
    <servlet>
    <servlet-name>dwr-invoker</servlet-name>
    <display-name>DWR Servlet</display-name>
    <description>Direct Web Remoter Servlet</description>
    <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>activeReverseAjaxEnabled</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>initApplicationScopeCreatorsAtStartup</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>maxWaitAfterWrite</param-name>
    <param-value>500</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>dwr-invoker</servlet-name>
    <url-pattern>/dwr/*</url-pattern>
    </servlet-mapping>
    </web-app>
    Demo.java
    package org.getahead.dwrdemo.simpletext;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import org.directwebremoting.WebContext;
    import org.directwebremoting.WebContextFactory;
    public class Demo
    public String sayHello(String name)
    return "Hello, " + name;
    the sayHello() is printing the display.But the table rows not updating.But its object expected.So can you tell me where i need to change and how to add the pagination for the table like 10 by 10 records to display.
    Please help me.
    Saravanan

    Hi Brian,
    OAF supports the master-detail based design. You can very well implement your model. You can use 2 VO for your 2 objects and link them using a ViewLink. Check OAF Dev guide for more details.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • HOWTO: Use BC4J With or Without DB Triggers

    This HowTo describes how to use BC4J, database sequences and triggers
    and what are the ramifications.
    INTRODUCTION
    BC4J has the ability to work with database sequences in order to obtain a
    unique value when inserting records. BC4J also has the ability to
    work either with a 'before insert' trigger which automatically creates
    a new unique value for the primary key or without a trigger. When not using
    a database trigger, BC4J also has the ability to obtain the sequence value
    and set the primary key value.
    Before discussing the ramifications of using one approach or the other, let's
    show examples of how to use both approaches:
    BC4J & sequences WITH a database trigger
    and
    BC4J & sequences WITHOUT a database trigger
    HOWTO DEMONSTRATION STEPS
    To illustrate both scenarios a simple database setup script is provided which
    creates two tables:
    CUSTOMER_NT which DOES NOT have a before insert trigger and
    CUSTOMER_WT which DOES have a trigger.
    Database Install Script:
    <code>
    drop trigger customer_insert_trigger;
    drop table customer_wt;
    drop table customer_nt;
    drop sequence customer_wt_seq;
    drop sequence customer_nt_seq;
    create sequence customer_wt_seq start with 1;
    create sequence customer_nt_seq start with 101;
    create table customer_wt(
    id number,
    name varchar2(30),
    constraint
    customer_wt_pk
    primary key (id)
    create table customer_nt(
    id number,
    name varchar2(30),
    constraint
    customer_nt_pk
    primary key (id)
    prompt Inserting data...
    insert into customer_wt (id, name)
    values (customer_wt_seq.nextval, 'Mickey');
    insert into customer_wt (id, name)
    values (customer_wt_seq.nextval, 'Goofy');
    insert into customer_nt (id, name)
    values (customer_nt_seq.nextval, 'Daffy');
    insert into customer_nt (id, name)
    values (customer_nt_seq.nextval, 'Porky');
    commit
    prompt Creating trigger
    create trigger customer_insert_trigger
    before insert on customer_wt for each row
    begin
    select customer_wt_seq.nextval into :new.id from dual ;
    end;
    </code>
    The next step is to create the DEFAULT Entity Objects and View Objects using
    the Business Components Wizard.
    USING BC4J WITH A DATABASE TRIGGER
    Let's modify the entity object CustomerWt so it can use the database trigger.
    Edit the entity object CustomerWt by right-clicking in the navigator.
    Click on the 'Attribute Settings' tab and edit the ID attribute.
    - Uncheck 'Mandatory'checkbox. This allows you to insert without a value for the primary key
    - Check 'Refresh after Insert'. This obtains the value from the database generated by the trigger.
    - Check 'Updateable While New'. Id is only updateable when inserting.
    Click finish to complete the wizard. Save all and recompile the project.
    Now let's test our work.
    In the navigator right-click the application module and select 'Test..'. This will launch
    BC4J's built in tester. Connect to the application.
    In the tester double-click the CustomerWtView view object to run a test edit form.
    After the edit form renders, navigate through the existing records using the navigate
    buttons on the edit form. Now let's insert a record to execute the trigger.
    click on the '+' button to insert a record. Enter a value in the 'Name' field and commit the change.
    Observe that a new value has automatically been inserted into the Id field.
    That's it! You have successfully used BC4J and a database trigger.
    Now let's try it without a trigger..
    USING BC4J WITHOUT A DATABASE TRIGGER
    Now edit the entity object CustomerNT so it doesn't need a database trigger.
    Similar to before, edit the entity object CustomerNt by right-clicking in the navigator.
    Click on the 'Attribute Settings' tab and edit the ID attribute.
    - Uncheck 'Mandatory'checkbox.
    - Check 'Updateable While New'.
    An additional step is also required. The Create method will have to be modified to extract
    the value of the sequence.
    In the Edit EntityObject Wizard click the Java tab and select Create method and click Finish.
    The create method is generated in your Java fil e. In the Workspace view of the Navigator,
    expand the CustomerNt entity object in the navigator. Double-click
    CustomerNtImpl.java to open it in the Source Editor. In the Structure pane, double-click
    create(AttributeList). Modify the Create method so it looks like this:
    <code>
    public void create(AttributeList attributeList) {
    super.create(attributeList);
    SequenceImpl s = new SequenceImpl("customer_nt_seq", getDBTransaction());
    Integer next = (Integer)s.getData();
    setId(new Number(next.intValue())); }
    </code>
    Save and compile the project.
    Now test the ViewObject CustomerNtView using the tester as before.
    In the edit form of CustomerNTView click on the '+' to insert a record. Observe that
    just as before a new value has automatically been inserted in the ID field!
    TO USE A DB TRIGGER OR NOT TO USE A DB TRIGGER.
    Using a Database trigger sometimes preferable if you have non BC4J applications
    also sharing the database. In this case it is still safest to just let the database
    update it's own primary keys.
    If you don't have any other non-BC4J applications sharing the database, then not using
    a database trigger is perfectly acceptable and can have slightly better performance.
    The important thing to remember is that the option is yours to use either approach!
    null

    Thank you for the reply Jonathon. I am using a ViewObject which
    consist of several tables. I haven't tried the DB trigger
    approach but just using the BC4 approach in overriding the
    create method.
    Here is the parent class create as a part of the
    FasNameImpl.java file which does the job correctly.
    public void create(AttributeList attributeList) {
    super.create(attributeList);
    SequenceImpl l_seq = new SequenceImpl
    ("SEQ_CUSTOMER_ID",getDBTransaction());
    Integer l_next = (Integer)l_seq.getData();
    setCustomerId(new Number(l_next.intValue()));
    This is when I triedpassing the value to the child table. But I
    can't figure it out. I think the link is working fine if I had a
    ViewLink deployed but it doesn't look like it's doing the job
    for ViewObject.
    I am trying to call the childclass.method
    (FasCustomer.setCustomerId(l_next);
    But I am getting error.
    Thanks a lot for your suggestions,
    Kamran
    703 696 1121

  • Need help in ViewObject Data Validation

    HI Everyone,
    I have few queries about ViewObject. I'm working on JDev11gU2 ADFRC.
    Actually i made an application to upload XLS file to af:table. Everything is working but now I stucked with some functionality. Like -
    1. After inserting all rows in table have opposite sequence as in XLS file, I mean i want to know that is there any way with method VO.readXML() i can
    Insert rows below the previous one. by default it is taking new row as first row in af:table.
    2. Second thing is, I need to show at least 100 lines in af:table by default after uploading data of minimum 3000 lines. So like we had paging functionality in JDev 10g, but in 11g we have scroll and fetch functionality, because of this after loading 100 lines in table my application gets very slow. So any solution to put some same paging functionality like 10g.
    3. Validate all Row attribute in Viewobject, like I have a button say Validate Data, after clicking it all Data of viewobject should validate and if there are any Invalid data. So that Row column should get highlighted. Validation just like before committing data.These are some critical requirement so is there anyone who can guide me properly.
    Thank you,
    Fizzz...

    ok Grant,
    these are all just for explanation only, my exact tables and entity is totally different,
    So just guess i have -
    EmpView(from Employee Entity) - set to show only new inserted rows(Fresh Uncommitted Rows only)
    Attr - EmployeeId (PK)
            EmpName
            DeptId (FK - Department Entity)
            JobId (FK - Job Entity)
            InstId (FK - Institute Entity)
    DeptView(from Departement Entity)
    Attr - DeptId (PK)
            DeptDesc
            InstId (FK - Institute Entity)
    InstView(from Institute Entity) -
    attr - InstId (PK)
            InstDesc
    JobView(from Job Entity) -
    attr - JobId (PK)
            JobDesc
    Now I have one table named *New Employee* on my page to Add more Employees using EmpView ViewObject, For that i have one XLS sheet with all new employee data,
    After Upload XLS File New Employee Table is Like(All Fields are already filled) -
    Line No. EmployeeId           DeptId          InstId       JobId
    1           70021             D10             I01       -->J80
    2           70022          -->D90             I01          J10
    3           70023             D20          -->I20          J20
    4           70024             D30             I03          J10
    5           70025          -->D70          -->I10       -->J50Now what i need is, Suppose
    Invalid Data is (Which Does not exist in their main Table)
    In Line 1 : JobId = J80 (Not exist in Job Entity)
    In Line 2 : DeptId = D90
    In Line 3 : InstId = I20
    In Line 4 : No Error
    In Line 5 : All Three fields have invalid values.
    So now I'm trying to Identify these errors and try to get exact column attribute like above to highlight them in table in red with showing proper formatted msg to user. Like :
    Msg for User :
    These Lines have INVALID DATA :
    Line 1 : JobId,
    Line 2 : DeptId,
    Line 3 : InstId,
    Line 5 : JobId, DeptId and InstId.
    If i do ViewObject Validation then at the time i Uploading process of data from XLS get very slow for large amount of rows like 250<, That's why i was trying to do it after uploading data.
    So after upload i got above table. Now i have a save button where I'm committing data, which calls doDML() method for that Employee entity, where
    suppose process gets error on Line 1 then whole process stops there and throws JboException, and i got Line no 1 for my Msg to show user, but what about other faulty rows,
    For that i catched that exception so after every faulty row process continues, but now the line 4 , which has no error it get committed in DB. I don't want this.
    Another solution i got is use postChange(), but here I'm not getting what I'm doing wrong, problem is it post all previous rows too, suppose i have new 5 lines as shown above but in postChange() method post rest of old lines too. It is making me completely crazy,
    It is very urgent so could not able to find more time to research on this so you please help me, or if you have some examples related to this then please send me the links.
    hope above scenario will help you to understand my problem.
    Thanks
    fizzz...
    Edited by: Fizzz on Jul 8, 2009 1:10 PM

  • How do I implement a Normalized DB in Customer Forms using OA Framework

    Our Customer would like a Form that lists the years left to right(columns) versus in a single column with multiple rows. Looking at how the GL tables are and how OA works it is very easy to do this by creating a table with the following design and mapping the form directly to the table; However, this is poor data modeling for a transactional system. Is there any examples or anyone have experience in decoupling the Form from the data model using 11i.
    We currently achieve this using the following database design.
    CREATE TABLE XXAF.XXAF_GL_JE_LINES
    ID NUMBER,
    LINE_NO NUMBER,
    BATCH_ID NUMBER,
    CODE_COMBINATION_ID NUMBER,
    CONTEXT VARCHAR2(150 BYTE),
    DESCRIPTION VARCHAR2(250 BYTE),
    TYPE VARCHAR2(1 BYTE),
    YEAR_1 NUMBER,
    YEAR_2 NUMBER,
    YEAR_3 NUMBER,
    YEAR_4 NUMBER,
    YEAR_5 NUMBER,
    YEAR_6 NUMBER,
    YEAR_7 NUMBER,
    YEAR_8 NUMBER,
    YEAR_9 NUMBER,
    YEAR_10 NUMBER,
    YEAR_11 NUMBER,
    YEAR_12 NUMBER,
    YEAR_13 NUMBER,
    YEAR_14 NUMBER,
    YEAR_15 NUMBER,
    YEAR_16 NUMBER,
    YEAR_17 NUMBER,
    YEAR_18 NUMBER,
    YEAR_19 NUMBER,
    YEAR_20 NUMBER,
    CURRENCY VARCHAR2(30 BYTE)
    Suggested Design
    Some team members have argued (correctly) that the above is not a perfect database design. The preferred table structure would be something along the lines of:
    CREATE TABLE XXAF.XXAF_GL_JE_LINES
    ID NUMBER,
    LINE_NO NUMBER,
    BATCH_ID NUMBER,
    CODE_COMBINATION_ID NUMBER,
    CONTEXT VARCHAR2(150 BYTE),
    DESCRIPTION VARCHAR2(250 BYTE),
    TYPE VARCHAR2(1 BYTE),
    CURRENCY VARCHAR2(30 BYTE)
    CREATE TABLE XXAF.XXAF_FISCAL_YEAR_VALUES
    ID NUMBER,
    LINE_ID      NUMBER
    YEAR      NUMBER
    VALUE      NUMBER
    In this design, there is a parent-child relationship between the individual line records and the fiscal year records. This is a far more flexible database design. The question is, can this design be used to create the desired OAF screen. This design leads to a vertical OAF table.
    Thanks
    Brian

    Hi Brian,
    OAF supports the master-detail based design. You can very well implement your model. You can use 2 VO for your 2 objects and link them using a ViewLink. Check OAF Dev guide for more details.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Migrate OAF MDS customizations from TEST to PROD from UNIX

    1. Copy the the files of JDEV_USER_HOME/jdevbin to TEST or PROD UNIX mid-tier
    jdevbin/jdev/appslibrt/oamdsdt.jar
    jdevbin/jdev/lib/mdsdt.jar
    jdevbin/mds/lib/mdsrt.jar
    jdevbin/BC4J/lib/collections.jar
    jdevbin/lib/xmlparserv2.jar
    jdevbin/jdev/appslibrt/share.jar
    jdevbin/jdev/appslibrt/uix2.jar
    jdevbin/jdbc/lib/classes12dms.jar
    jdevbin/lib/dms.jar
    jdevbin/jdev/appslibrt/oamdsdt.jar
    2. environment variable for XMLExporter/XMLImporter:
    ($PRO_LIB is the path pointing to the jar files)
    CLASSPATH=\
    $PRO_LIB/jdevbin/jdev/appslibrt/oamdsdt.jar:\
    $PRO_LIB/jdevbin/jdev/lib/mdsdt.jar:\
    $PRO_LIB/jdevbin/mds/lib/mdsrt.jar:\
    $PRO_LIB/jdevbin/BC4J/lib/collections.jar:\
    $PRO_LIB/jdevbin/lib/xmlparserv2.jar:\
    $PRO_LIB/jdevbin/jdev/appslibrt/share.jar:\
    $PRO_LIB/jdevbin/jdev/appslibrt/uix2.jar:\
    $PRO_LIB/jdevbin/jdbc/lib/classes12dms.jar:\
    $PRO_LIB/jdevbin/lib/dms.jar:\
    $PRO_LIB/jdevbin/jdev/appslibrt/oamdsdt.jar
    3. for -mmddir needed in XMLExporter/XMLImporter:
    copy the following files of JDEV_USER_HOME\myhtml\OA_HTML\jrad to TEST or PROD UNIX mid-tier
    JRADElementList.xml
    OAElementList.xml
    UIXElementList.xml
    4. Write a Unix shell script to export from TEST and import to PROD. (You may register it in Oracle apps to let the developers to promote it themselves using the assigned responsibility)
    Notice:
    1. Oracle puts OAF customization together with Oracle seeded customizations. It's impossible to tell them apart just from the OAF MDS document names.
    2. Using responsibility_id in the document name to get the application_id from the apps table, you'll get an different application_id than the application_id in the document name.
    3. The function_id in the document name is not consistent with the function_id in the apps table. The function_id in apps table has null value.

    You may also use a PC to migrate OAF MDS from TEST to PROD. Instead of running an Unix script on the TEST or PROD mid-tier, you may write a batch file and run it on your PC.

Maybe you are looking for