New Row in tableGrid

I am struggling to find any documentation anywhere on how to
add a blank record to an already populated grid. I am updating a
record set and then posting the changed records back to a cfc for a
sql table update. The update of existing records is already done
and works fine. As you can see very new to Flex.

it depends on how you are populating the datagrid

Similar Messages

  • While creating a new row in table,the total data present in table is coming

    Hi,
    From search page,i click add button,it goes to next transaction page.In transaction page i drag and drop one VO in table and in form also.But in that transaction page,The table is coming with data and a new row is also able to insert.But i don't want the previous data whatever present in table in create a new row time.Please give me the solution.
    Thanks in advance
    Sravanthi

    Not sure I understand what you are trying to do.
    If you have a table and a form based on the same data on one page you see the already existing data in the table. If you don't want to see the existing data in the table while entering a new row, the simplest solution would be to
    a) hide the table after the use hits create new row or
    b) navigate to an other page which only shows the form
    Timo

  • Creation of new Row in Tree Table

    We are creating a new row using CreateListener which is written in Bean, after creating the row, we are adding it to the iterator and the new row is not getting highlighted and focus is not in new row in the table by default. It takes an click to make it editable. 'setActiveRowKey()' method didnot help here which is used in the af:table component to achieve the same.
    Any pointers regarding this issue would be helpful..
    Thanks,
    Shruthi

    Hi Max:
    According to what you described, it's really wierd. An ADF table is Surrounded by a panelCollection or not doesn't matter in terms of CreateInsert operations, I think. Also each step you said OK doesn't mean that step is 100% problem free towards your final goal. For example, when you drag and drop and ADF table onto a JSF page, you forget to turn on 'row selection', it will be OK, you won't get any error message, but later on when you find that you need to turn it back on, you have to go back to JSF page source, to manually added codes to do so.
    The simpliest solution and quickest one is to reinitiate a clean ADF project and do it all over again. It's simple straightforward in my view. Probably don't use PanelCollection first, just drop your ADF table on a form, or af:panelForm, but make sure your table and 'CreateInsert' button is surrounded by a form, otherwise, when you click on 'CreateInsert', nothing will happen. When everything works, then probably back it up and replace your form or af:panelForm with panelCollection. See how it goes.
    Thanks,
    Alex

  • New rows become deleted from snapshot sites after refresh

    Hi buddy
    I am facing problem in snapshot at snapshot sites.
    I have oracle 8.0.5 4 database server machines.
    all servers machines have O.S windows 2000 advance server
    all servers machine have same oracle version ( 8.0.5 ).
    there is Site A ( Master site ) site B ( snapshot site ) Site C ( snapshot site).
    snapshot has been created at all snapshots sites ( B,C and at D)
    snapshot log against each table are also present at master site ( Site A )
    refresh group is present at snapshot site.
    these are working since feb-2002 successfully. now problem occur in these sites if some miner issues comes then it has been resolved successfully.
    Replication parameter in init.ora all all sites are as follows
    global_names = true
    job_queue_processes = 2
    job_queue_interval = 60
    job_queue_keep_connections = false
    distributed_lock_timeout = 60
    distributed_transactions = 16
    open_links = 4
    snapshot_refresh_interval = 60
    snapshot_refresh_keep_connections=false
    snapshot_refresh_processes = 2
    few days ago one problem occurs in master site A. it become crashed. we did its recovery from previous night backup ( cold backup).
    Now all branches are working. but my current problem is that we have 20 tables in replication.It is a snapshot replication old version of materialized view.
    when site B start refresh procedure then it show message procedure successfully completed.
    it show no error message.
    but when we check no of rows at snapshot site ( site b )
    all new rows which were inserted at snapshot ( site b ) after previous refresh has been deleted.
    mean all data which is inserted after previous refresh command has been finished. but data which is inserted at master site is present at snapshot site after refresh.
    this problem is present at all the snapshot sites ( site B, Site C and site D).
    database link is also present from master to snapshot site anf from snapshot to master. but problem is still suspended.
    i have checked at all snapshot site and master site there is no invalid procedure or package.
    there is no error message in alert file at all site.
    if any body has its solution kindly told me.
    thanks in advance
    Abdul Hameed
    [email protected]

    This is still going on when the page fails the call to getCurrentRow().refresh(Row.REFRESH_REMOVE_NEW_ROWS) goes out to lunch and stops processing for the rest of the function. I tried adding a try catch around it but nothing is caught and the function still fails.
    getSiteMealLogsV().getCurrentRow().refresh(Row.REFRESH_REMOVE_NEW_ROWS);
    ---Stops working here -----
    getSiteMealLogsV().clearCache();
    getDBTransaction().commit();
    Jim

  • FillBy always fills in the same row in data grid view. How to make it fill in a new row for each click of the Fillby Button? VB 2010 EXPRESS?

    Hi there, 
    I am a beginner in Visual Basic Express 2010. I have a Point of Sale program that uses DataGridView to display records from an external microsoft access
    database using the fillby query. 
    It works, but it repopulates the same row each time, but i want to be able to display multiple records at the same time, a new row should be filled for
    each click of the fillby button. 
    also I want to be able to delete any records if the customer suddenly decides to not buy an item after it has already been entered. 
    so actually 2 questions here: 
    1. how to populate a new row for each click of the fillby button 
    2. how to delete records from data grid view after an item has been entered 
    Thanks 
    Vishwas

    Hello,
    The FillBy method loads data according to what the results are from the SELECT statement, so if there is one row then you get one row in the DataGridView, have two rows then two rows show up.
    Some examples
    Form load populates our dataset with all data as it was defined with a plain SELECT statement. Button1 loads via a query I created after the fact to filter on a column, the next button adds a new row to the existing data. When adding a new row it is appended
    to the current data displayed and the primary key is a negative value but the new key is shown after pressing the save button on the BindingNavigator or there are other ways to get the new key by manually adding the row to the backend table bypassing the Adapter.
    The following article with code shows this but does not address adapters.
    Conceptually speaking the code in the second code block shows how to get the new key
    Public Class Form1
    Private Sub StudentsBindingNavigatorSaveItem_Click(
    sender As Object, e As EventArgs) Handles StudentsBindingNavigatorSaveItem.Click
    Me.Validate()
    Me.StudentsBindingSource.EndEdit()
    Me.TableAdapterManager.UpdateAll(Me.MyDataSet)
    End Sub
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    'TODO: This line of code loads data into the 'MyDataSet.Students' table. You can move, or remove it, as needed.
    Me.StudentsTableAdapter.Fill(Me.MyDataSet.Students)
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Me.StudentsTableAdapter.FillBy(Me.MyDataSet.Students, ComboBox1.Text)
    End Sub
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    Me.MyDataSet.Students.AddStudentsRow("Jane", "Adams", "Female")
    End Sub
    End Class
    Get new key taken from
    this article.
    Public Function AddNewRow(ByVal sender As Customer, ByRef Identfier As Integer) As Boolean
    Dim Success As Boolean = True
    Try
    Using cn As New OleDb.OleDbConnection With {.ConnectionString = Builder.ConnectionString}
    Using cmd As New OleDb.OleDbCommand With {.Connection = cn}
    cmd.CommandText = InsertStatement
    cmd.Parameters.AddWithValue("@CompanyName", sender.CompanyName)
    cmd.Parameters.AddWithValue("@ContactName", sender.ContactName)
    cmd.Parameters.AddWithValue("@ContactTitle", sender.ContactTitle)
    cn.Open()
    cmd.ExecuteNonQuery()
    cmd.CommandText = "Select @@Identity"
    Identfier = CInt(cmd.ExecuteScalar)
    End Using
    End Using
    Catch ex As Exception
    Success = False
    End Try
    Return Success
    End Function
    In closing I have not given you a solution but hopefully given you some stuff/logic to assist with this issue, if not perhaps I missed what you want conceptually speaking.
    Additional resources
    http://msdn.microsoft.com/en-us/library/fxsa23t6.aspx
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • I can't insert new row in database when there is a secondary key.

    hi experts. I am using Jdeveloper since a while. I would like to know If there is a way to insert a new row with secondary key attribute in database. As example if we have a sessionEJBLocal data control can't we add new row by using single selection choice item for secondary key attributes? I tried to use single selection even jdbc with sql queries in a managed bean but nothing. Can you help me please?

    would this solve your problem
    http://kohlivikram.blogspot.com/2008/10/add-new-row-in-adf-table-on-button.html

  • JTable checkboxes doesn't retain their selection when a new row is added!!

    HI,
    My gui has the JTable component which has 5 columns. out of which 4 columns are checkboxes. whenever i select an item from the Jlist and click on the add button it will add a new row in JTable.
    but the problem is whenever a new row is added to the table. the previously selected checkboxes of previous rows are being deselected. But i want to retain the selection of my previous rows even when a new row is added. please help me how to achieve this..i am posting my JTable code here:
    class FunctionTableModel extends AbstractTableModel{
           /** The instances who's attribute structure we are reporting */
        //protected InitModel m_init;
        protected String func_element;
        protected int counter;
        //protected String[] func_array;
        protected Vector func_vector;
        /** The flag for whether the instance will be included */
        protected boolean [] m_Sum;
        protected boolean [] m_Min;
        protected boolean [] m_Avg;
        protected boolean [] m_Max;
        protected boolean [] m_SD;
         * Creates the tablemodel with the given set of instances.
         * @param instances the initial set of Instances
        public FunctionTableModel() {
          counter =0;
             func_vector = new Vector();
         public FunctionTableModel(Vector vec) {
            func_vector = vec;
        public Vector getDataVector(){
            return func_vector;
         * Sets the tablemodel to look at a new set of instances.
         * @param instances the new set of Instances.
        public void setElement(Vector vec) {
               for(int i=0;i<vec.size();i++){
            func_vector.add(vec.elementAt(i));
            counter++;
          fireTableDataChanged();   
          m_Sum = new boolean [counter];
          m_Min = new boolean[counter];
          m_Avg = new boolean[counter];
          m_Max = new boolean[counter];
          m_SD = new boolean[counter];
         * Gets the number of attributes.
         * @return the number of attributes.
        public int getRowCount() {
               return func_vector.size();
         * Gets the number of columns: 3
         * @return 3
        public int getColumnCount() {
          return 6;
         * Gets a table cell
         * @param row the row index
         * @param column the column index
         * @return the value at row, column
        public Object getValueAt(int row, int column) {
          switch (column) {
          case 0:
            return func_vector.elementAt(row);
          case 1:
            return new Boolean(m_Sum[row]);
          case 2:
            return new Boolean(m_Min[row]);
          case 3:
            return new Boolean(m_Avg[row]);
          case 4:
            return new Boolean(m_Max[row]);
          case 5:
            return new Boolean(m_SD[row]); 
          default:
            return null;
        public void removeAll(){
            func_vector.removeAllElements();
            fireTableDataChanged();
         * Gets the name for a column.
         * @param column the column index.
         * @return the name of the column.
        public String getColumnName(int column) {
          switch (column) {
          case 0:
            return new String("Function Selected");
          case 1:
            return new String("Sum");
          case 2:
            return new String("Min");
          case 3:
            return new String("Avg");
          case 4:
            return new String("Max");
          case 5:
            return new String("SD");   
          default:
         return null;
         * Sets the value at a cell.
         * @param value the new value.
         * @param row the row index.
         * @param col the column index.
        public void setValueAt(Object value, int row, int col) {
          if(col == 0){
            counter++;
            func_vector.add(counter,value.toString());
          if (col == 1)
            m_Sum[row] = ((Boolean) value).booleanValue();
          if (col == 2)
            m_Min[row] = ((Boolean) value).booleanValue();
          if (col == 3)
            m_Avg[row] = ((Boolean) value).booleanValue();
          if (col == 4)
            m_Max[row] = ((Boolean) value).booleanValue();
          if (col == 5)
            m_SD[row] = ((Boolean) value).booleanValue();       
         * Gets the class of elements in a column.
         * @param col the column index.
         * @return the class of elements in the column.
        public Class getColumnClass(int col) {
             return getValueAt(0, col).getClass();
         * Returns true if the column is the "selected" column.
         * @param row ignored
         * @param col the column index.
         * @return true if col == 1.
        public boolean isCellEditable(int row, int col) {
          if (col >= 1) {
             return true;
          return false;
        public void removeRow(int row){
            if(row<=func_vector.size()){
                          func_vector.removeElementAt(row);
                counter--;
            fireTableDataChanged();
        }

    hi parvathi,
    i have made changes to my previous code and here's the code:
      class FunctionTableModel extends DefaultTableModel{
           /** The instances who's attribute structure we are reporting */
        //protected InitModel m_init;
        protected String func_element;
        protected int counter;
        protected int counter1;
        //protected String[] func_array;
        protected Vector func_vector;
        /** The flag for whether the instance will be included */
        protected boolean [] m_Sum;
        protected boolean [] m_Min;
        protected boolean [] m_Avg;
        protected boolean [] m_Max;
        protected boolean [] m_SD;
        //protected Vector m_Sum1;
        //protected Vector m_Min1;
        //protected Vector m_Avg1;
        //protected Vector m_Max1;
        //protected Vector m_SD1;
         * Creates the tablemodel with the given set of instances.
         * @param instances the initial set of Instances
        public FunctionTableModel() {
            System.out.println("entered the constr");
          counter =0;
          //counter1=0;
          //m_Sum1 = new Vector();
          //m_Min1 = new Vector();
          //m_Avg1 = new Vector();
          //m_Max1 = new Vector();
          //m_SD1 = new Vector();
          //func_array = new String[];
          func_vector = new Vector();
         public FunctionTableModel(Vector vec) {
            func_vector = vec;
            //setElement(func_vector);
        public Vector getDataVector(){
            return func_vector;
         * Sets the tablemodel to look at a new set of instances.
         * @param instances the new set of Instances.
        public void addRow(Vector vec) {
          //counter++; 
          //func_element = ele;
          //System.out.println("FunctionTableModel- setElement() method");
          for(int i=0;i<vec.size();i++){
            func_vector.add(vec.elementAt(i));
            counter++;  
           //System.out.println("counter ="+counter+new boolean[counter]); 
            //m_Sum1 = m_Sum;
            //m_Min1 = m_Min;
            //m_Avg1 = m_Avg;
            //m_Max1 = m_Max;
            //m_SD1 = m_SD;
            //m_Sum = new boolean[counter];
            //System.out.println("at setElement");
            m_Sum = new boolean[counter];
            //System.out.println(counter);
            m_Min = new boolean[counter];
            //m_Min;
            m_Avg = new boolean[counter];
            //m_Avg1 = m_Avg;
            m_Max = new boolean[counter];
            //m_Max1 = m_Max;
            m_SD = new boolean[counter];
            //m_SD1 = m_SD;
            //counter1++;
          //func_array[counter]=ele;
          //func_vector.add(counter,ele);
          fireTableDataChanged();  
         * Gets the number of attributes.
         * @return the number of attributes.
        //public int getRowCount() {
          //System.out.println("FunctionTableModel- getRowCount() method");
          //return func_vector.size();
         * Gets the number of columns: 3
         * @return 3
        public int getColumnCount() {
          return 6;
         * Gets a table cell
         * @param row the row index
         * @param column the column index
         * @return the value at row, column
        public Object getValueAt(int row, int column) {
          switch (column) {
          case 0:
            return func_vector.elementAt(row);
          case 1:{
            //System.out.println("in case 1");
            //Boolean m_Sum_Value = new Boolean(m_Sum[row]);
            //System.out.println("m_Sum_Value:"+m_Sum_Value.booleanValue());
            return new Boolean(m_Sum[row]);
            //m_Sum1.add(m_Sum_Value);
            //return m_Sum_Value;
          case 2:
            return new Boolean(m_Min[row]);
          case 3:
            return new Boolean(m_Avg[row]);
          case 4:
            return new Boolean(m_Max[row]);
          case 5:
            return new Boolean(m_SD[row]); 
          default:
            return null;
        public void removeAll(){
            func_vector.removeAllElements();
            //m_Sum1.removeAllElements();
            fireTableDataChanged();
         * Gets the name for a column.
         * @param column the column index.
         * @return the name of the column.
        public String getColumnName(int column) {
          switch (column) {
          case 0:
            return new String("Function Selected");
          case 1:
            return new String("Sum");
          case 2:
            return new String("Min");
          case 3:
            return new String("Avg");
          case 4:
            return new String("Max");
          case 5:
            return new String("SD");   
          default:
         return null;
         * Sets the value at a cell.
         * @param value the new value.
         * @param row the row index.
         * @param col the column index.
        public void setValueAt(Object value, int row, int col) {
          if(col == 0){
            counter++;
            func_vector.add(counter,value.toString());
          if (col == 1) {
            m_Sum[row] = ((Boolean) value).booleanValue();
            //System.out.println("m_Sum length "+m_Sum.length);
            //for(int i=0;i<=row;i++)
            //    System.out.println("m_Sum1 "+i+((Boolean)m_Sum1.elementAt(i)).booleanValue());
            //System.out.println("m_Sum1["+row+"] "+ ((Boolean)m_Sum1.elementAt(row)).booleanValue());
            //    System.out.println("m_Sum["+i+"] "+ m_Sum);
    if (col == 2)
    m_Min[row] = ((Boolean) value).booleanValue();
    if (col == 3)
    m_Avg[row] = ((Boolean) value).booleanValue();
    if (col == 4)
    m_Max[row] = ((Boolean) value).booleanValue();
    if (col == 5)
    m_SD[row] = ((Boolean) value).booleanValue();
    * Gets the class of elements in a column.
    * @param col the column index.
    * @return the class of elements in the column.
    public Class getColumnClass(int col) {
    return getValueAt(0, col).getClass();
    * Returns true if the column is the "selected" column.
    * @param row ignored
    * @param col the column index.
    * @return true if col == 1.
    public boolean isCellEditable(int row, int col) {
    if (col >= 1) {
         return true;
    return false;
    public void removeRow(int row){
    if(row<=func_vector.size()){
    func_vector.removeElementAt(row);
    counter--;
    fireTableDataChanged();
    previouslu i was using the setElement method. now i have replaced with the addRow method...
    but anyways...the control is not going to any of these overridden methods...and none of the elements are added to the table. But i comment of all the addRow, getValueAt, getColumnClass methods...then it's adding rows to the table but with only the first column all the remaiing columns are just empty...
    i am fed up with this...if you observe i have commented out somany lines...becoz i am trying to save my boolean array values into a vector..but that was also in vain...
    i appreciate for ur help...
    thanks
    sri

  • How to apply the constraint ONLY to new rows

    Hi, Gurus:
       I have one question as follows:
       We need to migrate a legacy system to a new production server. I am required to add two columns to every table in order to record who updates the row most recently through triggers, and  I should apply not null constraint to the columns . However, since legacy system already has data for every table, and old data does not have value for the 2 new columns. If we apply the constraint, all of existing rows will raise exception. I wonder if there is possibility to apply the constraint ONLY to new rows to come in future.
    Thanks.
    Sam

       We need to migrate a legacy system to a new production server. I am required to add two columns to every table in order to record who updates the row most recently through triggers, and  I should apply not null constraint to the columns .
    The best suggestion I can give you is that you make sure management documents the name of the person that came up with that hair-brained requirement so they can be sufficiently punished in the future for the tremendous waste of human and database resources they caused for which they got virtually NOTHING in return.
    I have seen many systems over the past 25+years that have added columns such as those: CREATED_DATE, CREATED_BY, MODIFIED_DATE, MODIFIED_BY.
    I have yet to see even ONE system where that information is actually useful for any real purpose. Many systems have application/schema users and those users can modify the data. Also, any DBA can modify the data and many of them can connect as the schema owner to do that.
    Many tables also get updated by other applications or bulk load processes and those processes use generic connections that can NOT be tied back to any particular system.
    The net result is that those columns will be populated by user names that are utterly useless for any auditing purposes.
    If a user is allowed to modify a table they are allowed to modify a table. If you want to track that you should implement a proper security strategy using Oracle's AUDIT functionality.
    Cluttering up ALL, or even many, of your tables with such columns is a TERRIBLE idea. Worse is adding triggers that server no other purpose but capture useless infomation but, because they are PL/SQL cause performance impacts just aggravates the total impact.
    It is certainly appropriate to be concerned about the security and auditability of your important data. But adding columns and triggers such as those proposed is NOT the proper solution to achieve that security.
    Before your organization makes such an idiotic decision you should propose that the same steps be taken before adding that functionality that you should take before the addition of ANY MAJOR structural or application changes:
    1. document the actual requirement
    2. document and justify the business reasons for that requirement
    3. perform testing that shows the impact of that requirement on the production system
    4. determine the resource cost (people, storage, etc) of implementing that requirement
    5. demonstrate how that information will actually be used EFFECTIVELY for some business purpose
    As regards items #1 and #2 above the requirement should be stated in terms of the PROBLEM to be solved, not some preconceived notion of the solution that should be used.
    Your org should also talk to other orgs or other depts in your same org that have used your proposed solution and find out how useful it has been for them. If you do this research you will likely find that it hasn't met their needs at all.
    And in your own org there are likely some applications with tables that already have such columns. Has anyone there EVER used those columns and found them invaluable for identifying and resolving any actual problem?
    If you can't use them and their data for some important process why add them to begin with?
    IMHO it is a total waste of time and resources to add such columns to ALL of your tables. Any such approach to auditing or security should, at most, be limited to those tables with key data that needs to be protected and only then when you cannot implement the proper 'best practices' auditing.
    A migration is difficult enough without adding useless additional requirements like those. You have FAR more important things you can do with the resources you have available:
    1. Capture ALL DDL for the existing system into a version control system
    2. Train your developers on using the version control system
    3. Determining the proper configuration of the new server and system. It is almost a CERTAINTY that settings will get changed and performance will suffer even though you don't think you have changed anything at all.
    4. Validating that the data has been migrated successfully. That can involve extensive querying and comparison to make sure data has not been altered during the migration. The process of validating a SINGLE TABLE is more difficult if the table structures are not the same. And they won't be if you add two columns to every table; every single query you do will have to specify the columns by name in order to EXCLUDE your two new columns.
    5. Validating the performance of the app on the new system. There WILL BE problems where things don't work like they used to. You need to find those problems and fix them
    6. Capturing the proper statistics after the data has been migrated and all of the indexes have been rebuilt.
    7. Capturing the new execution plans to use a a baseline for when things go wrong in the future.
    If it is worth doing it is worth doing right.

  • Adding new row to the reports list page

    How can I add a new report row in the reports list of the reports tab.
    Ex: a new row to the report "users by Date of Join report" is to be added
    How can we add Please help me out in this

    I am facing the same problem!
    camickr wrote:
    Try adding an empty row containing a null value for the String instead of the empty String.camickr, it will not help, the DefaultRowSorter in the "*+compare(int model1, int model2)+*" method return -1 if the first value is null and 1 if the sacond value is null. and incase of DESCENDING it mult by -1.
                    // Treat nulls as < then non-null
                    if (v1 == null) {
                        if (v2 == null) {
                            result = 0;
                        } else {
                            result = -1;
                    } else if (v2 == null) {
                        result = 1;
                    } else {
                        result = sortComparators[counter].compare(v1, v2);
                    if (sortOrder == SortOrder.DESCENDING) {
                        result *= -1;
                    }And this is the real problem!
    The empty line is sorted as the smallest value and incase of DESCENDING it will be the first line (because of the mult by -1).
    We could have overide it and incase of the empty row(usualy the last row) do not mult by -1 in DESCENDING mode.
    But the problem is that the "+*compare*+" method and it's caller "*+Row+*" inner class are private :-(
    It is not wise to do it but we can do like kmp83 wrote:
    kmp83  wrote:
    copy/duplicate "private" code from DefaultRowSorter into my extended class.Anyone have another suggestion?

  • Cannot edit a field that is "Standard Report Column" when new row added

    Hi everyone,
    I have created a master-detail form from the wizard and within the detail report region source I have used apex_item.xxx API
    example;
    select C1, C2,
    CASE when C2 ='N' then
    apex_item.select_list_from_query(3, C3,'select a1 d, a2 r from table1', 'ENABLED', 'NO',null,null, 'f03_#ROWNUM#')
    else
    apex_item.select_list_from_query(3, C3,'select a1 d, a2 r from table1', 'DISABLED', 'NO',null,null, 'f03_#ROWNUM#')
    END C3
    from table;
    All columns C1,C2,C3 are defined as "Standard Report Columns".
    The results allows the column C3 field to be enabled or disabled for input depending on a condition.
    The problem is when you hit the default button "Add Row" to add a new row. The row is non-editable and is populated with null values.
    What I want is to allow input when a new row is inserted into the multi-row detail form.
    Can any one help?
    Is there a way to change the Display As field for the new row columns to "text field" from "standard report column" dynamically?

    I think you will need to use the old way of adding rows instead of the new one. I remember having headaches trying to get it working.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • ODI - SCD Type 2 - Insert new row error

    Hi All,
    For Dimension I have a surrogate key, a natural key, and a column with "overwrite on change", start_date, end_date, current_record_ind. When I run the interface with the default SCD Type 2 for SQl server, this runs fine. But when I change that one column from "overwrite on change" to "insert new row", it fails on the update step. What should I be looking for anf fixing.
    Thanks for your time and help.

    DB: SQL Server 2008.
    IKM = IKM MSSQL Slowly Changing Dimension
    Error Message: ODI-1228 - Incorrect syntax near the keyword from.
    Code: update T
    set
    from database.dbo.Dim_type as T,
    database.dbo.I$_Dim_type as S
    where T.Cd = S.Cd
    and T.Current_rec_ind = 1
    and IND_UPDATE = 'U'
    To overcome the issue, I have commented the update code in the Knowledge module and the insert works, but for this one it is ok, but I have requirements where one column needs to be overwritten and other column changes will require to add a new record. How to handle both?
    Thanks for your time.

  • NOOB: Simple button to insert a new row...

    I have a two column database table.
    It is displayed on an interactive report in two columns.
    I want to create a new row via button with the values of "new" "new" in the two fields.
    I was thinking this should be pretty simple however have not found the right example online to how to achieve this.
    Thanks
    Rob
    Edited by: bostonmacosx on Jun 8, 2012 1:40 PM

    Normally you would add a "New" button to the IA report and redirect to a form page in which you can add a new record.
    So steps are :
    1. Create a form on this table so you can add and edit records on this table
    2. Create a "New" button on your IA report which redirects to this page.
    Regards,
    Bas

  • Add new row in the same page

    Can anyone give me the code for adding the new row in the same page itself.If we click on add button a new row should come in the table.
    Thanks in advance

    Hi,
    invoke a method in AM on button click
    public void addrows()
    AddressesVOImpl vo1 = getAAddressesVO1();
    AddressesVORowImpl row1 = (AddressesVORowImpl)vo1.createRow();
    vo1.insertRowAtRangeIndex(0,row1);
    vo1.setCurrentRow(row1);
    Thanks,
    Gaurav

  • Editable ALV with New Row and Save

    Hi Experts,
      I created an ALV report which is editable, add a New Row with SAVE options.
    Problem is: when i try to save the changes using SAVE button in the application tool bar for the coloumn in the specific row, the event is not triggered and the changes were not available. However if i press Enter and then the SAVE the changes were available and i am able to update it.
    I do not want to press ENTER after doing the changes, All i want is to press SAVE to save my changes.(one click)
    How can I do that? Thanks.

    Thanks satish,
    From the thread,
    We have to either press return key (enter) or switch between cells. But the problem here is with the user, they do not want to do it either way. All they want is to press the save button in the application tool bar after the data is changed in the cell.
    Any inputs will be greatly appreicated.
    Thank you.

  • How do I add a new row to an AbstractTableModel?

    I'm having an issue with adding new data to a table row. Every row I add contains the same data which is always the last data I grabbed from my database. I'm not sure if my issue has to do with how I set up the data to be passed or the table itself or both... Any help would be appreciated. It seems like the tablemodel is holding the memory spot ArrayList I'm passing. If I have to set up an arraylist of arraylists, to pass how do I do that?
    My output is always:
    1,4,Laser,10,120,100
    1,4,Laser,10,120,100
    1,4,Laser,10,120,100
    1,4,Laser,10,120,100
    Desired output:
    1,1,Beam,10,99,100
    1,2,Canon,10,120,100
    1,3,Missile,10,66,100
    1,4,Laser,10,120,100
         * Extract weaponIDs by hullType from weapon database
    private void setWeapons(int hullType){
    // equpModel is the tableModel
        equipModel.clearTable();
        Weapon tempWeapon = new Weapon();
        ArrayList newData = new ArrayList();
        for (Iterator <Weapon> i = dataBaseManager.weaponList.iterator(); i.hasNext(); ){
            tempWeapon = i.next();
            if (tempWeapon.weaponClass == hullType){
                newData.add(0,1);
                newData.add(1,tempWeapon.weaponID);
                newData.add(2,tempWeapon.weaponName);
                newData.add(3,tempWeapon.weaponCps);
                newData.add(4,tempWeapon.weaponMass);
                newData.add(5,tempWeapon.weaponCost);
                equipModel.insertRow(newData);
    }Here is a snipet from the table class
    public class GenTableModel extends AbstractTableModel {
      private ArrayList data; // Holds the table data
      private String[] columnNames; // Holds the column names.
       * Constructor: Initializes the table structure, including number of columns
       * and column headings. Also initializes table data with default values.
       * @param columnscolumns[] array of column titles.
       * @param defaultvdefaultv array of default value objects, for each column.
       * @param rowsrows number of rows initially.
      public GenTableModel(String[] columns, Object[] defaultv, int rows) {
        // Initialize number of columns and column headings
        columnNames = new String[ columns.length ];
        for(int i = 0; i < columns.length; i++) {
          columnNames [ i ] = new String(columns [ i ]);
        // Instantiate Data ArrayList, and fill it up with default values
        data = new ArrayList();
        for(int i = 0; i < rows; i++) {
          ArrayList cols = new ArrayList();
          for(int j = 0; j < columns.length; j++) {
            cols.add(defaultv [ j ]);
          data.add(cols);
       * Adds a new row to the table.
       * @param newrowArrayList new row data
      public void insertRow(ArrayList newrow) {     
        data.add(newrow);
        super.fireTableDataChanged();
       * Clears the table data.
      public void clearTable() {
        data = new ArrayList();
        super.fireTableDataChanged();
    }

    Hi thanks again for responding
    Here is the Initialization, including the panel and scrollpane it sits on.
          // Table attempt
            JPanel tablePanel = new JPanel(new BorderLayout());
            tablePanel.setBounds(PANEL_X+2*PANEL_DISTANCE, PANEL_Y, PANEL_WIDTH+300, PANEL_HEIGHT);
            title = BorderFactory.createTitledBorder(blackLine, "Table List");
            tablePanel.setBorder(title);
    // This is column tile plus one dummy initilization set.
            String[] columnNames = {"DB", "ID", "Name", "CPS", "Energy", "Mass", "Cost"};
            Object[] data = {new Integer(0),new Integer(0), "Empty", new Integer(0),
                        new Integer(0),new Integer(0),new Integer(0)};
    // here is the GenTableModel creation
            equipModel = new GenTableModel(columnNames, data, 1);
            equipmentTable = new JTable(equipModel);
            equipmentTable.setRowSelectionAllowed(true);
            equipmentTable.setFillsViewportHeight(true);
            equipmentTable.setColumnSelectionAllowed(false);
            TableColumn column = null;
            column = equipmentTable.getColumnModel().getColumn(0);
            column.setPreferredWidth(20);
            column = equipmentTable.getColumnModel().getColumn(1);
            column.setPreferredWidth(20);
            JScrollPane scrollPane = new JScrollPane(equipmentTable);
            tablePanel.add(scrollPane);
            add(tablePanel);
        Here is the full code for GenTableModel. It is as you guessed.
    public class GenTableModel extends AbstractTableModel {
      private ArrayList data; // Holds the table data
      private String[] columnNames; // Holds the column names.
      public GenTableModel(String[] columns, Object[] defaultv, int rows) {
        // Initialize number of columns and column headings
        columnNames = new String[ columns.length ];
        for(int i = 0; i < columns.length; i++) {
          columnNames [ i ] = new String(columns [ i ]);
        // Instantiate Data ArrayList, and fill it up with default values
        data = new ArrayList();
        for(int i = 0; i < rows; i++) {
          ArrayList cols = new ArrayList();
          for(int j = 0; j < columns.length; j++) {
            cols.add(defaultv [ j ]);
          data.add(cols);
      public int getColumnCount() {
        return columnNames.length;
      public int getRowCount() {
        return data.size();
      public String getColumnName(int col) {
        return columnNames [ col ];
      public Object getValueAt(int row, int col) {
        ArrayList colArrayList = (ArrayList) data.get(row);
        return colArrayList.get(col);
      public Class getColumnClass(int col) {
        // If value at given cell is null, return default class-String
        return getValueAt(0, col) == null ? String.class
                                          : getValueAt(0, col).getClass();
      public void setValueAt(Object obj, int row, int col) {
        ArrayList colArrayList = (ArrayList) data.get(row);
        colArrayList.set(col, obj);
      public void insertRow(ArrayList newrow) {     
        data.add(newrow);
        super.fireTableDataChanged();
      public void deleteRow(int row) {
        data.remove(row);
        super.fireTableDataChanged();
      public void deleteAfterSelectedRow(int row) {
        int size = this.getRowCount();
        int n = size - (row + 1);
        for(int i = 1; i <= n; i++) {
          data.remove(row + 1);
        super.fireTableDataChanged();
      public ArrayList getRow(int row) {
        return (ArrayList) data.get(row);
      public void updateRow(ArrayList updatedRow, int row) {
        data.set(row, updatedRow);
        super.fireTableDataChanged();
      public void clearTable() {
        data = new ArrayList();
        super.fireTableDataChanged();
    }

Maybe you are looking for

  • Anchor Link for an Image

    Hi There I am trying to create an anchor link in a site that I have built and need it to link to an image rather than a piece of text.  Does anyone know how you do this please I am using CS4 - thanks. G (Question - are Chocolate Chip Cookies bad for

  • Not working in jspx page

    Hi., I am using jdev11.1.5 I had created a EO [Finyear] with that corresponding VO I had created a VO [finperiod VO name] using read only Querry with the given querry select distinct fp_bu,fp_year,fp_period, decode(gdh_status,'R','Yes','No') distribu

  • Don't get any search engines when installing or update Firefox on XP

    After update to Firefox 35.0.1 I no longer get any serch engines. I only get a document icon and when I use the pull down the list of installed serch engines is empty. I have tried to find more engines but nothing happens. I have tried o install vers

  • Select Single Vs Select upto 1 row

    Hi All, Please tell me which of the two statements is better if we want to retrieve only one record from a table. Select single or Select upto 1 rows? Regards, Saurabh

  • Displaying real-time data using gui meter from multiple channels.

    I am using DAQ USB-6009 for my assignment. Part of my task is to display real-data from multiple channels in the form of gui meters.  eg. irradiance and voltage... I used a split signal to separate the signals from different channels coming out of th