Data tables and insertRow() method

I've seen this question a number of times and no answers yet. Is it possible to create a CRUD page with a data table, without creating additional fields outside of the table, I mean, I saw an example with a single page tabular CRUD, but in order to insert a new row, I had to type the new values outside the table, ain't ther a way to do it with the table only? I've tried appendRow, insertRow (which would be the ideal way, since when a table is paginated it doesn't work). I'm sure it shouldn't be that hard, i'm struggling with this for some days now. Could anyone help me? Thanks.
My scenario:
I have a dataprovider, inside my page, that extends ObjectListDataProvider and is set to a class defined by me -> .setObjectClass(UfDTO.class)
I fill the dataProvider list through another list fetched from the sessionbean:
.setList(getSessioBean1.getUfList());
I can delete rows from a checkbox I put into the data table, refresh the data and everything works ok, what i am trying to do, but doesn't work is:
ufListDataProvider.cursorFirst();
RowKey first = ufListDataProvider.getCursorRow();
ufListDataProvider.canInsertRow(first); => returns false!
If I try the appendRow() it works, but once I try to save, the values entered on the data tables field are lost.

Yes, I've already looked at the tutorials, there, however, the cachedRowSet is used, and the db table is directly bound to the jsp table, but I don't this tight coupling.
I can call the appendRow method, however when i call the setValue() method on my properties, they remain null. Just to make thigs clearer, I didn't bind my Hibernate entities to the dataProvider, I used another object that is transformed into one or more entities.
That's what I have:
an POJO named UfDTO
public class UfDTO() {
private Integer id;
private String name;
...(getters and setters)
on the SessionBean1
ObjectListDataProvider listDataProvider...
listaDataProvider.setObjectType('com.campo.dto.UfDTO);
public String btnAdd_action(){
if(listDataProvider.canAppendRow()){
RowKey rk = ufListDataProvider.appendRow();
ufListDataProvider.setValue("id", new Integer(0));
ufListDataProvider.setValue("id", new String());
return null;
The code runs fine, with no exceptions, and when I am debugging I can see that after the call to appendRow() a new object is created under the 'appends' properties of the listDataProvider, but even after the calls to setValue, the values of the UfDTO properties into the appends remain null.

Similar Messages

  • My ipod cclassic 80gb is hang after trying dat press and hold method then also its not working please tell me solution

    My ipod cclassic 80gb is hang after trying dat press and hold method then also its not working please tell me solution

    Thanks for your response and good luck wishes, I suspect I will need them!
    In principle, I agree re: the manufacturer's warranty. However, I am pretty upset that this is now my second iPod to develop a critical fault within weeks of the warranty expiring, and frankly, it is not unreasonable to expect a state-of-the-art $500 electronic device to last well beyond one year of life.
    I agree talking to Apple is not likely to do me any good (the clue is in how impossible they make it to talk to them in the first place) - but that is not necessarily OK. I expect I will have to pay money to get the battery replaced - again, not OK (full stop - but especially given the cost of the device and the money I have spent with Apple). Yes, the batteries have a limited lifespan, but it should last longer than this (and surely, I should notice a gradual decline in its functionality, not an instant stop).
    I will try Deggie's suggestion (see my reply post), but probably won't hold my breath (think I have already done this). I probably will have to get the new battery - and probably under my own steam. It is a principle at stake and I feel I should be able to let Apple know how I'm feeling - and am frustrated that they make this virtually impossible. It sends the very clear message that they are not interested in listening to their customers.

  • Hi,master  data tables and SID's

    Hi,
    Where and how we will find the master data tables and SID tables?I am going to se16 and checking there but i am not able to see there in which table these are located or stored?
    Thank you,
    Sekhar..

    >
    chandra sekhar wrote:
    > Hi,
    > Where and how we will find the master data tables and SID tables?I am going to se16 and checking there but i am not able to see there in which table these are located or stored?
    > Thank you,
    > Sekhar..
    Assuming the infoObject name is ZINFOOBJECT.
    The tables are :-
    /BIC/MZINFOOBJECT       View of Master Data  Tables: Characteristic
    /BIC/PZINFOOBJECT       Master Data (Time-Ind.): Characteristic
    /BIC/RZINFOOBJECT        View SIDs and Char.  Values: Characteristic
    /BIC/SZINFOOBJECT       Master Data IDs: InfoObject
    /BI0/HZINFOOBJECT                 Hierarchy: InfoObject
    /BI0/IZINFOOBJECT                 SID Structure of Hierarchies: InfoObject
    /BI0/KZINFOOBJECT        Conversion of Hierarchy Nodes - SID: InfoObject
    /BI0/TZINFOOBJECT        Texts: Char.
    /BI0/XZINFOOBJECT       Attribute SID Table: InfoObject
    /BI0/ZZINFOOBJECT       View Hierarchy SIDs and Nodes: Char.

  • Master data tables and Transaction data Tables

    Hello Gurus,
    Please let me know how to know which table belongs to master data  and which table belongs to transaction data.
    for FICO module.
    Does any one  have specific material relating to master data table and transaction data tables.
    Thanks
    Edited by: Manu Rathore on Jan 18, 2012 4:38 AM

    Hi Manu,
    Find attached table relation diagram by Christopher Solomon. It is one of the very comprehensive chart on this topic.
    deleted
    Warm regards,
    Murukan Arunachalam

  • Dynamic Creation of Data Tables and Fields

    Hello all. I am currently working with a system that contains a bunch of windows. These windows are divided into two groups that represent their presentation style: Columns (such as a table) and Free (such as in a form). I created two tables in database to describe each and every window. These tables describe the type of presentation style, the fields of each window (title of the field, size of the field, position in window, and many more...)
    I did this to make the creation of the windows more effective. In this way that I have, I only have to make one window to display all the thousands of windows that I have in my database because the values of presentation are taken from the description in the tables.
    I was able to do this through TextFields and JTables in Swing. But now I run into JSC. Is this possible with JSC? Say in case the presentation style of the window is Column, can I tell the data table to go read the description of the window that needs to be opened to obtain the amount of columns, the column names, the size of each column... then create the tables and present the values?
    Or say the presentation style is Free... I need to go find how many fields need to be created and their positions in the form, and then the titles of each field. Any ideas how this can be performed?
    Thank you.
    Franklin Angulo

    >
    I was able to do this through TextFields and JTables
    in Swing. But now I run into JSC. Is this possible
    with JSC? Say in case the presentation style of the
    window is Column, can I tell the data table to go
    read the description of the window that needs to be
    opened to obtain the amount of columns, the column
    names, the size of each column... then create the
    tables and present the values?
    Or say the presentation style is Free... I need to go
    find how many fields need to be created and their
    positions in the form, and then the titles of each
    field. Any ideas how this can be performed?
    Creator won't help you with the graphical design, but it's definitely possible to dynamically compose the set of components that are children of a particular component. Doing so leverages the basic component APIs of JSF (javax.faces.component.UIComponent), so you'll want to grab yourself a copy of the JSF Javadocs (or use Creator's lookup facilities as you type your code) to understand what's possible.
    The most important detail is that all components have a getChildren() method that returns a java.util.List of the child components for that component (as well as a getParent() to get the parent component). Any manipulation you do on this returned list is reflected in the structure of the overal component tree.
    As a simple example, assume you want to add an input text component as a child of the form. You'd do something like this:
    HtmlInputText input = new HtmlInputText();
    input.setXxx(..); // Set properties as needed
    form1.getChildren().add(input); // add new childCraig McClanahan

  • Problem with ADF Table and doDML method.

    HI,
    I have a problem with ADF Trinidad Table. I have one search form and which i click on search button the result is coming it's working fine, And when i click on CreateInsert button to insert a new row it's adding after entering all the data into the table when i click on button on the page i am getting error like
    Messages for this page are listed below.
    Error     
    Missing mandatory attributes for a row with key oracle.jbo.Key[1 ] of type AppModule.CmSubscribersView1
    Error     
    Attribute Name in AppModule.CmSubscribersView1 is required
    Error     
    Attribute CreatedBy in AppModule.CmSubscribersView1 is required
    Error     
    Attribute CreationDate in AppModule.CmSubscribersView1 is required
    Here Created By and Creation Date are not available in the table i need to set these data from back end for that i have used doDML() method in the entity object and i written the logic but this method not even invoking as i couldn't able to see the logs in the server.
    protected void doDML(int operation, TransactionEvent e) {
    super.doDML(operation, e);
    System.out.println("^^^^^^^^^^^^^^^^66666Inside entity object^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ");
    // AppModuleImpl am=new AppModuleImpl();
    // Number userID= am.getUserId();
    //System.out.println("User id in the Entity Object Is: "+userID);
    oracle.jbo.domain.Date dt = new Date();
    if(operation ==DML_INSERT){
    EntityDefImpl cmSubscribers=CmSubscribersImpl.getDefinitionObject();
    CmSubscribersImpl newSubscribers=(CmSubscribersImpl)cmSubscribers.createInstance2(getDBTransaction(),null);
    Number n=new Number(1599);
    newSubscribers.setCreatedBy(n);
    newSubscribers.setCreationDate(dt);
    newSubscribers.setLastUpdateDate(dt);
    newSubscribers.setLastUpdatedBy(n);
    But still the same problem can any one help me inthis.
    Regards,
    Edited by: user5802014 on Aug 21, 2009 2:04 PM

    Hi,
    Modify your method to call super.doDML() after initialization of mandatory attributes as below:
    protected void doDML(int operation, TransactionEvent e) {
         oracle.jbo.domain.Date dt = new Date();
         if(operation ==DML_INSERT){
              //PRE-INSERT code begins     
           EntityDefImpl cmSubscribers=CmSubscribersImpl.getDefinitionObject();
           CmSubscribersImpl newSubscribers=(CmSubscribersImpl)cmSubscribers.createInstance2(getDBTransaction(),null);
           Number n=new Number(1599);
           newSubscribers.setCreatedBy(n);
           newSubscribers.setCreationDate(dt);
           newSubscribers.setLastUpdateDate(dt);
           newSubscribers.setLastUpdatedBy(n);
           //PRE-INSERT code ends
           super.doDML(operation, e);
           //POST-INSERT code if any
         }else
            super.doDML(operation, e);
    }Sireesha

  • Fighting with typed data set and GetChildRows() method

    Hi,
    I have problems with the GetChildRows method of a typed data set of a VS2005 data set designer generated code to get all child rows from a parent table. Its not working the way it should and throws a "invalid cast exception" on the line
    DataSet.T_CHILDRow[] childs = parent.GetT_CHILDRows();
    I don't know if the problem is me and my still limited VS/C# knowledge or the Oracle .NET provider (local installed oracle10gR2 and Oracle .NET provider v2.0.50727) or VS2005 and the code generator for the data set.
    I attach the sample script to create my test table T_PARENT and T_CHILD as well as some test data and my program.cs console test application. To create the data set, just add a new data set to the solution named "DataSet.xsd" and drop the two test tables from the database explorer onto the data set designer window.
    TIA,
    Stefan
    ================ sample.sql =================
    create table T_PARENT (
    PARENT_ID number(10) not null,
    PARENT_NAME varchar2(100) not null,
    constraint T_PARENT_PK primary key(PARENT_ID)
    using index
    create table T_CHILD (
    CHILD_ID number(10) not null,
    PARENT_ID number(10) not null,
    CHILD_NAME varchar2(100) not null,
    constraint T_CHILD_PK primary key(CHILD_ID)
    using index
    alter table T_CHILD
    add constraint T_CHILD_FK1 foreign key(PARENT_ID)
    references T_PARENT(PARENT_ID);
    insert into T_PARENT(PARENT_ID, PARENT_NAME) values (1, 'Parent 1');
    insert into T_PARENT(PARENT_ID, PARENT_NAME) values (2, 'Parent 2');
    insert into T_PARENT(PARENT_ID, PARENT_NAME) values (3, 'Parent 3');
    insert into T_CHILD(CHILD_ID, PARENT_ID, CHILD_NAME) values (11, 1, 'First Child of Parent 1');
    insert into T_CHILD(CHILD_ID, PARENT_ID, CHILD_NAME) values (12, 1, 'Second Child of Parent 1');
    insert into T_CHILD(CHILD_ID, PARENT_ID, CHILD_NAME) values (13, 1, 'Third Child of Parent 1');
    insert into T_CHILD(CHILD_ID, PARENT_ID, CHILD_NAME) values (31, 3, 'First Child of Parent 3');
    ================ program.cs =================
    using System;
    using System.Collections.Generic;
    using System.Text;
    using TestChildRows.DataSetTableAdapters;
    namespace TestChildRows
         class Program
              static void Main(string[] args)
                   T_PARENTTableAdapter taParent = new T_PARENTTableAdapter();
                   DataSet.T_PARENTDataTable dtParents = taParent.GetData();
                   foreach (DataSet.T_PARENTRow parent in dtParents)
                        Console.WriteLine("\nParent Name: " + parent.PARENT_NAME);
                        DataSet.T_CHILDRow[] childs = parent.GetT_CHILDRows();
                        if (childs.Length > 0)
                             foreach (DataSet.T_CHILDRow child in childs)
                                  Console.WriteLine("\tChild Name: " + child.CHILD_NAME);
                        else
                             Console.WriteLine("\tThis parent has no childs!");
                   Console.Write("\nPress any key to end program ");
                   Console.ReadLine();
    }

    I found it: the problem is a bug in VS2005. Even SP1 provides no fix. MS just states that it will be fixed in the next VS release, but provides no info which release this will be.
    See:
    http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=114983
    For a work arround see:
    http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=114983
    Stefan

  • Problem with data table and internal and external command button

    thanks for your time,
    i have this problem
    <t:dataTable binding="#{manejadorAsociarEvaluadoresProyecto.tablaPosiblesEvaluadores}"
    cellpadding = "6"
    cellspacing = "3"
    value = "#{manejadorAsociarEvaluadoresProyecto.listaPosiblesEvaluadores}"
    var = "posibleEvaluador"
    preserveDataModel="false">
    <h:inputTextarea value="#{posibleEvaluador.correoActualCuerpo}"
    cols="50"
    rows="50"
    rendered="#{posibleEvaluador.detalle}" />
    <h:commandLink immediate="false" action="#{posibleEvaluador.editar}" value="Editar Correo"/>
    </t:dataTable>
    <h:panelGroup id="panelBotonEvaluadores" rendered="#{!manejadorAsociarEvaluadoresProyecto.b_mostrarEvaluadores && manejadorAsociarEvaluadoresProyecto.tieneProyectos}">
    <h:commandButton action="#{manejadorAsociarEvaluadoresProyecto.mostrarEvaluadores}"
    value="Asociar evaluadores"/>
    </h:panelGroup>
    this is the method of posibleEvaluador
    public String editar()
    setDetalle(!getDetalle());
    return "";
    all run perfect, until y click in "asociar evaluadores" button, after of this the commandLink "editar Correo" not run, this commanlLink is for not show the inputTextArea, i don't know what happend.
    thanks for your help

    Hello,
    I have replicated and confirmed the problem with LabVIEW 2010, Report Generation Toolkit 2010 and Word 2010.  I have filed this to R&D under CAR ID #257414.  As a workaround you can manually set each cell using Word Edit Cell.vi.  I have attached a simplified representation of this unexpected behavior as well as the workaround.  Hopefully this helps everyone out!
    David_L | Certified LabVIEW Architect
    LabVIEW Tools Network | LabVIEW Tools Network Developer Center
    Attachments:
    Word 2010 Table CAR.vi ‏17 KB
    Word 2010 Table FIX.vi ‏22 KB

  • Data Curruption and Static methods

    public static void myMethod( String Argument)
         int i = 0 ;
    What are the chances of data corruption in this static method?
    IF there are chances of data corruption, am I corrupt in saying that chances of data corruption for argument and Variable i are same?
    Where is function state stored in static method stored? What will happen to this if one thread pre-empts other?
    public class a
         int j;
         public static void myMethod( String Argument)
              int i = 0 ;
    How is integer j different from integer i? Where will JVM keep these variables ?

    Sorry The
    int j ;
    should have been
    static int j;
    I thought the behaviour of a variable in a static method will be same as static variable.

  • Cost center planning data table and transaction code to view

    Hi,
    I want to see the cost center planning document. In which transaction code, I can see this document.
    In which table, cost center planning data is stored?
    Regards,
    VS ramaiah
    Moderator: Please, search SDN

    Hello,
    I do not think that COEP contains the plan line items*. For plan line items it is COEJ. But as suggested by Christian the better option in case you want to create a report is you use COSS/COSP and COST. The latter is for activity type planning (KP26) and the other two are for cost planning (KP06).
    The transactions to view the plan document is KABP and line items is KSBP.
    * Christian, do correct me if I'm wrong. I was not able to see anything with value type 01 in COEP.
    Kind Regards // Shaubhik

  • Data Table and Translation.

    Edited by: Zabo on Jan 31, 2011 6:31 AM

    Normally, you'll need humans to translate your data into some other language. There are automatic translation services out there and machine translation has come a long way, but it's still a long way from being exactly right particularly for something like a product name where a mis-step in translation is going to be very problematic.
    You have a few different approaches to storing the translated data. If you are reasonably confident that you know what languages are needed (i.e. if you only sell in North America, English, Spanish, and French are going to cover the vast majority of potential consumers and it's probably reasonable to assume that you won't need a 4th language until the company expands), you could store the English, Spanish, and French translation in the PRODUCTS table, i.e.
    CREATE TABLE products (
      product_id NUMBER PRIMARY KEY,
      description_english VARCHAR2(30),
      description_french VARCHAR2(30),
      description_spanish VARCHAR2(30)
    );If you want more flexibility in storing translations for multiple languages (i.e. an international company where some products will be translated into many different languages and some will be translated into relatively few depending on where the product is marketed), you can store all the translations in a separate table, i.e.
    CREATE TABLE products (
      product_id NUMBER PRIMARY KEY,
      description VARCHAR2(30)
    CREATE TABLE product_translations (
      product_translation_id NUMBER PRIMARY KEY,
      product_id NUMBER REFERENCES products( product_id ),
      language VARCHAR2(5),
      translated_description VARCHAR2(30)
    );Justin

  • JSF data table and commandLink

    Hi,
    Is the bug of using commandLink with datatable resolved for a request scope bean. The google search is not very helpful.
    I have already tried tomhawk datatable with preserveDataModel. Unfortunatelyy does not work.
    I am sure in JSF 2.0 it would have been resolved. Any help appreciated.
    Thanks
    Edited by: bhavin_monani on Nov 12, 2009 7:09 AM

    Problem #1
    I think commandLink will always forward all requests back to the JSF controller. If you do not have any actionListener on your commandLink (or do not use a backing bean's method as the action), you can use <h:outputLink> instead.
    Problem #2
    <link rel="stylesheet" href="<%=request.getServletPath()%>/css/coa.css"/>or
    <t:stylesheet path="/css/coa.css" />where <t:stylesheet> is from MyFaces Tomahawk.

  • How do I get a two line graph to show all the months in the data table and not just every second one?

    My two line graphs covers six months, but only shows three months How can I make it show all six months

    select the chart, then open the Chart Formatter:
    Then click "Axis", then "Category (X)"
    Change the "Label Angle" to "Left Vertical" or "Right Vertical"

  • How do I retrieve all data from a table and display it on a text area?

    I want to retrieve all the data from one of my MS Access data table and display them all in a text area. how do i go among doing this?
    In my car table i have the fields lined up like this..
    license,color,doors and year_made
    I have an Object class called CAR that will contain methods to set the data from these fields when it gets retrieved.
    here's what i go so far.....
    statement = getDBConnection().createStatement();
         rs = statement.executeQuery("select * from car");
         boolean moreRS = rs.next();
    if(moreRS)
    car.setLicense(rs.getLong(1));
         car.setColor(rs.getString(2));
         car.setDoors(rs.getString(3));
    car.setYearMade(rs.getString(4));
    //but this will only get me one car. How do I get more car data?
    HELP!!

    Vector cars = new Vector();
    while (rs.next()) {
      String license = rs.getLong(1);
      String color = rs.getLong(2);
      String doors = rs.getLong(3);
      String year = rs.getLong(4);
      myTextArea.append(license+"\t"+color+"\t"+doors+"\t"+year+"\n");
      Car car = new Car();
      car.setLicense(license);
      car.setColor(color);
      car.setDoors(doors);
      car.setYearMade(year);
      cars.add(car);
    }t=tab
    n=newline
    Vector: http://java.sun.com/j2se/1.4.1/docs/api/java/util/Vector.html

  • Splitting of catalogue and data tables in their core BO management database

    Hi All,
    Could you please suggest your ideas on the below recommendation suggested by our DBA's:-
    It is recommendable to split catalogue tables from data table and other data objects (e.g. indexes) using storage.
    splitting of catalogue and data tables in their core BO management database
    Is it a recommendable solution to splitting of catalogue and data tables in their core BO management database?
    Many Thanks,
    Madhu
    Edited by: Madhu P on Jun 11, 2008 11:56 AM

    Dear Madhu,
    it's really safe to separate the BO management tables ( the repository) from the tables containing the data.
    We went a step further and create a BO database (dedicated server) containing only the repository.
    Because the BO database may provide meta data form different universes pointing to different databases containing the data we have easier administration and some performance advantages
    with this separation.
    bye
    yk

Maybe you are looking for

  • ITunes Music on iPhone

    Is there not a way to hide the status bar, shuffle & repeat bar on the iPhone 5?  I activated it today and updated my iTunes to the new version and now I don't have the ability to hide the bar.  All I want to see is the Artist name, Song Title and Al

  • Icon of a connector and arrow after restoring - HELP!

    Hi. After loading the newest ipod updater and updating my 3g 10gb ipod it wont work. It turns on and shows the apple logo, then switches to a picture of what looks like the end of the connector cord with an arrow. After this it turns off. I have trie

  • I can login by hostname but can't by ip

    Hi, There is a strange problem. After some updates on DC and adding new Exchange server 2013 to domain I can't login with Remote Desktop Connetion (RDP) to another PC in local network by IP address and AD account and if remote PC is Win 7, 8.1 or Ser

  • A possible bug for Grid control?

    Hi, Dear all, We installed Grid control 10.2.0.1 on Redhat Linux R3 with existing database(10.2.0.4). During the installation, we succeeded for repository creating but failed at OMS Configuration. When I start oms in cmd line, I got the following err

  • How to use BKPF and BSEG without using  inner join

    Hi, can anybody plz tell me the logic about how to complete the report without inner joining bkpf and bseg.Is this report can be really be made by using only bseg,bkpf ? *selection-criteria . BKPF-USNAM BKPF-CPUDT BKPF-BUDAT BKPF-GJAHR BKPF-BUKRS BKP