LOV defaults to first row

Hi,
I have an LOV from a VO on my JSF page. When i open the page, the first row from the VO gets defaulted into this field. i do not want this. I want no value to be there aso that user selects the value.
Thanks,
lakshmi.

"Edit the LOV in the VO, goto UI Hints tab, select "Include NO Selection Item - > Blank Item"
This should have worked for you... did u deploy the model lov..
Key attribute is to be set for the lov vo for any validation that has to be done..

Similar Messages

  • Cascading LOV always returns first row in af:query

    HI
    JDEV 11.1.1.3.0
    A strange thing is happening with my cascading LOV which is input text with LOV.
    I have a read only table with a query section. I then also bring up any of the tables rows in a popup with single record view where the row is then in an af:form for inserting and updating.
    Both the af:query and af:form have the cascaing LOV in them.
    When testing the cascading LOV in the BC Browser it works fine. When I use it in the popup in the af:form record it works fine. But in the af:query section, no matter which row I choose in the LOV, it always returns the 1st row of the LOV back to my input text component.
    Has anyone experienced this...any ideas?
    Thanks,
    Mario

    Aha...and the above log message lead me to the solution!! :-)
    The VO is based on an Oracle data dictionary view, DBA_TAB_COLUMNS. When you create the read only VO, by default it does not create any of the attributes as "key" attributes, because the oracle view has no primary key.
    Setting owner, tableName and columnName as key attributes solved this issue, now my cascading LOV works in the BC Tester, af:query component and my af:form component.
    Regards,
    Mario

  • Issue with empty value of LOV of first row after clicking on add row button

    JDeveloper 11.1.14
    I have a page with table-form layout.
    In the form I have two detail tables on the same page (tabbed).
    I have an issue with using model-choicelist LOV's in the detail tables.
    I am able to add a new row in the detail table, select a value from the model-choiceList LOV (which is required) and save the new row.
    After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database,
    I have checked it in the datbase. Only the value of the LOV of the first row on the page is being cleared after clicking on the add row button.
    After saving the new row I get the following error on the screen:
    Error: a selection is required. --> first row
    Does anyone have a suggestion how to solve this issue?

    After adding another row in this table the value of the model-choiceList LOV in the previous row is suddenly empty on the screen. It is not empty in the database, Is the complete LOV blank or only the selected value .. can you try putting autoSubmit=true in the LOV and try ? Also check if you have any partialTriggers on the LOV from the add button ?

  • How to restrict the default selection of first row in ALV  in Webdynpro

    Hi Experts,
    In webdynpro i used ALV to display the bulk amount of datas under a view container. While running it ll cme by default selection on first row. how to restrict that.....

    Hi Vimal,
    Whenever we create nodes then by default the Initialization lead selection property of  node is always checked. That why in the alv by default the first row is selected.
    To restrict this default selection just unchecked the Initialization lead selection property of your node.
    Regard
    Manoj Kumar

  • How to get first row from View Object cache.

    hi,
    I am using Jdeveloper 11.1.1.6
    can we get first row from View Object cache??
    Thanks in Advance.
    Best
    Shashidhar

    Hi Frank,
    Thanks for reply!!
    My case is:
    I have a Query based ViewObject.
    One of the field is LOV and remaining fields are in ADF table. the LOV field is out side ADF table when i insert first record in ADF table and i choose LOV  filed the value is selected.
    when i create second row LOV value got refreshed because both are in same VO.
    I need to get the LOV value of first row and set same value to second Row.
    Shashidhar

  • Default value for first row in table after row has rendered

    I have a master-detail type page where the first row in the detail table appears with no values when the page first renders. After the user enters some data in the master area, the default value is available. I then use something like this to set the default in one column of the first row:
    MyVOImpl vo = (MyVOImpl)am.getMyVO1();
    MyRowImpl voRow = (MyRowImpl)vo.first();
    voRow.setMyAttribute("some value");
    When I do this and run the code in the debugger, I can see that the default value is stored somewhere in the row object. However, the value is not displayed in the screen.
    What must I do to get the default value to display after the user has tabbed out of the master data area, and before the user attempts to enter data in the row?

    Hi. Thanks again.
    Here is more detail of the code:
    if (pageContext.isLovEvent())
    * Form was submitted because the user selected
    * a value from the LOV modal window,
    * or because the user tabbed out of the LOV input.
    * This code executes when the event is either
    * LOV_UPDATE or LOV_VALIDATE
    String lovInputSourceId = pageContext.getParameter(SOURCE_PARAM)
    // Find out the result values of the LOV.
    Hashtable lovResults =
    pageContext.getLovResultsFromSession(lovInputSourceId);
    // Find out which LOV input triggered the event.
    if (lovInputSourceId.equals("myLovItemId"))
    String myDefaultVar = null;
    if (lovResults != null)
    myDefaultVar = "some stuff " + (String)lovResults.get("myResultItemId")
    if (myDefaultVar != null && myDefaultVar != "") // yes, this is always true in this case
    // now set the default for the first line.
    // Added lines will be defaulted by the
    // EO.create() method.
    MyVOImpl myVo = (MyVOImpl)am.getMyVO1();
    MyVORowImpl myVoRow = (MyVORowImpl)myVo.first();
    myVoRow.setAttribute("myRowItemId", myDefaultVar); // THIS LINE DOES NOT CAUSE DISPLAY TO CHANGE
    The problem, as noted in the code, is that setAtrribute() does not cause the default value to display in the field.
    What can cause this, and what can fix it?
    Edited by: user522137 on Nov 9, 2010 12:06 PM

  • How to display first row value returened from a query as checked as default in a report

    How to display first row value returned from a query as checked as default in a report
    Example
    Parameter 1
    Paramerter2
    ABD
    x(checked)
    Test
    DEF
    JMG
    Mudassar

    Hi Mudassar,
    The issue is caused by the order in which the parameters appear in the report data tab can be difference between our report execution and it failing. In other words, “Parameter2” is execution before parameter “A” due to this issue. We can adjust the parameter’s
    order to solve the issue.
    If “Parameter2” is parameter “A”, we cannot use that expression. Because fields cannot be used in report parameter expression, if we want to display the first value returned from a query as default value, we have to fill the “Specify values” text box with
    the specific value in Default Values dialog box.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Default value of radio button on first row in table

    Hi,
    I have created a custom page which includes a table ("SuppliersTable"), the table has a singleSelection table component (radio button) linked to a transient attribute ("SelectFlag") in a VO ("ApSuppliersVO"). The table is populated from a Query region.
    I would like to 'select' the radio button on the first row of the table by default when a query is executed (when a user clicks "Go"), I have tried the following but its not setting the value:
    In CO:
            if (pageContext.getParameter(go) != null) {
                System.out.println("The GO button was pressed");
                am.invokeMethod("handleFirstRows");
            }In AMImpl:
        public void handleFirstRows() {
            System.out.println("1");
            OAViewObject suppliersVO =
                (OAViewObject)findViewObject("ApSuppliersVO");
            if (suppliersVO != null) {
                System.out.println("2");
                int rowcnt = suppliersVO.getRowCount();
                System.out.println("RowCount:" + rowcnt);
                if (suppliersVO.getFetchedRowCount() != 0) {
                    System.out.println("3");
                    //OARow supplierRow = (OARow)suppliersVO.first();
                    Row supplierRow1 = suppliersVO.first();
                    supplierRow1.setAttribute("SelectFlag", "Y");
        }Based on the debug messages I can see that it is calling the procedure, but either not setting the value, or not setting it in a way that renders it on the page and forces the event that goes with it.
    Am I missing something/doing it completely wrong? How can I best achieve this?
    JDEV 10.1.3.3.0
    EBS 12.1.3
    Kind Regards
    Carl

    Hey hi Carl,
    Its pretty much correct , well , can you try the below code .
    OAViewObject localOAViewObject1 = (OAViewObject)am.findViewObject("ProjectDatesVO");
    if(localOAViewObject1!=null) {
    Row DateVoROw = localOAViewObject1.first();
    RowSetIterator iterator = localOAViewObject1.createRowSetIterator("iterator");
    iterator.setRangeStart(0);
    iterator.setRangeSize(localOAViewObject1.getRowCount());
    for(int i=0; i<iterator.getRowCount(); i++)
    DateVoROw=iterator.getRowAtRangeIndex(1); // represents first row
    if(DateVoROw!=null)
    // set the value here .
    Kindly Let me know the update .
    --Keerthi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to render a Custom LOV Pop Up  with its first Row selected

    Hi All,
    I have a requirement in my Custom LOV ,
    I want to render my custom LOV with Query panel and resulset table in such way, where the first row is selected and the users are able to use the KEY Up and Down Arrows and Enter key to select it.
    Currently, the user as to do a single Click atleast one time on a row , so that they can use their KEYs to do the selection.
    How can I achieve the above requirement ? Any thoughts ?
    Thanks
    TK

    Hi,
    The answer to your query is 'Yes'. You need to design a 'UPDATE' metadata type custom integrator. The custom integrator shall use a parameter based view to first download data and then use a PL/SQL wrapper/API to re-upload it back. The brief steps are listed below:
    1. Create a 'UPDATE' metadata type custom integrator. Give a parameter list name, std/custom view for data download and a PL/SQL wrapper.
    2. Create a form function and associate the form function with the custom integrator created.
    3. Add the form function to the std WebADI menu for access.
    4. Define a layout for the custom integrator defined.
    4. To create a parameter use the standard integrator 'HR Standalone Query'. As a part of this integrator you can define the SQL WHERE clause (parameter based) that you will like to use with the custom/std view defined in the custom integrator definition.
    Note: You can use a max of 5 parameters only. For each parameter, one needs to define the datatype and also the HR standalone query has a size limitation of 2000 chars in 11i10. You increase this length you may apply patch - 3494588 to get 4000 chars.
    Hope this information helps.
    Thanks,
    Nitin jain

  • Tabular Form - Setting a default value just on first row.

    Hi all,
    how to set a tabular form default value only in the first row?
    When I click on "add row" I want the new row have a blank value.
    Thanks in advance.

    Hi,
    When you add a new row to the tabular form, any existing rows should be saved to the database. You can, therefore, check for the existence of such records and set the value of a hidden page item accordingly. The default value for a tabular form item can then be based on this hidden item.
    This can be done by setting the Source Used to "Always, ..." on the hidden item called, say, P1_DEPTNO_DEFAULT, and the Source to something like:
    DECLARE
    X NUMBER;
    BEGIN
    SELECT COUNT(*) INTO X FROM EMP WHERE DEPTNO = :P1_DEPTNO;
    IF X > 0 THEN
      RETURN '';
    ELSE
      RETURN :P1_DEPTNO;
    END IF;
    END;This is a "PL/SQL Function Body" Source Type.
    In this example, we are checking if there are any EMP records with a DEPTNO value that matches P1_DEPTNO. If there are, then the tabular form must contain at least one row already, so we return an empty string. If there are no records, the tabular form must be empty, so we return the P1_DEPTNO value.
    The Default settings on the DEPTNO column in the tabular form would then be:
    Default Type: Item (application or page item name)
    Default: P1_DEPTNO_DEFAULT
    Andy

  • First row checked by default

    Hi,
    I am using ADF and JSF .
    For my table , there is a radio button in front of each row.
    Originally, the first row of the table is checked by default. But after clicking the next button, no row is selected.
    How to make the first row always is selected by default ?

    This may or may not work... I've not implemented this myself.
    double click the next button, bind to backing bean.
        if ( !operationBinding.getErrors().isEmpty() )
            return null;
        DCBindingContainer dcbindings = (DCBindingContainer)bindings;
        DCIteratorBinding usersIter = dcbindings.findIteratorBinding( "UsersIterator" );
        usersIter.setCurrentRowWithKey( usersIter.getRowAtRangeIndex( usersIter.getRangeStart() ).getKey() );
        return null;
    }UsersIterator is what your page def calls the Iterator you want.
    Good luck,
    Brian

  • How to select first row of JTable by default

    Hi,
    I have a JTable with 5 rows.
    When the software starts, none of the rows are selected.
    I wish to keep the first row selected by default.
    How do I do it?
    I couldnt find any method like setSelectedRow() !!!
    Does anyone have a sample code plz?
    Thanks.
    Anuj

    couldnt find any method like
    setSelectedRow()You need to use getSelectionModel() first.
    Another way is to use:
    table.changeSelection(0, 0, false, false);

  • Af:inputListOfValues popup : selecting first row

    Hi,
    Is there a way to select first row inside lov popup, the by default behaviour is it selects the rowHeader rather than row itself.
    When the lov popup is opened , there is no focus on table resides in the popup
    - to focus on table, user has to press down arrow key - which will just focus on rowHeader and not the actual row itself
    - to focus row for currently selected rowHeader user has to press right arrow key which will then select the table row itself
    its cumbersome everytime when you open lov and do these extra steps to just to select a value from lov
    any ideas?
    Thanks,
    Dev

    so, why it supports keyboard navigation at all? either support full features or nothing. the fact that user can use up/down arrow keys which selects rowHeader of every row , rather than actual row
    regarding "Search and Select : " it could be anything it has nothing to do with row selection,
    Thanks,

  • [Solved] 27.8.4 How to Create a VO on a REF CURSOR - Missing first row

    Searching the forum I found: BC4J - Get one less row from view object.
    Dive into BC4J related  --REF CURSOR (Resultset)
    The first message did not have any answers, and the second had a follow up question - still no answers though - and I thought I would try a different title.
    (This is off topic, but it would be a great help if the search results also displayed the number of replys in the thread. That way, I wouldn't have to view the messages that don't have responses.)
    (This will be deployed on a server that has the ADF for JDeveloper 10.1.2 installed, so using that version of JDeveloper to develop the app.)
    Okay, back to the problem ==>
    I created a VO from a ref cursor, using the manual as a guide. When I run a page that displays a read only table of the view object, I am missing the first row. (Always the first row!) I don't have any order set, and if I call the ref cursor in a Java program for testing, I see all rows and the count is correct.
    One other point, when I call the page, I get the following validation error:
    Validation Error
    You must correct the following error(s) before proceeding:
    * JBO-29000: Unexpected exception caught: java.lang.ClassCastException, msg=null
    * null
    I still see the table, it is just missing the first row of data.
    In my form I have first, previous set, next set , and last
    navigation buttons. If I press last then first, the error goes away. I still don't see the missing row though.
    Any guidance would be appreciated! I can post my code, but it is pretty much the same code in the AdvancedViewObjectExamples.zip in the ViewObjectOnRefCursor example. I just substituted my two package calls (getRefCursor and getRefCursorCount).
    Thanks, Ken

    Went back to a backup copy of the source. Fixed the error. Now I'm back to just not being able to see the first row of data.
    Additional Note: I had removed fields in the display. Once I truncated the ps_txn table in the schema defined by the model, the data would display (Still without the first record.)
    Are there any examples that are more in depth than the few pages in the developer guide?
    Here is the code for my VOImpl class:
    package newslinearchive.model.datamodel;
    import java.math.BigDecimal;
    import java.sql.CallableStatement;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Timestamp;
    import java.sql.Types;
    import oracle.jbo.InvalidParamException;
    import oracle.jbo.JboException;
    import oracle.jbo.domain.Date;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.DBTransaction;
    import oracle.jbo.server.QueryCollection;
    import oracle.jbo.server.SQLBuilder;
    import oracle.jbo.server.ViewObjectImpl;
    import oracle.jbo.server.ViewRowImpl;
    import oracle.jbo.server.ViewRowSetImpl;
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OracleTypes;
    // --- File generated by Oracle ADF Business Components Design Time.
    // --- Custom code may be added to this class.
    // --- Warning: Do not modify method signatures of generated methods.
    public class SearchRefCursorImpl extends ViewObjectImpl {
    * This is the default constructor (do not remove)
    public SearchRefCursorImpl() {
    * Overridden framework method.
    * Executed when the framework needs to issue the database query for
    * the query collection based on this view object. One view object
    * can produce many related result sets, each potentially the result
    * of different bind variable values. If the rowset in query is involved
    * in a framework-coordinated master/detail viewlink, then the params array
    * will contain one or more framework-supplied bind parameters. If there
    * are any user-supplied bind parameter values, they will PRECEED the
    * framework-supplied bind variable values in the params array, and the
    * number of user parameters will be indicated by the value of the
    * numUserParams argument.
    protected void executeQueryForCollection(Object qc,Object[] params,int numUserParams) {
    storeNewResultSet(qc,retrieveRefCursor(qc,params));
    super.executeQueryForCollection(qc, params, numUserParams);
    * Overridden framework method.
    * Wipe out all traces of a built-in query for this VO
    protected void create() {
    getViewDef().setQuery(null);
    getViewDef().setSelectClause(null);
    setQuery(null);
    * Overridden framework method.
    * The role of this method is to "fetch", populate, and return a single row
    * from the datasource by calling createNewRowForCollection() and populating
    * its attributes using populateAttributeForRow().
    protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet rs) {
    * We ignore the JDBC ResultSet passed by the framework (null anyway) and
    * use the resultset that we've stored in the query-collection-private
    * user data storage
    rs = getResultSet(qc);
    * Create a new row to populate
    ViewRowImpl r = createNewRowForCollection(qc);
    try {
    * Populate new row by attribute slot number for current row in Result Set
    // populateAttributeForRow(r,0, rs.getLong(1));
    // populateAttributeForRow(r,1, rs.getString(2));
    // populateAttributeForRow(r,2, rs.getString(3));
    // MASTERID NOT NULL NUMBER
    populateAttributeForRow(r,0, rs.getBigDecimal(1));
    //ID NOT NULL NUMBER
    populateAttributeForRow(r,1, rs.getBigDecimal(2));
    // CAID NOT NULL NUMBER
    populateAttributeForRow(r,2, rs.getBigDecimal(3));
    // LANGUAGE NOT NULL VARCHAR2(30)
    populateAttributeForRow(r,3, rs.getString(4));
    // IS_CURRENT_VERSION NOT NULL NUMBER(1)
    populateAttributeForRow(r,4, rs.getBigDecimal(5));
    // FOLDER_ID NOT NULL NUMBER
    populateAttributeForRow(r,5, rs.getBigDecimal(6));
    // FOLDER_REGION_ID NOT NULL NUMBER
    populateAttributeForRow(r,6, rs.getBigDecimal(7));
    // NAME NOT NULL VARCHAR2(256)
    populateAttributeForRow(r,7, rs.getString(8));
    // DISPLAY_NAME VARCHAR2(256)
    populateAttributeForRow(r,8, rs.getString(9));
    // ITEMTYPE NOT NULL VARCHAR2(30)
    populateAttributeForRow(r,9, rs.getString(10));
    // SUBTYPE VARCHAR2(40)
    populateAttributeForRow(r,10, rs.getString(11));
    // SUBTYPE_CAID NUMBER
    populateAttributeForRow(r,11, rs.getBigDecimal(12));
    // PARENT_ITEM_ID NUMBER
    populateAttributeForRow(r,12, rs.getBigDecimal(13));
    // CATEGORY_ID NUMBER
    populateAttributeForRow(r,13, rs.getBigDecimal(14));
    // CATEGORY_CAID NUMBER
    populateAttributeForRow(r,14, rs.getBigDecimal(15));
    // AUTHOR VARCHAR2(50)
    populateAttributeForRow(r,15, rs.getString(16));
    // DESCRIPTION VARCHAR2(2000)
    populateAttributeForRow(r,16, rs.getString(17));
    // PUBLISH_DATE NOT NULL DATE
    populateAttributeForRow(r,17, rs.getDate(18));
    // EXPIREMODE VARCHAR2(90)
    populateAttributeForRow(r,18, rs.getString(19));
    // EXPIRENUMBER NUMBER
    populateAttributeForRow(r,19, rs.getBigDecimal(20));
    // EXPIREDATE DATE
    populateAttributeForRow(r,20, rs.getDate(21));
    // IMAGE VARCHAR2(350)
    populateAttributeForRow(r,21, rs.getString(22));
    // KEYWORDS VARCHAR2(2000)
    populateAttributeForRow(r,22, rs.getString(23));
    // URL VARCHAR2(4000)
    populateAttributeForRow(r,23, rs.getString(24));
    // FILENAME VARCHAR2(350)
    populateAttributeForRow(r,24, rs.getString(25));
    // TEXT CLOB()
    populateAttributeForRow(r,25, rs.getClob(26));
    // FOLDER_LINK_ID NUMBER
    populateAttributeForRow(r,26, rs.getBigDecimal(27));
    // FOLDER_LINK_CAID NUMBER
    populateAttributeForRow(r,27, rs.getBigDecimal(28));
    // ACTIVE NOT NULL NUMBER(1)
    populateAttributeForRow(r,28, rs.getBigDecimal(29));
    // CAN_BE_CHECKEDOUT NUMBER(1)
    populateAttributeForRow(r,29, rs.getBigDecimal(30));
    // IS_ITEM_CHECKEDOUT NUMBER(1)
    populateAttributeForRow(r,30, rs.getBigDecimal(31));
    // CHECKER_USERNAME VARCHAR2(256)
    populateAttributeForRow(r,31, rs.getString(32));
    // CHECKOUT_DATE DATE
    populateAttributeForRow(r,32, rs.getDate(33));
    // FULLSCREEN NOT NULL NUMBER(1)
    populateAttributeForRow(r,33, rs.getBigDecimal(34));
    // INPLACE NOT NULL NUMBER(1)
    populateAttributeForRow(r,34, rs.getBigDecimal(35));
    // CREATEDATE NOT NULL DATE
    populateAttributeForRow(r,35, rs.getDate(36));
    // CREATOR NOT NULL VARCHAR2(256)
    populateAttributeForRow(r,36, rs.getString(37));
    // UPDATEDATE DATE
    populateAttributeForRow(r,37, rs.getDate(38));
    // UPDATOR VARCHAR2(256)
    populateAttributeForRow(r,38, rs.getString(39));
    // SECURITY VARCHAR2(25)
    populateAttributeForRow(r,39, rs.getString(40));
    // VISIBLE NOT NULL NUMBER(1)
    populateAttributeForRow(r,40, rs.getBigDecimal(41));
    // SEQUENCE NOT NULL NUMBER
    populateAttributeForRow(r,41, rs.getBigDecimal(42));
    // CATEGORY_SEQUENCE NOT NULL NUMBER
    populateAttributeForRow(r,42, rs.getBigDecimal(43));
    // AUTHOR_SEQUENCE NOT NULL NUMBER
    populateAttributeForRow(r,43, rs.getBigDecimal(44));
    // CREATE_DATE_SEQUENCE NOT NULL NUMBER
    populateAttributeForRow(r,44, rs.getBigDecimal(45));
    // ITEMTYPE_SEQUENCE NOT NULL NUMBER
    populateAttributeForRow(r,45, rs.getBigDecimal(46));
    catch (SQLException s) {
    throw new JboException(s);
    return r;
    * Overridden framework method.
    * Return true if the datasource has at least one more record to fetch.
    protected boolean hasNextForCollection(Object qc) {
    ResultSet rs = getResultSet(qc);
    boolean nextOne = false;
    try {
    nextOne = rs.next();
    * When were at the end of the result set, mark the query collection
    * as "FetchComplete".
    if (!nextOne) {
    setFetchCompleteForCollection(qc, true);
    * Close the result set, we're done with it
    rs.close();
    catch (SQLException s) {
    throw new JboException(s);
    return nextOne;
    * Overridden framework method.
    * The framework gives us a chance to clean up any resources related
    * to the datasource when a query collection is done being used.
    protected void releaseUserDataForCollection(Object qc, Object rs) {
    * Ignore the ResultSet passed in since we've created our own.
    * Fetch the ResultSet from the User-Data context instead
    ResultSet userDataRS = getResultSet(qc);
    if (userDataRS != null) {
    try {
    userDataRS.close();
    catch (SQLException s) {
    /* Ignore */
    super.releaseUserDataForCollection(qc, rs);
    * Overridden framework method
    * Return the number of rows that would be returned by executing
    * the query implied by the datasource. This gives the developer a
    * chance to perform a fast count of the rows that would be retrieved
    * if all rows were fetched from the database. In the default implementation
    * the framework will perform a SELECT COUNT(*) FROM (...) wrapper query
    * to let the database return the count. This count might only be an estimate
    * depending on how resource-intensive it would be to actually count the rows.
    public long getQueryHitCount(ViewRowSetImpl viewRowSet) {
    Long result = (Long)callStoredFunction(NUMBER,
    "PORTAL.SEARCH_REFCURSOR.getRefCursorCount",
    viewRowSet.getParameters(true));
    return result.longValue();
    // ------------- PRIVATE METHODS ----------------
    * Return a JDBC ResultSet representing the REF CURSOR return
    * value from our stored package function.
    * new Object[]{getNamedBindParamValue("Email",params)}
    private ResultSet retrieveRefCursor(Object qc, Object[] params) {
    ResultSet rs = (ResultSet)callStoredFunction(OracleTypes.CURSOR,
    "PORTAL.SEARCH_REFCURSOR.getRefCursor",
    null);
    return rs ;
    private Object getNamedBindParamValue(String varName, Object[] params) {
    Object result = null;
    if (getBindingStyle() == SQLBuilder.BINDING_STYLE_ORACLE_NAME) {
    if (params != null) {
    for (Object param : params) {
    Object[] nameValue = (Object[])param;
    String name = (String)nameValue[0];
    if (name.equals(varName)) {
    return (String)nameValue[1];
    throw new JboException("No bind variable named '"+varName+"'");
    * Store a new result set in the query-collection-private user-data context
    private void storeNewResultSet(Object qc, ResultSet rs) {
    ResultSet existingRs = getResultSet(qc);
    // If this query collection is getting reused, close out any previous rowset
    if (existingRs != null) {
    try {existingRs.close();} catch (SQLException s) {}
    setUserDataForCollection(qc,rs);
    hasNextForCollection(qc); // Prime the pump with the first row.
    * Retrieve the result set wrapper from the query-collection user-data
    private ResultSet getResultSet(Object qc) {
    return (ResultSet)getUserDataForCollection(qc);
    * Return either null or a new oracle.jbo.domain.Date
    private static Date nullOrNewDate(Timestamp t) {
    return t != null ? new Date(t) : null;
    * Return either null or a new oracle.jbo.domain.Number
    private static Number nullOrNewNumber(BigDecimal b) {
    try {
    return b != null ? new Number(b) : null;
    catch (SQLException s) { }
    return null;
    //----------------[ Begin Helper Code ]------------------------------
    public static int NUMBER = Types.NUMERIC;
    public static int DATE = Types.DATE;
    public static int VARCHAR2 = Types.VARCHAR;
    public static int CLOB = Types.CLOB;
    * Simplifies calling a stored function with bind variables
    * You can use the NUMBER, DATE, and VARCHAR2 constants in this
    * class to indicate the function return type for these three common types,
    * otherwise use one of the JDBC types in the java.sql.Types class.
    * NOTE: If you want to invoke a stored procedure without any bind variables
    * ==== then you can just use the basic getDBTransaction().executeCommand()
    * @param sqlReturnType JDBC datatype constant of function return value
    * @param stmt stored function statement
    * @param bindVars Object array of parameters
    * @return function return value as an Object
    protected Object callStoredFunction(int sqlReturnType, String stmt,
    Object[] bindVars) {
    CallableStatement st = null;
    try {
    st = getDBTransaction().createCallableStatement("begin ? := " + stmt +
    "; end;", 0);
    st.registerOutParameter(1, sqlReturnType);
    if (bindVars != null) {
    for (int z = 0; z < bindVars.length; z++) {
    st.setObject(z + 2, bindVars[z]);
    st.executeUpdate();
    return st.getObject(1);
    catch (SQLException e) {
    throw new JboException(e);
    finally {
    if (st != null) {
    try {
    st.close();
    catch (SQLException e) {}
    /**Gets the bind variable value for Email
    public String getEmail() {
    return (String)getNamedWhereClauseParam("Email");
    /**Sets <code>value</code> for bind variable Email
    public void setEmail(String value) {
    setNamedWhereClauseParam("Email", value);
    /**getEstimatedRowCount - overridden for custom java data source support.
    public long getEstimatedRowCount() {
    long value = super.getEstimatedRowCount();
    return value;
    Thanks, Ken

  • FCC..how to remove first row

    Hello experts,
    I have configured a end to end sccenario fo csv files, Im using fcc for the sender file adapter
    The first row has all the field names such as name,number and the rest of the rows have the values.
    when I run the scenario the xml being formed has the field names and the vales..
    example
    <name>name</name>
    <number>number</number>
    <name>Teja</name>
    <number>10</number>
    what i want in the xml is just
    <name>Teja</name>
    <number>10</number>
    could any one pls help me out on this?
    I have used fieldNames,fielsSeparaor and ignorerecorstSetName as the content conversion parameters..
    do i have to add any more?
    Regards,
    Teja

    Hi,
    You should achieve this by using Document Offset parameter on the Sender side.  Set Document Offset to 1 in order  to ignore the first line.
    "●      Under Document Offset, specify the number of lines that are to be ignored at the beginning of the document.
    This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines."
    http://help.sap.com/saphelp_nw70/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
    Thanks,
    Pooja

Maybe you are looking for