How to send a Row based in a view Object

Hi,
i has in the app module a method to insert but i want from the baking bean send a Row with the information but not function well
---this is my method in the app module
public boolean CreaCliente1(Row row){
ViewObjectImpl vo =this.getClientesVo();
vo.insertRow(row);
this.getDBTransaction().commit();
return true
in the bean the the method where i asign the data to the object row is
public Row CreaCliente(Row row){
SimuladorAppImpl app = new SimuladorAppImpl();
ViewObjectImpl vo = app.getClientesVo();
Row row = vo.createRow();
row.setAttribute("IdCliente",0);
row.setAttribute("NuDocumento",this.getNumeroDocumento());
row.setAttribute("IdTipoDocumento",1);
row.setAttribute("CaPrimerNombre", this.getPrimerNombre());
row.setAttribute("CaSegundoNombre",this.getSegundoNombre());
row.setAttribute("CaPrimerApellido",this.getPrimerApellido());
row.setAttribute("CaSegundoApellido", this.getSegundoApellido());
row.setAttribute("CaDireccion",this.getDireccion());
row.setAttribute("CaTelefono",this.getTelefono());
row.setAttribute("CaCorreoElectronico", this.getCorreoElectronico());
row.setAttribute("IdCiudad",11);
row.setAttribute("IdDepto",11001);
row.setAttribute("FeFechaCreacion", new java.sql.Timestamp(new java.util.Date().getTime()));
then i invok the method with the command button but apers a error
how is the best way to do this
thansk
Edited by: JuanAndresDeveloper on 10-feb-2009 8:05

You can't just simply create a new application module like that:
SimuladorAppImpl app = new SimuladorAppImpl();This will not work!
An other thing to mention is that you don't push Row objects from the view controller to the server side (this breaks the MVC paradigm).
If you have to create a new row, you can create a method in your application module and call this method either with a number of attributes or a POJO object holding the values.
Remember too that your new row normally have a primary key attribute which you have to fill with a distinct value for each row.
To get the application module from within a backing bean you can look at ADFUtils.getApplicationModuleForDataControl("YourAppModuleDataControl");Search the FOD application for the ADFUtils class or this forum.
Timo

Similar Messages

  • How to create ADF UI based on polymorphic view objects

    Hi,
    I'm using JDeveloper build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. I created a simple application based on Steve's example #10 [url http://blogs.oracle.com/smuenchadf/examples/]ViewRow and EntityObject Polymorphism.
    I added a men-only attribute "Age" to the "Men" VO and filled it with an arbitrary value in MenRowImpl.java:
    public String getAge() {
         return (String) "45";//getAttributeInternal(AGE);
    }Running the TestModule works perfectly - a row of type "Men" displays the "Age" attribute whereas a row of type "Women" doesn't.
    Afterwards, I setup an ADF ViewController Project and created a JSPX with a read-only form based on the "People" datacontrol with navigation buttons. Running that page always shows the same set of attributes independent of the row type. That's expected behaviour because the binding is defined at design time.
    So my question is: can I somehow achieve the same behaviour for polymorphic VOs as the business component tester shows?
    Kind regards,
    Markus

    Andrejus' example shows how to calculate different values for the same attribute based on overridden view objects. That's not exactly what I'm looking for. I need to display a (at least partly) different set of attributes that changes while the user scrolls through the records of the result set.

  • How to create LOV not based on a View Object attribute?

    Hi,
    I am creating a handed-made search form and I want to create an af:inputListOfValues.
    I have :
    - a read-only-view-object to get the LOV values from BD.
    - af:inputListOfValues tag (droped from Component Palette).
    How can I create the listOfValuesModel in Bindings layer? (the inputListOfValues is not based on a View Object attribute).

    Sorry, I think I am not very clear in my posts.
    My requirement is to create a LOV but I have no ViewObject. I just want an input (not based on a view object attribute), alone, but with a LOV (where lov's datas are get from a view object).
    In a "normal" LOV I would have something like this :
    in jsff :
    <af:inputListOfValues id="departmentIdId"
                                popupTitle="Search and Select: #{bindings.DepartmentId.hints.label}"
                                value="#{bindings.DepartmentId.inputValue}"
                                label="#{bindings.DepartmentId.hints.label}"
                                model="#{bindings.DepartmentId.listOfValuesModel}"
                                required="#{bindings.DepartmentId.hints.mandatory}"
                                columns="#{bindings.DepartmentId.hints.displayWidth}"
                                shortDesc="#{bindings.DepartmentId.hints.tooltip}">
            <f:validator binding="#{bindings.DepartmentId.validator}"/>
            <af:convertNumber groupingUsed="false"
                              pattern="#{bindings.DepartmentId.format}"/>
          </af:inputListOfValues>in pageDef :
    <listOfValues StaticList="false" IterBinding="EmployeesView1Iterator"
                      Uses="LOV_DepartmentId" id="DepartmentId"/>in model layer : a view object (EmployeeView) with view accessor and LOV based attribute, and a read only view object (DepartmentRVO) to get datas for the LOV.
    But in my case I have no ViewObject, so I don't know how to create the listOfValuesModel in fragment pageDef.
    I have :
    <af:inputListOfValues label="Label 1"
                                    popupTitle="Search and Result Dialog"
                                    id="ilov1" model="here I want to point to a listOfValuesModel but I don't know how to create it"/>in pageDef : the listOfValuesModel but I don't know how to create it.
    in model layer : just a read only view object (like DepartmentRVO), to get the datas for the LOV.
    Edited by: h0s on 29 févr. 2012 00:31

  • How to Hide some Rows in a List view Web Part using JavaScript ?

    How to Hide some Rows in a List view Web Part using JavaScript ?

     Here is the code that worked for me:
    var Elements = document.querySelectorAll('div[id=WebPartWPQ3] table[class=ms-listviewtable]>tbody tr .ms-vb-lastCell.ms-cellstyle.ms-vb2')
    for(var i=0, n = Elements.length; i < n; i++)
     if(Elements[i].innerHTML=="India")
    Elements[i].parentNode.setAttribute("style","display:none")
    WebPartWPQ3 -> ID of webpart Div
    ms-listviewtable -> class name of table in Div
    ms-vb-lastCell.ms-cellstyle.ms-vb2 -> classname of td to get text

  • BI Publisher report based on VO (View Objects)

    Hi,
    I would like to know, can we generate BI Publiher report based on VO (view Objects ). Actually we are creating VOs for ADF and want to know if that can be used for generting BIP report.
    Thank,s
    Niraj

    Hi Niraj
    Yes, you can, there is a method on the VO to get the data from it in an XML format. Then use our APIs >> documentation to format it with a template.
    Regards, Tim

  • Creating a dynamic Selection List based on a View Object

    Hello,
    I'm new to JDeveloper and I would like to create a JSP Page with dynamic Selection List based on a runtime query or based on a view object (BC4J). The selection made by an user should serve another dynamic query with the necessary parameters that I built using createViewObjectFromQueryStmt(). By now I tried this using the InputSelectLOV from the Component Palette in JDeveloper. But without success. By the way: the selection list is not very large (5 values), so it's not necessary to have a form finding the desired value.
    Maybe someone had experience about creating this already. Please give me a tip or a little example.
    Thanks.

    http://otn.oracle.com/products/jdev/howtos/jsp/renderers.html

  • How to send a row of an array to a method?

    I am a beginner. I am trying to create an applet with 2-dimentional array of size 4x5. Here is what I have:
    int array [][]=
    {1,2,3,4,5},
    {6,7,8,9,10},
    {11,12,13,14,15},
    {16,17,18,19,20}
    I am trying to send the 3rd row to a method where I want to work with that data.
    Can anybody help me how to SEND the 3rd row?

    I am a beginner. I am trying to create an applet with
    2-dimentional array of size 4x5. Here is what I have:
    int array [][]=
    {1,2,3,4,5},
    {6,7,8,9,10},
    {11,12,13,14,15},
    {16,17,18,19,20}
    I am trying to send the 3rd row to a method where I
    want to work with that data.
    Can anybody help me how to SEND the 3rd row?int[] thirdrow = array[2];

  • How to query a row based on its rownum

    Dear all,
    what is the easiest way to query a row based on its rownum? Suppose I have the following query:
    select first_name from employees where rownum<5;
    FIRST_NAME
    Ellen
    Sundar
    Mozhe
    DavidSo Ellen has rownum 1, Sundar 2 and so on. How can I do it if I just want to query a row where Mozhe is the first_name, which is rownum 3?
    Best regards,
    Val

    JS1 wrote:
    Valerie Debonair wrote:
    I was thinking how oracle assign a rownum in a table is by how it populates the rows in the table.Hence a statement "based on its availability". Maybe my way of thinking it's not accurate?
    You are correct, your way of thinking is wholly innaccurate. Something that can easily be confirmed simply by reading the documentation:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/pseudocolumns009.htm#i1006297
    okie doke... thanks for the correction

  • How to suppress a row based on current date -  at query level?

    In an Bex query report i have suppress rows based on current date.
    There is no current date available in query.
    there is a date field in the query.
    If by chance the date in that field is lesser than current date, I have to suppress that row.
    How can this be achieved?

    What is the code ofr creating a variable to get values >= to current date?
    I have implemented the following code which is not working.
    data L_S_range like line of E_T_range[].
    CLEAR L_S_RANGE.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'GE'.
    L_S_RANGE-LOW = SY-DATUM.
    APPEND L_S_RANGE TO E_T_RANGE[].
    Actually i have written in class, which will be inherited in superclass.
    Edited by: akshara20 on Feb 2, 2011 1:21 PM

  • How to get  current row(Based on Radio button check)  submit button Click

    Hi i hava Query Region Search(Based On Auto Customization Criteria).
    For Showing Results iam Using Table Region.
    Using Radio button How we get the row reference value using Submit button Click.
    Please Help on this .
    Thanks & Regards
    San

    Hi san ,
    Try this
    if ("EventID".equals(pageContext.getParameter(EVENT_PARAM)))
    String rowRef = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    OARow row = (OARow)am.findRowByRef(rowRef);
    VORowImpl lineRow = (YourVORowImpl)findRowByRef(rowRef); // Replace your vo name .
    Please refer this link , Let me know if its not clear .
    Single Selection in table Region in OAF .
    Keerthi

  • How not show duplicate rows based on one field

    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0
    Hello
    I have a query that looks for certain scripts that did not run on a particular day compared to what ran the same day a week ago. We want to include the start_datetime and end_datetime but when I add it to the select statement it brings up all instances of the jobs that run multiple times during the day. Is there a way to exclude the extra rows based on the script_name field?
    SELECT instances.script_name,
                             instances.instance_name,
                             REGEXP_REPLACE(master.description,
                                            chr(49814),  -- em-dash
                                            '-') description
                                            --instances.start_datetime
                      FROM   xxcar.xxcar_abat_instances Instances,
                             xxcar.xxcar_abatch_master  Master
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS')) - (:p_NumOfWeeks * 7)
                      AND    Instances.SCRIPT_NAME = Master.SCRIPT_NAME (+)
                      MINUS
                      SELECT script_name,
                             instance_name,
                             NULL
                             --NULL
                      FROM   xxcar.xxcar_abat_instances
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS'))

    MINUS does a set operation - removing rows from the first set that exactly match the second set.
    When you add columns to the first set, you want a more restricted filtering - try a multi-column NOT IN:
    To remove multiple runs, group and get min/max
    SELECT instances.script_name,
                             instances.instance_name,
                             REGEXP_REPLACE(master.description,
                                            chr(49814),  -- em-dash
                                            '-') description,
                             min(instances.start_datetime) start_datetime,
                             min(instances.end_datetime) end_datetime
                      FROM   xxcar.xxcar_abat_instances Instances,
                             xxcar.xxcar_abatch_master  Master
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS')) - (:p_NumOfWeeks * 7)
                      AND    Instances.SCRIPT_NAME = Master.SCRIPT_NAME (+)
                      AND (script_name, instance_name) NOT IN
                    ( SELECT script_name,
                             instance_name
                      FROM   xxcar.xxcar_abat_instances
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS'))
    group by instances.script_name, instances.instance_name, master.descriptionYou didn't give table definitions, and the query has schemas in it, so I didn't test it.
    regards,
    David

  • How to retrieve the values from a Transient View Object

    Hi Experts,
    I am using Jdevelpoer11.1.1.5.0. I created one Transient view object with attributes EmpId,Salary.
    In Backing Bean i will create rows for that view object and display it in the form of <af:Table> like Empid, Salary and an Update Link.
    Now my problem is i want to update the salary of the particular EmpId. For Example if the EmpId is 100 and salary is 10000 now i want to increase the salary to 20000 and if i click on the update button; i want to retrieve the particular employee details in my backing bean. How can i acheive this?
    Thanks in advance.

    A better approach would be to programmatically populate rows in the <VO>Impl.java by overriding the executeQueryForCollection(0 as specified here -
    http://adfpractice-fedor.blogspot.in/2011/01/adf-bc-programmatically-populated-vo.html
    You can write the logic to update the salary in an AM method then on click of Update or in the getter of Salry field if logic is valid for all fields...

  • Error while Insert new Row in Entity Base View Object

    Hi,
    can someone tell me the reason of following problem? :
    There is a Entity Base View object, which is Binded as ADF Table in a JSFX Page.
    I took the standard operations from the Control Panel: CreateInsert, Commit and Rollback.
    Places them a ADF Buttons.
    Whenever i am trying to insert a Row, after commit i am getting the ORA Error: ORA-01410: invalid ROWID.
    By the way: The Entity Object is using the RowID as Primary Key.
    When i press commit a second time, the the Row is inserted in the Database.
    Any Idea, how to workarround this ORA Error?
    Thank You!

    n by default if you had no pkconstrainst in db,
    in jdev default rowid as prim key.
    as john said make the key as proper.
    and do it.
    if you have db constrainst in db.
    it can be achived by dbconstrainstname with ora.
    what am saying dbconstranist name will map it ora.
    http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcadvgen.htm#BABEFGCI

  • How to share a bind variable across multiple view objects?

    Hi, Can someone tell me if it's possible to share a bind variable among multiple view objects within an application module? My web page displays data from different VOs on different regions. But all data should be controlled by the same bind variable, which appears in all queries. How can I achieve this?
    Please help.

    Best to state your JDev version, and technology stack (eg. ADF BC) when posting.
    I can think of 2 approaches.
    1) Create a parent VO based on SELECT :bindVar FROM dual, then create links between your other VOs and the parent
    2) Create a AM client interface method that programatically sets the bind variable in each VO.
    Can you specify your use case? This one tends to come up when discussing effective from/to dated queries.
    CM.

  • Dynamically subsetting a LOV based on a View Object

    Hi,
    Hoping you guys can help out. I am having issues with Partial Page Refresh and Dynamically
    STATUS table ( STATUS_ID NUMBER, STATUS_NAME VARCHAR2(10)) with values 1 = Open, 2 = Won, 3 = Lost
    ACTIVITIES ( ACTIVITY_ID NUMBER, ACTIVITY_NAME VARCHAR2(20), STATUS_ID NUMBER)
    The list of permissible activities is dependent on the value of the Status Id and both are shown as LOV's in the same popup/dialog.
    I've created EO's and VO's for both tables. I've created a query based view object called voPermissableActivities with sql "select * from activities act where act.status_id = :pStatusId " and have set up the bind variables, etc.
    Against the Activities VO I created a LOV for the ActivityId using the voPermissableActivities.
    I've set the autosubmit property of the Status Id LOV to true and created a ValueChangeListener for the Status LOV in the backing bean. I've also set the partialRefresh property of the Opportunity LOV to point to the Status LOV
    In the StatusChange listener I
    1. get the a DCIteratorBinding which points to the view iterator underpinning the two LOV's
    2. using the iterator I get the value of the Status LOV
    3. I then grab a reference to the ViewObject for voPermissableActivities and set the bind variable pStatusId to reflect the value of the Status LOV using the following code snippet
    ViewRowSetImpl vOppRSI = (ViewRowSetImpl) currentRow.getAttribute ( "voAccountOpportunity1");
    ViewObject voOpportunities = vOppRSI.getViewObject();
    voOpportunities.setNamedWhereClauseParam("StatusId", currentRow.getAttribute("StatusId"));
    System.out.println ( "Est. Row Count : "+voOpportunities.getEstimatedRowCount());
    voOpportunities.executeQuery();
    System.out.println ( "VO Query: "+voOpportunities.getQuery());
    I've got a tonne of debugging code in the method and can see the server log accurately reflecting changes at the UI layer - so I know it's working properly - also the estimatedRowCount returns values I would expect to see. However, the values in the LOV based on the voPermissableActivities view are not changing. So, I'm guessing that the LOV does not properly get refreshed !? or at least, the ADF framework does not automatically refresh it. So, I then found the following snippet to pogrammetically refresh the LOV -
    System.out.println ( "Getting ADF Context");
    AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
    System.out.println ( "Calling PPR") ;
    adfFacesContext.addPartialTarget(getLovOpportunityId());
    System.out.println ( "after calling ppr");
    Any ideas? This is driving me crazy !!!

    Cheers Frank,
    That works fine where I have a discrete and manageably small set of potential values - in the snippet I included there were 3 potential values - and it is feasible to prepare three VO's to drive the LOV. However, in the PRODUCTION version of what I'm trying to do I may have many more.
    Any other thoughts?
    One approach I wanted to explore was dynamically creating the VO at run time. Would that work?

Maybe you are looking for

  • I'm out of space and i dont know why!

    When i go to 'About This Mac' --> 'Storage' it shows that i have 82 GB of "other"! My macbook air only has 120 GB so this is a problem! Theres also 11 GB of apps, 25 GB of photos, and 2 GB of music... I dont understand what else is taking up that muc

  • Some websites do not display properly or function

    Using Firefox v29.0.1; running Win 7 Pro 64-bit version. Some websites do not display properly - as if Firefox is not finding the CSS (Facebook for one). Also, on Craig's List, I can't click on any of the links including the contact/reply button. Wan

  • Grant table create for only temporary tables

    I looking for a way to allow user to create only temporary tables. The user does not need to create or drop any public tables.

  • Please help, few questions on JDI

    Hi,   I am quite new to JDI and have the following questions which might be silly to you..but these helps me in better understanding of JDI. 1. Can a track has Multiple SC's? 2. say if i have a clustered environoment, since we are able to define only

  • Printer determination

    Hello All, I have problem defaulting the printer for adobe forms. 1. I defined "Define Techn. Medium for Msgs (PPF Actions) f. Cust. Shipm. and Cust. Decl." . The process type as " External communication" and Form type = PDF based forms. 2. In "Defin