Updating a Multi Entity view object to add row only to child entity

I have a View object VO1 made of multiple entities e.g. EO1 and EO2 which have a composition association with cardinality 1 is to many EO1 being the entity corresponding to parent table and EO2 is the child table. All the entities in the association are updatable.
The data is displayed using VO1 on the page. So for each row in child table, parent table attributes are dispalyed correctly due to the join condition.
If I create a new record on the VO1 iterator using the create operation binding and save it, it correctly saves a new record in header table and related child table.
Now I need to provide with one more create operation on the page such that when user can add a child row for the existing header row using the same screen.
Essentially I need a create operation which, on selecting a row from the displayed table which is based on VO1 , creates a new row in the VO1 iterator such that the EO1 attributes are pre filled with the header table information from the selected row and the child attributes can be added by the user and submitted.
Tried Using create with params on VO1 by passing the header information, this lets me enter the data on screen just the way its required ,but this obviously only tries to add a new record to header table with the existing primary key itself and the operation fails on save giving duplicate key error for the header table.
Unable to figure out where to change the default behavior to fetch a exisitng entity rather than create a new entity in the header table entity object for this multiple entity VO1.

Hi ,
So how do i send in the sample. Do i send in the code base don HR schema ..
Or just explain the above with emp dept tables.

Similar Messages

  • Changing the Updatable property of a View Object Attribute through code

    Hi,
    Is there a way to set the "Updatable" property of an attribute in a view object through code ?
    I checked the API docs for the AttributeDef class but there is no method to set this. there is a constant (UPDATEABLE_WHILE_NEW) which gives the current value.
    My requirements in short - I have a ADF editable Table. Based on a flag whether it is SET or NOT, i need to make a particular column such that the inputTextBox on this column must appear for only the new rows inserted into the table. For all the existing rows users should not be allowed to edit values on this column.
    I know this can be controlled with the UPDATABLE property on the attribute in the view object by setting the value as "WHILE  NEW".
    Now i need to control this through code at runtime.
    Please let me know on ow to do this.
    JDev version: 11.1.2.3
    Thanks.

    the method you are looking for is available in the AttributeDefImpl class which you can get from the EntityImpl like
    this.mDefinitionObject.getAttributeDefImpl("YOUR_ATTRIBUTE_NAME").setUpdateableFlag(AttributeDef.UPDATEABLE_WHILE_NEW);
    Timo

  • Querying a View Object after a Row has been inserted

    Hi All,
    I have a query as to whether something can be done or if I should be approaching my problem in a slightly different way.
    First an explanation of what I am trying to achieve:
    I have a header record that deals with a new user request. From one of the pages within the train one or more of several different ‘applications’ can be selected. When an ‘application’ is selected I am navigating to a new page, it queries the linesVO to see if any lines exist for that ‘application’, where they don’t it adds lines to the VO each representing ‘questions’ specific to that ‘application’. This works fine, however if I then come out of that page back into the train and then back into the same page specific for the same ‘application’ the initQuery is run and the lines I have just created are not found, it then tries to reinsert the question lines but will error as primary key validation fails. I do not want to commit after coming back from the lines page as the user has not specified a save, adding a save to the lines page would also cause the header to commit.
    Now the Question:
    Is there a way of ensuring that I can run my created method ‘initQuery’ which sets a where clause and calls ‘executeQuery’ will bring back lines that I have created in the VO and are held in cache? They must be held in cache else I would not be getting the error ‘Too many objects match the primary key’
    Any guidance on this matter would be most appreciated,
    Thanks
    Mike

    Unfortunately I do need to query the view again, each time the user clicks on a different ‘application’ in the train it will need to show only the lines in the view relating to that application. It is a bit like a master-detail except I want to show the detail lines on a separate page.
    I could have made each page separately but I am trying to make it dynamic so if a new application is added in the future I only have to add the details to the database tables.
    Thanks, Mike

  • Issue with execution of MessageChoicebean View Object at every row of table

    I have a table with 2 columns.
    First column is showing datatype.
    Second column is MesssageChoiceBean which is showing values from the VO.
    This choiceBean VO , i am executing based on the first column data type.
    Here the issue is,
    The data type at the last row of the table is executing the corresponsing choice bean VO and that is replacing all the above rows choice bean values.
    Please help me in this.

    1. When i run the model layer, open the operations of the "SecondEmpDetailsView" and perform filter, it is getting applied to "FirstEmpDetailsView" instead of "SecondEmpDetailsView"VO instances are defined in your AM (AM act as service facade for you). If you want to manipulate a specific VO instance, please move this logic to AM, get hold of specific VO instance and apply the criteria.

  • To find out the last row that is updated in a View Object

    Hi OAF Gurus,
    I have requirement like,
    I have to find out the last row that is updated on a particular View Object and I have send a mail to the users about the change.
    JegSAMassMobVOImpl vo = getJegSAMassMobVO1();
    JegSAMassMobVO is the View Object Name and it displays certain rows that has already been added to the VO in the Page.
    Now the issue is when a user updates a particular row,I have to find which row gets updated and have to send a email to that particular employee about the change.
    Just want to know,how to find out the last updated row in a particular VO.
    Any Help would be appreciated as this a immediate requirement.
    Regards,
    Magesh.M.K.
    Edited by: user1393742 on May 4, 2011 1:06 AM

    Hi Magesh
    It shoud be a Advanced table ,so when user will update the row ,the specific row will fire the PPR and on that event u can capture the row using row reference ,this is the sample code below
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean); OAApplicationModule am =
    (OAApplicationModule)pageContext.getApplicationModule(webBean);
    String event = pageContext.getParameter("event");
    if ("<ItemPPREventName>").equals(event))
    // Get the identifier of the PPR event source row
    String rowReference =
    pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    Serializable[] parameters = { rowReference };
    // Pass the rowReference to a "handler" method in the application module.
    262
    am.invokeMethod("<handleSomeEvent>", parameters);
    In your application module's "handler" method, add the following code to access the source row:
    OARow row = (OARow)findRowByRef(rowReference);
    if (row != null)
    Thanks
    Pratap

  • How do I query changed view object attribute in another view object

    Jdeveloper 10.1.3.4
    My requirement is that I want to be able to query a view object (based on entity) on a non-key attribute where the value I am searching on may either be in the database on an existing record or, have just been recorded by updating a different view object based on the same entity (and yet to be committed).
    When querying the second view object for a value just updated via a different view object, the second view object always returns no rows. I had expected the process to be :
    EntityA
    ViewObjectA based on EntityA
    ViewObjectB based on EntityA
    ViewObjectA - query row with key = 123. update attribute Y with value 456 (attribute Y in database null). Entity cache for EntityA, key 123, atttribute Y updated with value 456
    ViewObjectB - query row with attribute = Y. expect record in EntityA cache just updated to be returned. Instead, nothing is returned
    Here is the code I was using (where RandScheduleEdit and RandScheduleSearch are identical view objects based on entity object RandSchedule)
      public static void main(String[] args) {
        String        amDef = "test.cache.model.AppModule";
        String        config = "AppModuleLocal";
        ApplicationModule am = Configuration.createRootApplicationModule(amDef,config);
        ViewObject rsEdit = am.findViewObject("RandScheduleEdit");
        Key rsKey = new Key(new Object[]{40});
        Row[] rsEditRows = rsEdit.findByKey(rsKey,1);
        Row rsEditRow = rsEditRows[0];   
        rsEditRow.setAttribute("SId", new Number(7827));
        ViewObject rsSearch = am.findViewObject("RandScheduleSearch");
        rsSearch.setWhereClause("S_ID = :SId");
        rsSearch.defineNamedWhereClauseParam("SId", null, null);
        rsSearch.setNamedWhereClauseParam("SId",new Number(7827));
        rsSearch.executeQuery();
        Row rsSearchRow = rsSearch.first();
        Configuration.releaseRootApplicationModule(am, true);
      }Why does rsSearch not find the record S_ID = 7827 ? It seems to only be querying new records in the database and ignoring the cached record just updated ?
    Any help greatly appreciated.
    Cheers,
    Brent

    rsSearch.setNamedWhereClauseParam("SId",new Number(7827));This might help:
    rsSearch.setQueryMode(ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
    rsSearch.executeQuery();

  • Own View Object Rows filtering

    Hello,
    I've created a method which is filtering View Object for specific rows faster than getFilteredRows(). It is done by dynamic setting "where clause" and then removing it. Full method looks like that:
    public static Row[] filterRows(ViewObjectImpl vo, Map<String, Object> columns) {
            ArrayList<String> stringArray = new ArrayList<String>();
            for(String s : columns.keySet()) {
                stringArray.add(s + " = :" + s);
                vo.defineNamedWhereClauseParam(s, null, null);
                vo.setNamedWhereClauseParam(s, columns.get(s));
            String[] strArray = new String[stringArray.size()];
            String whereClause = StringUtils.join(stringArray.toArray(strArray), " AND ");
            vo.setWhereClause(whereClause);
            vo.executeQuery();
            RowSetIterator it = vo.createRowSetIterator(null);
            ArrayList<Row> rows = new ArrayList<Row>();
            while(it.hasNext()) {
                rows.add(it.next());
            for(String s : columns.keySet()) {
                vo.removeNamedWhereClauseParam(s);
            vo.getDefaultRowSet().setExecuteParameters(null, null, true);
            vo.setWhereClause(null);
            vo.getDefaultRowSet().setWhereClauseParams(null);
            vo.executeQuery();
            Row[] rowsArray = new Row[rows.size()];
            return rows.toArray(rowsArray);
        }Now, when i try something like this:
    MyViewObjectImpl searchVo = getContractAppMod().getMyViewObject1();
    Row[] rows = ContractUtils.filterRows(searchVo, "umwa_id", new Number(4));
    MyViewObjectRowImpl searchRow = (MyViewObjectRowImpl) rows[0];
    System.out.println(searchRow.getUmwaId());Everything seems to be OK, the values are correct, but when i try this:
    searchRow.setFirstName("Name");Value in adf table is not updating immediately like it is when i use searchVo.getFilteredRows("UmwaId", new Number(4)); instead of my filterRows method. Why is that happening and how to fix it?
    Thanks.
    Edited by: 983864 on 2013-02-23 04:40

    Definition of static filterRows() method is inside normal class named ContractUtils. Then i'm calling this method in bean class ContractBean. This bean is also declared in task flow. I don't know exactly how to rewrite my code for access the method through the ADF binding layer. Can you give me more specific clues? Thanks for all.

  • How To change the ADF View Object  query where-clause at RunTime?

    I am trying to create a simple display page which will display user data (username, assoc_dist_id, assoc_agent_id, status , etc). The User data is stored in a database table and i am using an ADF Read Only table based on the View Object to display the data on the JSF page.
    However, i want to display only the users that a particular person accessing the page has the AUTH LEVEL to see. e.g. If the person accessing the page is an 'ApplicationAdministrator' then the page should display all users in the table, If its a 'DistributorAdministrator' then the page should display only users associated with that Distributor (i.e. assoc_dist_id = :p_Dist_id ) and If its an 'AgentAdministrator' , then the page should display only users associated with that Agent ( i.e. assoc_agent_id = :p_Agent_id).
    Currently my af:table component displays all the users in the table because the query for the view object is (select * from users) . However, i want to use the same viewobject and just set the where-clause at runtime with the appropriate parameter to restrict the dataset returned.
    Do anyone knows how to accomplish this ?

    David,
    See the custom method initializeDynamicVariableDefaults() in the SRViewObjectImpl.java class in the FrameworkExtentions project in the SRDemoSampleADFBC sample application. You can find out how to install the demo if you haven't already from the ADF Learning Center at:
    http://www.oracle.com/technology/products/adf/learnadf.html
    This class is a framework extension class for view objects that adds a neat, generic feature to be able to dynamic default the value of named bind variables. You can read more about what framework extension classes are and how to use them in Chapter 25, "Advanced Business Components Techniques" of the ADF Developer's Guide for Forms/4GL Developers, also available at the learning center above.
    It is an example of generic framework functionality that "kicks in" based on the presence of custom metadata properties on a named bind variable. See section 25.3.3 "Implementing Generic Functionality Driven by Custom Properties" in the dev guide for more details. Using this sample code, if you add a bind variable to a view object, and define a custom metadata property named "DynamicDefaultValue" on that bind variable, and set this custom metadata property to the value "CurrentUser", then that bind variable will have its value dynamically defaulted to the name of the authenticated user logged in. If instead you set this custom property to the value "UserRole", then the bind variable will be set to the comma-separated string containing the list of roles that the authenticated user is part of.
    Once you've created a framework extension class for view objects like this, you can have the view objects you create inherit this generic functionality.See section 25.1.4 "How to Base an ADF Component on a Framework Extension Class" in the dev guide for more info on this.
    By adapting a technique like this (or some idea similar that better suits your needs) you can have your view object query contain bind variables whose values automatically take on the defaults based on something in the user-session environment.

  • Add row in Smart View

    Hello,
    I've created a form in Planning and have allowed users to dynamically add rows. This works fine while I'm in Workspace but if I open the form in Smart View, I cannot add rows. How can I add rows while in Smart View??
    Thanks!
    Edited by: user10701291 on Apr 10, 2009 12:15 PM

    Hi,
    have a look at polymorphic view objects
    http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcadvvo.htm#CEGDCCCB
    Frank

  • Operation hasNext is invalid for a working set view object

    Can someone point me to soem documentation to why I'm getting this error? I'm obviously misunderstanding something fundamental.
    Thanks

    I have an application module with a client method as follows:
    public void setUserCredentials(String username, String password)
    UserAccountViewImpl vo = getUserAccountView1();
    vo.setWhereClauseParam(0, username);
    vo.setWhereClauseParam(1, password);
    vo.executeQuery();
    if (vo.hasNext()) (BREAK POINT TWO)
    vo.next();
    I have a struts action that is based on the BasicADFAction class in the tech paper "Oracle ADF Data Binding Primer and ADF/Struts Overview"
    by Steve Muench.
    public class IsLoginValidAction extends BasicADFAction
    protected ActionForward performActionLogic(ActionMapping mapping,
    ActionForm form, HttpServletRequest request, HttpServletResponse response)
    throws Exception
    .... other code that gets username and password from form
    DatamartModule am = (DatamartModule)getApplicationModule("DatamartModuleDataControl", request);
    am.setUserCredentials(username, password);
    ViewObject vo = am.findViewObject("UserAccountView1");
    if (vo.getCurrentRow() == null) -- BREAK POINT ONE
    ae.add("InvalidDetails", new ActionError("error.IsLoginValidAction.InvalidDetails"));
    return mapping.findForward("LoginError");
    UserAccountViewRowClient vr = (UserAccountViewRowClient)vo.getCurrentRow();
    .... do some other checks with the user account
    As you can see the above Action calls setUserCredentials(). What is driving me mad is the following. If I enter a valid username and password in the login page and reach break point one the method vo.getCurrentRow() returns null which is not what I expect!
    If I re-submit my login details again, when I reach break point one for the second time vo.getCurrentRow() is not null??
    I have also set a break point two just to make sure setUserCredentials is working and it always brings back a row when I enter the correct details. So why in the action when I select the same view object the current row is not available to me but is available the second time round?? I'm I missing something fundamental??
    I had some feedback on metalink where oracle support set check that the vo.isExecuted() == true and if it isn't then re-execute the query. I couldn't see why I should do this but I did. I found that vo.isExecuted is false the first time round but true the second time. It appears the first time round I am implicitly getting the query to execute for the first time even though I believe I have already done this in the setUserCredentials method.
    After adding a vo.executeQuery() I obviously needed to add code that obtained the row. As soon as vo.hasNext() is called I get:
    oracle.jbo.InvalidOperException: JBO-25048: Operation hasNext is invalid for a working set view object.
         at oracle.jbo.common.ws.WSObject.invalidOperation(WSObject.java:44)
         at oracle.jbo.common.ws.WSRowSetIteratorBase.hasNext(WSRowSetIteratorBase.java:381)
         at view.IsLoginValidAction.performActionLogic(IsLoginValidAction.java:66)
         at view.BasicADFAction.handleLifecycle(BasicADFAction.java:64)
         at view.BasicADFAction.execute(BasicADFAction.java:46)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:228)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    I must misunderstand something fundamental. Any help would be really appreciated. Basically in my client code (The struts action) I want to access a single record that is based on a view. I prepare the view object by calling a custom service level method to set the username and password and execute the query.

  • Error while writing data to View Object programmetically

    Hi,
    I want to create a poplist with dynamic values.
    For the same,
    I have created a View Object(CustomVO) using the VO wizard.The view object does not have a datasource.I have added 2 transient attributes(TubeCode and TubeName).The viewobject is attached to a poplist.
    The custom method written in the AM is as follows.
    OAViewObjectImpl vo = this.getCustomVO1();
    Row row = vo.createRow();
    row.setAttribute("TubeCode","SS");
    row.setAttribute("TubeName","Stainless Steel");
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    I have attached the AM to the PageLayoutRN and display/value attributes to the poplist and the AM custom method is invoked in the controller.(Process Request)
    When I run the page I get the following error and poplist does not contain the values.Please help me to sort it out
    oracle.jbo.ReadOnlyViewObjectException: JBO-25016: View object CustomVO1 is read only.
    thanks,
    Gowtam

    Hi,
    I set the Updateable property of view attributes to "Always".
    It was set to "Never" by default.
    The poplist is populated successfully.
    thanks,
    Gowtam.

  • 10.1.3.1.0 : Nested View Object sould not appear in Data Control Palette

    Hello,
    I have a strange behavior in JDeveloper 10.1.3.1.0.
    I have two View Objects, a parent and a child, that are linked by a View Link.
    Although my Application Module instanciates only the parent View Object, I can still see the child View Object in the Data Control Palette.
    I've checked in JDev 10.1.3 SU5 and this behavior doesn't occur.
    Is this a bug ?
    Thanks,
    Seb.

    Hi,
    I tried to reproduce but cannot. I created a m/d ViewObject that are linked by a ViewLink. I removed the detail from the master tree in the AppModule configuration so that only the master instance is left. Opening the DataControl palette, I only see the master view.
    Is the project one that you upgraded from 10.1.3.0? If yes, please try and reproduce in a new workspace
    Frank

  • Programmatic View Object

    I'm trying to create a programmatic view object from an Oracle Stored procedure that returns a single row containing Oracle Object Types. I created a Domain for my Oracle Object type called BillingInfo. Here is the code for my view object so far:
    package billing;
    import billing.common.BillingInfo;
    import java.lang.Integer;
    import java.math.BigDecimal;
    import java.sql.CallableStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Timestamp;
    import java.sql.Types;
    import java.util.Date;
    import java.text.SimpleDateFormat;
    import oracle.jbo.JboException;
    import oracle.jbo.server.DBTransaction;
    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 Business Components for Java.
    public class BillingInfoViewImpl extends ViewObjectImpl
    // billing info procedure call variables
    private final static int BILLING_LOGGED_ON_USER_ID = 0;
    private final static int BILLING_BILL_TO_USER_ID = 1;
    private final static int BILLING_TRANSACTION_DATE = 2;
    private final static int BILLING_TRANSACTION_DETAILS1 = 3;
    private final static int BILLING_TRANSACTION_DETAILS2 = 4;
    private final static int BILLING_TRANSACTION_DETAILS3 = 5;
    private final static int BILLING_TRANSACTION_DETAILS4 = 6;
    private final static int BILLING_TRANSACTION_DETAILS5 = 7;
    private final static int BILLING_TRANSACTION_COUNT = 8;
    private final static int BILLING_TOTAL_CHARGE_AMOUNT = 9;
    private final static int BILLING_PAY_TYPE = 10;
    private final static int BILLING_ERROR_MESSAGE = 11;
    private final static int BILLING_ERROR_CODE = 12;
    private final static int BILLING_RETURN_VALUE = 13; /*
    * This is the PLSQL block that we will execute
    private static final String SQL =
    "begin ecs_jdbc_wrappers.get_billing_info_jdbc(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,?, ?, ?);end;";
    * This is the default constructor (do not remove)
    public BillingInfoViewImpl() { }
    * 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) {
    * If there are where-clause params they will be in the 'params' array.
    * NOTE: Due to Bug#2828248 I have to cast to BigDecimal for now,
    * ---- but this parameter value should be oracle.jbo.domain.Number type.
    int sqlcode = 0; // statement sql code
    String errorMessage = null; // statement error message
    String loggedOnUserId = null; // IN VARCHAR2
    String billToUserId = null; // IN VARCHAR2
    Date transactionDate = new Date(); // IN DATE
    BillingInfo transactionDetails1 = null; // IN OUT billing_info
    BillingInfo transactionDetails2 = null;
    BillingInfo transactionDetails3 = null;
    BillingInfo transactionDetails4 = null;
    BillingInfo transactionDetails5 = null;
    int transDetailsCount = 0; // IN INTEGER
    String payType = null; // IN VARCHAR2
    if (params != null)
    loggedOnUserId = (String)params[BILLING_LOGGED_ON_USER_ID];
    System.out.println("USER ID:" + loggedOnUserId);
    billToUserId = (String)params[BILLING_BILL_TO_USER_ID];
    System.out.println("BILLED USER ID:" + billToUserId);
    if (params[BILLING_TRANSACTION_DETAILS1] != null) {
    System.out.println(params[BILLING_TRANSACTION_DETAILS1]);
    transactionDetails1 = (BillingInfo)params[BILLING_TRANSACTION_DETAILS1];
    transDetailsCount = transDetailsCount + 1;
    if (params[BILLING_TRANSACTION_DETAILS2] != null) {
    transactionDetails2 = (BillingInfo)params[BILLING_TRANSACTION_DETAILS2];
    transDetailsCount = transDetailsCount + 1;
    if (params[BILLING_TRANSACTION_DETAILS3] != null) {
    transactionDetails3 = (BillingInfo)params[BILLING_TRANSACTION_DETAILS3];
    transDetailsCount = transDetailsCount + 1;
    if (params[BILLING_TRANSACTION_DETAILS4] != null) {
    transactionDetails4 = (BillingInfo)params[BILLING_TRANSACTION_DETAILS4];
    transDetailsCount = transDetailsCount + 1;
    if (params[BILLING_TRANSACTION_DETAILS5] != null) {
    transactionDetails5 = (BillingInfo)params[BILLING_TRANSACTION_DETAILS5];
    transDetailsCount = transDetailsCount + 1;
    payType = (String)params[BILLING_PAY_TYPE];
    CallableStatement st = null;
    try {
    st = getDBTransaction().createCallableStatement(SQL,DBTransaction.DEFAULT);
    * Set the value of the bind variables
    st.setString(1, loggedOnUserId);
    st.setString(2, billToUserId);
    // Set Transaction Date to todays date
    java.sql.Timestamp sqlTs = new java.sql.Timestamp(transactionDate.getTime());
    st.setTimestamp(3, sqlTs);
    System.out.println("TRANS DATE:" + sqlTs);
    st.setObject(4, transactionDetails1);
    if (transactionDetails2 == null) st.setNull(5, Types.STRUCT, "BILLING_INFO");
    else st.setObject(5, transactionDetails1);
    if (transactionDetails3 == null) st.setNull(6, Types.STRUCT, "BILLING_INFO");
    else st.setObject(6, transactionDetails1);
    if (transactionDetails4 == null) st.setNull(7, Types.STRUCT, "BILLING_INFO");
    else st.setObject(7, transactionDetails1);
    if (transactionDetails5 == null) st.setNull(8, Types.STRUCT, "BILLING_INFO");
    else st.setObject(8, transactionDetails1);
    st.setInt(9, transDetailsCount);
    st.setString(11,payType);
    * Register OUT paramters
    st.registerOutParameter(4, Types.STRUCT, "BILLING_INFO");
    st.registerOutParameter(5, Types.STRUCT, "BILLING_INFO");
    st.registerOutParameter(6, Types.STRUCT, "BILLING_INFO");
    st.registerOutParameter(7, Types.STRUCT, "BILLING_INFO");
    st.registerOutParameter(8, Types.STRUCT, "BILLING_INFO");
    st.registerOutParameter(10, Types.DOUBLE);
    st.registerOutParameter(12, Types.VARCHAR);
    st.registerOutParameter(13, Types.INTEGER);
    st.registerOutParameter(14, Types.INTEGER);
    // execute the stored procedure
    st.execute();
    // get the SQLCODE
    sqlcode = st.getInt(13);
    System.out.println("sqlcode returned:" + sqlcode);
    errorMessage = st.getString(12);
    System.out.println("Error Message:" + errorMessage);
    catch (SQLException s) {
    System.out.println("sqlcode returned:" + sqlcode);
    System.out.println("Error Message:" + errorMessage);
    throw new JboException(s);
    finally {try {st.close();} catch (SQLException s) {}}
    super.executeQueryForCollection(qc, params, numUserParams);
    This almost works except when I try to print out the attributes I get an error. I beleive I have to override some of the view object framework methods. If so, how do I go about this? Is it the same methods overridden in this example Getting a View Object's Result Rows from a REF CURSOR? http://radio.weblogs.com/0118231/stories/2003/03/03/gettingAViewObjectsResultRowsFromARefCursor.html
    Nat

    Yes. only difference is that your VO will just have one row in it.

  • [Solved] Referencing another View Objects Bind Variables

    Hello,
    I have a Master view object and a detail object.
    The Master object, vProjects, has a bind variable :pProjectId that the user selects by using a selectOneChoice component. The View object vSections then shows only those Sections that have the selected ProjectId.
    I have a view link to get to the lower level which connects vSections to vRequirements.
    This works well except that the vRequirements lists all requirements that match the SecID I pass through the link. I need it to list only the ones that match the SecID AND the ProjectId chosen earlier.
    Is there a way to reference the bind variable that I used in vProjects inside of vRequirements?
    Thank you,
    Nelson
    Message was edited by:
    TheNelson

    Thanks, I can't believe I didn't think of that. I was rewriting queries and everything.
    Thanks again.

  • Filtering Transient view objects

    Guys,
    I have transient view object.
    i have populated the rows programatically.
    Based on some UI action, i need to filter the rows in the view object. Whenever i filter the rows (using view criteria), i can't get back the lost rows again.
    For eg.. i have populated the view object with 5 rows.
    Based on View criteria(VC1), i got only 2 rows.
    Now i need to apply the same view criteria(VC1) with different values for bind variables, but it applies the criteria on the remaining 2 rows. (but am expecting to apply the criteria on the actual 5 rows)
    I think transient view object is loosing rows on applying view criteria.
    How this can be solved?

    Hi,
    can you try using rowmatch
    refer following method inside viewobjectimpl
        public void matchByCustomerNumber(String custno) {
            RowMatch rm = new RowMatch("CustNumber = " + custno);
            setRowMatch(rm);
            setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS | ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES);
            setSortBy("CfMonth DESC");
            executeQuery();
        }you should also see other query modes.
    ViewObject
    look for QUERY_MODE_SCAN.. contants.
    Regards,

Maybe you are looking for

  • Sequence Update not working?

    Hi I've recently set up Sequence replication. This is what I did (I already had GG installed and everything configured) On source and target: SQL> @sequence.sql Please enter the name of a schema for the GoldenGate database objects: GGS_OWNER Setting

  • Configuring wireless card Cisco Aironet 350 PCI

    I'm not a newbie in linux but now faced with a trouble. I could not manage to set up the card properly. I just installed Arch 0.8 and it's not quite clear to me how to do this with Arch. I've read all available Arch's docs on this topic. So my situat

  • Is it possible to have the loudspeaker activate automatically during voice call?

    When answering and making voice calls, is it possible to have the loudspeaker activate automatically during the voice call? Is there any settings on the device which can be changed for this to happen?

  • Variable Searching

    I have a list of document names saved in a XML process variable.  I want to be able to search for a particular document name and see what process is handling it, whether it is complete, running, who is currently assigned, etc. My investigation of the

  • FCE shortens video transitions for no apparent reason

    Hi, I'm working on a half-hour sequence which requires a few transitions. In several instances, the standard transition of 1 second is arbitrarily shortened to 14, 22 or similar frames. The app won't allow it to be lengthened. Yet there is no shortag