Adding new data row(s) to DataGrid control

My requirement is to provide the ability to add a new row to
the datagrid when tabbed out of the (last cell of the last row of
the datagrid. I have made my datagrid editable and in the
'itemEditEnd' handler I am adding a new object (with empty values)
to the data provider for the Grid and setting focus to the Grid and
then setting the new row index as the Selected Index for the Grid.
None of this activating itemEditor for the first cell of the new
row.
I have seen somewhere that dispatching the itemEditBeginning
will do this for me. But not sure how to do this. Appreciate if can
point me to a sample woring example.

Perfect - Have been looking for a solution since few days.
You just made my day. Thank you so much.

Similar Messages

  • TableSorter errors when adding new data

    so here is the deal:
    I am using the TableSorter.java helper class with DefaultTableModel
    from: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    It works great when the data is static and I get it for the first time. however, occationally, when adding new data I get a NullPointerException error.
    in use:
    DefaultTableModel.addRow()
    DefaultTableModel.removeRow() and
    DefaultTableModel.insertRow() methods.
    Error:
    java.lang.ArrayIndexOutOfBoundsException: 5
         at com.shared.model.TableSorter.modelIndex(TableSorter.java:294)
         at com.shared.model.TableSorter.getValueAt(TableSorter.java:340)
         at javax.swing.JTable.getValueAt(Unknown Source)
         at javax.swing.JTable.prepareRenderer(Unknown Source)...
    code problem I:
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        }code problem II:
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        }TableSroter class:
    package com.shared.model;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.List;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    * TableSorter is a decorator for TableModels; adding sorting
    * functionality to a supplied TableModel. TableSorter does
    * not store or copy the data in its TableModel; instead it maintains
    * a map from the row indexes of the view to the row indexes of the
    * model. As requests are made of the sorter (like getValueAt(row, col))
    * they are passed to the underlying model after the row numbers
    * have been translated via the internal mapping array. This way,
    * the TableSorter appears to hold another copy of the table
    * with the rows in a different order.
    * <p/>
    * TableSorter registers itself as a listener to the underlying model,
    * just as the JTable itself would. Events recieved from the model
    * are examined, sometimes manipulated (typically widened), and then
    * passed on to the TableSorter's listeners (typically the JTable).
    * If a change to the model has invalidated the order of TableSorter's
    * rows, a note of this is made and the sorter will resort the
    * rows the next time a value is requested.
    * <p/>
    * When the tableHeader property is set, either by using the
    * setTableHeader() method or the two argument constructor, the
    * table header may be used as a complete UI for TableSorter.
    * The default renderer of the tableHeader is decorated with a renderer
    * that indicates the sorting status of each column. In addition,
    * a mouse listener is installed with the following behavior:
    * <ul>
    * <li>
    * Mouse-click: Clears the sorting status of all other columns
    * and advances the sorting status of that column through three
    * values: {NOT_SORTED, ASCENDING, DESCENDING} (then back to
    * NOT_SORTED again).
    * <li>
    * SHIFT-mouse-click: Clears the sorting status of all other columns
    * and cycles the sorting status of the column through the same
    * three values, in the opposite order: {NOT_SORTED, DESCENDING, ASCENDING}.
    * <li>
    * CONTROL-mouse-click and CONTROL-SHIFT-mouse-click: as above except
    * that the changes to the column do not cancel the statuses of columns
    * that are already sorting - giving a way to initiate a compound
    * sort.
    * </ul>
    * <p/>
    * This is a long overdue rewrite of a class of the same name that
    * first appeared in the swing table demos in 1997.
    * @author Philip Milne
    * @author Brendon McLean
    * @author Dan van Enckevort
    * @author Parwinder Sekhon
    * @version 2.0 02/27/04
    public class TableSorter extends AbstractTableModel
        protected TableModel tableModel;
        public static final int DESCENDING = -1;
        public static final int NOT_SORTED = 0;
        public static final int ASCENDING = 1;
        private static Directive EMPTY_DIRECTIVE = new Directive(-1, NOT_SORTED);
        public static final Comparator COMPARABLE_COMAPRATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return ((Comparable) o1).compareTo(o2);
        public static final Comparator LEXICAL_COMPARATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return o1.toString().compareTo(o2.toString());
        private Row[] viewToModel;
        private int[] modelToView;
        private JTableHeader tableHeader;
        private MouseListener mouseListener;
        private TableModelListener tableModelListener;
        private Map columnComparators = new HashMap();
        private List sortingColumns = new ArrayList();
        public TableSorter()
            this.mouseListener = new MouseHandler();
            this.tableModelListener = new TableModelHandler();
        public TableSorter(TableModel tableModel)
            this();
            setTableModel(tableModel);
        public TableSorter(TableModel tableModel, JTableHeader tableHeader)
            this();
            setTableHeader(tableHeader);
            setTableModel(tableModel);
        private void clearSortingState()
            viewToModel = null;
            modelToView = null;
        public TableModel getTableModel()
            return tableModel;
        public void setTableModel(TableModel tableModel)
            if (this.tableModel != null)
                this.tableModel.removeTableModelListener(tableModelListener);
            this.tableModel = tableModel;
            if (this.tableModel != null)
                this.tableModel.addTableModelListener(tableModelListener);
            clearSortingState();
            fireTableStructureChanged();
        public JTableHeader getTableHeader()
            return tableHeader;
        public void setTableHeader(JTableHeader tableHeader)
            if (this.tableHeader != null)
                this.tableHeader.removeMouseListener(mouseListener);
                TableCellRenderer defaultRenderer = this.tableHeader.getDefaultRenderer();
                if (defaultRenderer instanceof SortableHeaderRenderer)
                    this.tableHeader.setDefaultRenderer(((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
            this.tableHeader = tableHeader;
            if (this.tableHeader != null)
                this.tableHeader.addMouseListener(mouseListener);
                this.tableHeader.setDefaultRenderer
                        new SortableHeaderRenderer(this.tableHeader.getDefaultRenderer())
        public boolean isSorting()
            return sortingColumns.size() != 0;
        private Directive getDirective(int column)
            for (int i = 0; i < sortingColumns.size(); i++)
                Directive directive = (Directive)sortingColumns.get(i);
                if (directive.column == column)
                    return directive;
            return EMPTY_DIRECTIVE;
        public int getSortingStatus(int column)
            return getDirective(column).direction;
        private void sortingStatusChanged()
            clearSortingState();
            fireTableDataChanged();
            if (tableHeader != null)
                tableHeader.repaint();
        public void setSortingStatus(int column, int status)
            Directive directive = getDirective(column);
            if (directive != EMPTY_DIRECTIVE)
                sortingColumns.remove(directive);
            if (status != NOT_SORTED)
                sortingColumns.add(new Directive(column, status));
            sortingStatusChanged();
        protected Icon getHeaderRendererIcon(int column, int size)
            Directive directive = getDirective(column);
            if (directive == EMPTY_DIRECTIVE)
                return null;
            return new Arrow(directive.direction == DESCENDING, size, sortingColumns.indexOf(directive));
        private void cancelSorting()
            sortingColumns.clear();
            sortingStatusChanged();
        public void setColumnComparator(Class type, Comparator comparator)
            if (comparator == null)
                columnComparators.remove(type);
            else
                columnComparators.put(type, comparator);
        protected Comparator getComparator(int column)
            Class columnType = tableModel.getColumnClass(column);
            Comparator comparator = (Comparator) columnComparators.get(columnType);
            if (comparator != null)
                return comparator;
            if (Comparable.class.isAssignableFrom(columnType))
                return COMPARABLE_COMAPRATOR;
            return LEXICAL_COMPARATOR;
        private Row[] getViewToModel()
            if (viewToModel == null)
                int tableModelRowCount = tableModel.getRowCount();
                viewToModel = new Row[tableModelRowCount];
                for (int row = 0; row < tableModelRowCount; row++)
                    viewToModel[row] = new Row(row);
                if (isSorting())
                    Arrays.sort(viewToModel);
            return viewToModel;
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        private int[] getModelToView()
            if (modelToView == null)
                int n = getViewToModel().length;
                modelToView = new int[n];
                for (int i = 0; i < n; i++)
                    modelToView[modelIndex(i)] = i;
            return modelToView;
        // TableModel interface methods
        public int getRowCount()
            return (tableModel == null) ? 0 : tableModel.getRowCount();
        public int getColumnCount()
            return (tableModel == null) ? 0 : tableModel.getColumnCount();
        public String getColumnName(int column)
            return tableModel.getColumnName(column);
        public Class getColumnClass(int column)
            return tableModel.getColumnClass(column);
        public boolean isCellEditable(int row, int column)
            return tableModel.isCellEditable(modelIndex(row), column);
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        public void setValueAt(Object aValue, int row, int column)
            tableModel.setValueAt(aValue, modelIndex(row), column);
        // Helper classes
        private class Row implements Comparable
            private int modelIndex;
            public Row(int index)
                this.modelIndex = index;
            public int compareTo(Object o)
                int row1 = modelIndex;
                int row2 = ((Row) o).modelIndex;
                for (Iterator it = sortingColumns.iterator(); it.hasNext();)
                    Directive directive = (Directive) it.next();
                    int column = directive.column;
                    Object o1 = tableModel.getValueAt(row1, column);
                    Object o2 = tableModel.getValueAt(row2, column);
                    int comparison = 0;
                    // Define null less than everything, except null.
                    if (o1 == null && o2 == null)
                        comparison = 0;
                    } else if (o1 == null)
                        comparison = -1;
                    } else if (o2 == null)
                        comparison = 1;
                    } else {
                        comparison = getComparator(column).compare(o1, o2);
                    if (comparison != 0)
                        return directive.direction == DESCENDING ? -comparison : comparison;
                return 0;
        private class TableModelHandler implements TableModelListener
            public void tableChanged(TableModelEvent e)
                // If we're not sorting by anything, just pass the event along.            
                if (!isSorting())
                    clearSortingState();
                    fireTableChanged(e);
                    return;
                // If the table structure has changed, cancel the sorting; the            
                // sorting columns may have been either moved or deleted from            
                // the model.
                if (e.getFirstRow() == TableModelEvent.HEADER_ROW)
                    cancelSorting();
                    fireTableChanged(e);
                    return;
                // We can map a cell event through to the view without widening            
                // when the following conditions apply:
                // a) all the changes are on one row (e.getFirstRow() == e.getLastRow()) and,
                // b) all the changes are in one column (column != TableModelEvent.ALL_COLUMNS) and,
                // c) we are not sorting on that column (getSortingStatus(column) == NOT_SORTED) and,
                // d) a reverse lookup will not trigger a sort (modelToView != null)
                // Note: INSERT and DELETE events fail this test as they have column == ALL_COLUMNS.
                // The last check, for (modelToView != null) is to see if modelToView
                // is already allocated. If we don't do this check; sorting can become
                // a performance bottleneck for applications where cells 
                // change rapidly in different parts of the table. If cells
                // change alternately in the sorting column and then outside of            
                // it this class can end up re-sorting on alternate cell updates -
                // which can be a performance problem for large tables. The last
                // clause avoids this problem.
                int column = e.getColumn();
                if (e.getFirstRow() == e.getLastRow()
                        && column != TableModelEvent.ALL_COLUMNS
                        && getSortingStatus(column) == NOT_SORTED
                        && modelToView != null)
                    int viewIndex = getModelToView()[e.getFirstRow()];
                    fireTableChanged(new TableModelEvent(TableSorter.this,
                                                         viewIndex, viewIndex,
                                                         column, e.getType()));
                    return;
                // Something has happened to the data that may have invalidated the row order.
                clearSortingState();
                fireTableDataChanged();
                return;
        private class MouseHandler extends MouseAdapter
            public void mouseClicked(MouseEvent e)
                JTableHeader h = (JTableHeader) e.getSource();
                TableColumnModel columnModel = h.getColumnModel();
                int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                int column = columnModel.getColumn(viewColumn).getModelIndex();
                if (column != -1)
                    int status = getSortingStatus(column);
                    if (!e.isControlDown())
                        cancelSorting();
                    // Cycle the sorting states through {NOT_SORTED, ASCENDING, DESCENDING} or
                    // {NOT_SORTED, DESCENDING, ASCENDING} depending on whether shift is pressed.
                    status = status + (e.isShiftDown() ? -1 : 1);
                    status = (status + 4) % 3 - 1; // signed mod, returning {-1, 0, 1}
                    setSortingStatus(column, status);
        private static class Arrow implements Icon
            private boolean descending;
            private int size;
            private int priority;
            public Arrow(boolean descending, int size, int priority)
                this.descending = descending;
                this.size = size;
                this.priority = priority;
            public void paintIcon(Component c, Graphics g, int x, int y)
                Color color = c == null ? Color.GRAY : c.getBackground();            
                // In a compound sort, make each succesive triangle 20%
                // smaller than the previous one.
                int dx = (int)(size/2*Math.pow(0.8, priority));
                int dy = descending ? dx : -dx;
                // Align icon (roughly) with font baseline.
                y = y + 5*size/6 + (descending ? -dy : 0);
                int shift = descending ? 1 : -1;
                g.translate(x, y);
                // Right diagonal.
                g.setColor(color.darker());
                g.drawLine(dx / 2, dy, 0, 0);
                g.drawLine(dx / 2, dy + shift, 0, shift);
                // Left diagonal.
                g.setColor(color.brighter());
                g.drawLine(dx / 2, dy, dx, 0);
                g.drawLine(dx / 2, dy + shift, dx, shift);
                // Horizontal line.
                if (descending) {
                    g.setColor(color.darker().darker());
                } else {
                    g.setColor(color.brighter().brighter());
                g.drawLine(dx, 0, 0, 0);
                g.setColor(color);
                g.translate(-x, -y);
            public int getIconWidth()
                return size;
            public int getIconHeight()
                return size;
        private class SortableHeaderRenderer implements TableCellRenderer
            private TableCellRenderer tableCellRenderer;
            public SortableHeaderRenderer(TableCellRenderer tableCellRenderer)
                this.tableCellRenderer = tableCellRenderer;
            public Component getTableCellRendererComponent(JTable table,
                                                           Object value,
                                                           boolean isSelected,
                                                           boolean hasFocus,
                                                           int row,
                                                           int column)
                Component c = tableCellRenderer.getTableCellRendererComponent(table,
                        value, isSelected, hasFocus, row, column);
                if (c instanceof JLabel) {
                    JLabel l = (JLabel) c;
                    l.setHorizontalTextPosition(JLabel.LEFT);
                    int modelColumn = table.convertColumnIndexToModel(column);
                    l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
                return c;
        private static class Directive
            private int column;
            private int direction;
            public Directive(int column, int direction)
                this.column = column;
                this.direction = direction;
    }any input will be appreciated.
    thanks
    Peter

    The code you posted doesn't help us at all. Its just a duplicate of the code from the tutorial. The custom code is what you have written. For example do you update the TableModel from the Event Thread? Do you update the SortModel or the DefaultTableModel? If you actually provide your test code and somebody has already downloaded the sort classes, then maybe they will test your code against the classes. But I doubt if people will download the sort classes and create a test program just to see if they can duplicate your results (at least I know I'm not about to).

  • Adding new date field to already loaded data target.

    Hi,
        we have a cube containing date feild such as 0CALMONTH. the data is being loaded to the cube. now they have added new date feild (0FISCYEAR). how to get data to this feild. there is no data coming from source system for this feild. please can any one tell me how to include this feild and load data into it.
    with regards,
    sreekanth.

    Sreekanth,
       If Record creation date is the right field for deriving fiscal year, Why cant you derive the year from the date...by using automatioc time conversion...?? In update rules...??
      For exising data, you can do loop back to populate the data. see the below doc, for more info:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f421c86c-0801-0010-e88c-a07ccdc69601
    Hope it Helps
    Srini
    Message was edited by: Srini

  • Adding new data to update multiple series in charts - in one action

    I would like to know how to update a data series range in a chart all at once as can be achieved with Excel by
    manually entering row numbers to expand the data series range or
    by dragging a reference frame in a table to include additional data in the range.
    At present, the only way that I have discovered I can update a series is to manually change the cell reference detail for each series individually. This is achieved by selecting a single line and clicking several times on the Data reference cell in the Inspector Chart option by highlighting the cell reference details and then manually changing the cell reference for each series separately. This is tedious, time consuming and more than a little clumsy! What used to take me a few minutes to update my charts in Excel is taking me tens of minutes in Numbers.

    theguardian wrote:
    I would like to know how to update a data series range in a chart all at once as can be achieved with Excel by
    manually entering row numbers to expand the data series range or
    by dragging a reference frame in a table to include additional data in the range.
    Unless I'm misreading this, similar techniques work in Numbers.
    The original table contained only the sequential labels in column A and the data shown on the upper chart.
    I made two changes, similar to those in your list (but in the opposite order, hence the reversal in my numbering):
    2. Added data to cells B11:B15 (labeled J-N). (The data added is a copy of the first five data from the original series.) Selected the chart, then expanded the data series by dragging the control (small circle) down to include these cell (plus B16) in the charted range. The chart updated to include this data.
    1. Selected B11:B15, then went Table > Add Rows Below (keyboard shortcut: option-down arrow). Numbers added five rows to the table, and updated the chart to include those rows, as shown in the lower version of the chart. Paste the data into these new rows to add it to the chart.
    Although I had selected rows inside the charted range when adding new rows (to keep that "O" label on the x axis and show the 'space' before it), the five rows could as easily have been added to the end of the chart. Select B12:B16, press option-down arrow.
    Regards,
    Barry

  • Adding New Data To Same Page - HELP

    I am trying to put together a invoice on the fly, the products are added to the invoice by selecting the disired product from a drop down menu and hitting the add button. You SHOULD then be able to select more products from the same drop down menu and htting add again will include it in the invoice.... simple?? Well the problem i have is that when i hit the add button to add another item it just replaces the one i have already added.... this is very annoying... i cannot think of a way to take the product data through the form submission ready for adding too.
    Any Ideas this is really bugging me, and the more time i spend on it, the worse its getting. Code Below
    <%@ page buffer="32kb" %>
    <%@ page import="java.sql.*, javax.servlet.ServletException, java.io.IOException, com.stock_control.*" %>
    <%!
    String convertResultsToSelect ( ResultSet rs, String selectName, String idCol, String descCol ) throws SQLException
    StringBuffer sb = new StringBuffer ( "<select name=" + selectName +">" );
    if (rs != null) {
    while (rs.next()) {
              sb.append ( "<option value=" );
    sb.append ( rs.getString(idCol) );
    sb.append ( ">" );
    sb.append ( rs.getString(descCol) );
    sb.append ( "</option>" );
    sb.append ( "</select>" );
    return sb.toString ();
    %>
    <html>
    <head>
    <title>Members Area - Stock Check</title>
    </head>
    <body bgcolor="#CCCCCC" topmargin="0">
    <%@ include file="topConn.jsp" %>
    <%
              String msg = "";
              String name = "";
              String address1 = "";
              String address2 = "";
              String town ="";
              String postcode = "";
              String country = "";
              String phone = "";
              String mail = "";
              String comments = "";
              float total = 0;
              int nextFree = 0;
              String prodResults;
              int numberOfItems = 0;
         String shop = (String)session.getValue("SHOP");
         String selectProd = "SELECT ProductID, ProductName FROM product WHERE ShopID=";
         rs1 = stmt.executeQuery(selectProd+shop);
         prodResults = convertResultsToSelect( rs1, "product","ProductID","ProductName");
         rs = stmt.executeQuery("SELECT COUNT(*) AS stockLevel FROM product WHERE ShopID ="+shop);     
    while(rs.next())
         numberOfItems = rs.getInt("stockLevel");
         Product[] products = new Product[numberOfItems];
    if (request.getParameter("add")!=null)
              // get values from all text boxes....
              name = request.getParameter("name");
              address1 = request.getParameter("address1");
              address2 = request.getParameter("address2");
              town = request.getParameter("town");
              postcode = request.getParameter("postcode");
              country = request.getParameter("country");
              phone = request.getParameter("phone");
              mail = request.getParameter("mail");
              comments = request.getParameter("comments");
                   // add data from dropdown
              String newProduct = request.getParameter("product");
              //connect to database and put product data into array + increment
                   int thenewid = 0;
                   String theName = "";
                   float thePrice = 0;
                   String nono = "0";
              String getProd = "SELECT * FROM product WHERE ProductID=";
              rs = stmt.executeQuery(getProd+newProduct);
              if(rs.next())
                   thenewid = Integer.parseInt(newProduct);
                   theName = rs.getString("ProductName");
                   thePrice = rs.getFloat("SalePrice");
                   Product addProduct = new Product(thenewid, theName, thePrice, nono);
                   products[nextFree] = addProduct; //PROBLEM
                   nextFree++;
    // reload page with new data in form
    //for loop arround array     
    %>
    <form method="GET">
    <div align=center>
    <p>
    <%=prodResults%>
    <input type="submit" value="Add" name="add"></p>
    <TABLE width=100% height="1">
    <TBODY>
    <tr>
    <td width="4%" height="19"> </td>
    <td width="96%" height="19"> 
    </td>
    </tr>
    <tr>
    <td width="4%" height="198"> </td>
    <td width="96%" height="198">
    <div align="center"></div>
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5">
    <tr>
    <td width="4%"> </td>
    <td width="15%"><font face="Verdana" size="2">Customer Name</font></td>
    <td width="30%"><input type="text" name="name" size="30" value="<%=name%>"></td>
    <td width="19%"><font face="Verdana" size="2">Customer Phone #</font></td>
    <td width="26%"><input name="phone" type="text" size="30" value="<%=phone%>"></td>
    <td width="6%"> </td>
    </tr>
    <tr>
    <td> </td>
    <td><font face="Verdana" size="2">Address Line 1</font></td>
    <td><input type="text" name="address1" size="40" value="<%=address1%>"></td>
    <td><font face="Verdana" size="2">Customer E-mail</font></td>
    <td><input name="mail" type="text" size="30" value="<%=mail%>"></td>
    <td> </td>
    </tr>
    <tr>
    <td height="32"> </td>
    <td><font face="Verdana" size="2">Address Line 2</font></td>
    <td> </td>
    <td><font face="Verdana" size="2">Comments</font></td>
    <td width="26%" rowspan="5"><p>
    <textarea name="comments" cols="29" rows="5"><%=comments%></textarea>
    </p>
    <p>  </p></td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td><font size="2" face="Verdana">Town/City</font></td>
    <td><input name="town" type="text" size="40" value="<%=town%>">
    <input name="address2" type="text" size="40" value="<%=address2%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td><font size="2" face="Verdana">Post Code</font></td>
    <td><input type="text" name="postcode" size="10" value="<%=postcode%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td><font size="2" face="Verdana">Country</font></td>
    <td><input type="text" name="country" size="40" value="<%=country%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td height="24"> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td height="23"> </td>
    <td><strong><font size="2" face="Verdana">Product Code</font></strong></td>
    <td><strong><font size="2" face="Verdana">Name</font></strong></td>
    <td><strong><font size="2" face="Verdana">Price</font></strong></td>
    <td> </td>
    <td> </td>
    </tr>
    <%
    if (request.getParameter("add")!=null)
    for(int i=0; i<nextFree; i++)
    Product temp = products;
    int prodID = temp.getid();
    String prodName = temp.getname();
    float prodPrice = temp.getprice();
    total = total + prodPrice;
    // work out total on the fly
    %>
    <tr>
    <td height="23"> </td>
    <td> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=prodID%> </font></td>
    <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=prodName%></font></td>
    <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&pound;<%=prodPrice%></font></td>
    <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
    <td> </td>
    </tr>
    <%
    %>
    <tr>
    <td width="4%" height="23"> </td>
    <td width="15%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
    <td width="30%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
    <td width="19%"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Total:</font></strong></td>
    <td width="26%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=total%></font></td>
    <td width="6%"> </td>
    </tr>
    </table>
    <p align="center">
    <input type="submit" value="Continue" name="continue">
              </form>
    </p>
    </td> </tr> </TBODY></table>
    <%@ include file="bottomConn.jsp" %>
    </body>
    </html>

    anyone?

  • Data Guard adding new data files to a tablespace.

    In the past, if you were manually updating an Oracle physical standby database there were issues with adding a data file to a tablespace. It was suggested that the data file should be created small and then the small physical file copied to the standby database. Once the small data file was in place it would be resized on the primary database then the repication would change the size on the standby.
    My question is, does Data Guard take care of this automaticlly for a physical standby? I can't find any specific reference on how it handles a new datafile.

    Never mind, I found the answer.
    STANDBY_FILE_MANAGEMENT=auto
    Set on the standby database will create the datafiles.

  • Adding New Data To Line Chart: New Data Does Not Inherit Previous Color Scheme

    This has me very confused. Here's what's being done:
    Right-click on existing chart
    Select "Data..."
    Add additional data in the dialog that pops up
    Click check-mark
    The chart appends more data to the existing lines on the line chart, as it should, however the newly created portion of one of the lines (new data) is not the same color as the line up to that point. The line color is #0084A9, but when the new data is entered the new data on that same line is represented in an ever so slightly darker blue.
    Any guesses as to why that would be happening? I can manually chage it, but that's a hassle and shouldn't necessary - I wouldn't think, anyway. Any help would be appreciated.
    Thanks!
    Very Best,
    Tanner Campbell

    OK looked at this closer, and seen your problem  as  acolor shift from PMS to a CMYK that was slightly off.
    If you want to work with Hexadecimal colors, then you need to File>> Document Color Mode >> RGB, otherwise your colors won't stick but convert to cmyk and be off.
    Your graph went through some editing and got corrupted. I copied and pasted your date into a new graph, and then used the testube to apply samples to get your colors back. Will send you an email with fixed file.
    That’s the strangest thing.  The color you’re seeing is #4e46ff, the color it should be is the color reflected in the legend: #0083a9
    What’s extra interesting is that when I open it I see the legend color for the entire line. Then, when I add data, the section of the line that depicts the newly added data is #4e46ff …. So I have this two tone line.  It’s intriguing that you opened this on a mac and this difference was presence, I wonder if that is in anyway a clue. Maybe the original document was created in RGB and the new data is on CMYK? Thoughts?

  • Adding new Data Object while migrating from MI 2.5 to NM7.1

    Dear All,
          We have a custom MI 2.5 application which we need to migrate to 7.1. While migration, we want to add a newly created data object also in migrated application. But when I try to import MBO model, it is not letting me import new data object. The import finishes successfully. But changes in merepmeta.xml are not done. It creates a file with back up of existing merepmeta.xml i.e. merepmeta.xml.bak and create new merepmeta.xml but it is blank. Am I missing something???
           When I import MBO only with existing data objects (syncbos), it is allowing me perfectly. It is changing the merepmeta.xml accordingly as well without creating backup.
    Thanks in advance,
    Saptak Kulkarni.

    Dear Arjun,
         To answer your questions, previously all the SyncBOs were downloaded independently taking username as the import parameter in getList. (Default values). Yes we can provide the same with 7.1 but we wanted to have some sorts of associations between all SyncBOs.
         So first of all, we changed all the BAPI wrappers of old SyncBOs to download all the data independent of user. Now we created new Data Object to only download user specific data. We associated all other Data Objects on this DO. Created a rule for this data object to only download the sync user instance. We were expecting that whenever a user syncs, a single instance of new user data object will get downloaded and subsequently all other data objects having relationship on user will get downloaded. I hope this is not much confusing.
          Now while we import the MBO model, if we don't import new user data object, then also other data object instance get downloaded and fortunately properly filtered. We don't receive any kind of error over here.
          The new data object is not used anywhere in the application. The associations are in new data object and not in the older one. New data object is the leading one wherein others follow.
          Not a single instance is getting dropped for other Data Objects.
          The xml is blank only when we try to import the new Data Object and correctly it gives an error as expected when I try to deploy the application.
    Thanks in advance,
    Saptak.

  • Adding new data elements to Org Modeler.

    We are trying to add 4 fields to the org Modeler. However it is nowhere to be found like in the orgchart.
    Org Modeler 3.0 SP2
    PA0001, PA0008, HRP1005 and HRP1008. (also linking to the texts in T001P, so we will require a table inner join)

    Hi Wade,
    In order to get the fields in OrgModeler scenarios you need to make sure that your hierarchy data element in the Source OrgChart contains all fields that you want. For this I recommend creating a NakisaRFC function for the additional data, creating a data element for it and then creating a linked data element to link together the new data element and the existing hierarchy data element. There is no data center in OrgModeler so you will need to do this manually.
    Best regards,
    Luke

  • Adding new data to a notification

    Hi everyone,
    I have a requirement to modify an approval notification and add some new data to it. On the internet I have found examples of how to embed an OA Framework region into a workflow notification. For example here - http://www.oraclearea51.com/oracle-technical-articles/64-oaf-beginners-guide/232-oaf-and-workflow-jrad-notification-oaf-region-embedded-in-notification.html.
    The truth is, my knowledge of OA Framework is very sketchy but I hear there is a method to do this using PL/SQL. I think I will be more comfortable with that for now.
    Is there a tutorial on the net to do this or can anyone point me to a way to achieving this in my workflow notification?
    Many thanks

    Hi,
    You need to use a PL/SQL document if you don't want to use an OA framework region.
    1 - define an item attribute of type document. Set this to PLSQL:<code to call>/<document ID>, or PLSQLCLOB:<code to call>/<document ID> depending on whether you are going to return up to 32k of text or more than that.
    Typically, the document ID is set to <item type>:<item key> so that you can programatically split it into the type and key to link back to the Workflow process and retrieve any attributes that you want to using the standard APIs.
    2 - Define the code, according to the standard signature for document APIs
    procedure <procedure name> (document_id in varchar2,
    display_type in varchar2,
    document in out varchar2,
    document_type in out varchar2)
    or
    procedure <procedure name> (document_id in varchar2,
    display_type in varchar2,
    document in out clob,
    document_type in out varchar2)
    3 - In your code, build the content that you want to, either as text or HTML depending on the display type that is passed in. Add that to the document variable that you are returning.
    For more information, look in the Oracle Workflow Developer's Guide, Release 2.6.3.5 - Part Number B12161-02 which can be found here: http://download.oracle.com/docs/cd/B14099_19/integrate.1012/b12161/deffa04.htm
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://www.workflowfaq.com/blog ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • Coredump when adding new data to a document

    Hi,
    I have managed to get a coredump when adding data to a document,
    initially using the Python API but I can reproduce it with a dbxml script.
    I am using dbxml-2.2.13 on RedHat WS 4.0.
    My original application reads XML data from files, and adds them
    one at a time to a DbXML document using XmlModify.addAppendStep
    and XmlModify.execute. At a particular document (call it "GLU.xml") it
    segfaults during the XmlModify.execute call. It is not malformed data in
    the file, because if I remove some files that are loaded at an earlier stage,
    GLU.xml is loaded quite happily and the segfault happens later. Changing
    my application so that it exits just before reading GLU.xml, and loading GLU.xml's
    data into the container file using the dbxml shell's "append" command produces
    the same segfault. The stacktrace is below. Steps #0 to #7 inclusive are the
    same as the stacktrace I got when using the Python API.
    Can anyone give me any suggestions? I could send the dbxml container file and
    dbxml script to anyone who would be prepared to take a look at this problem.
    Regards,
    Peter.
    #0  ~NsEventGenerator (this=0x9ea32f8) at NsEventGenerator.cpp:110
    110                     _freeList = cur->freeNext;
    (gdb) where
    #0  ~NsEventGenerator (this=0x9ea32f8) at NsEventGenerator.cpp:110
    #1  0x009cacef in DbXml::NsPullToPushConverter8::~NsPullToPushConverter8$delete ()
        at /scratch_bernoulli/pkeller/dbxml-2.2.13/install/include/xercesc/framework/XMLRefInfo.hpp:144
    #2  0x00a5d03c in DbXml::NsDocumentDatabase::updateContentAndIndex (this=0x96b7a60,
        new_document=@0x96e3608, context=@0x96a3fc8, stash=@0x96a4098) at ../scoped_ptr.hpp:44
    #3  0x009a71b1 in DbXml::Container::updateDocument (this=0x96a71d0, txn=0x0, new_document=@0x96e3608,
        context=@0x96a3fc8) at shared_ptr.hpp:72
    #4  0x009b8465 in UpdateDocumentFunctor::method (this=0xb7d3a008, container=@0x96a71d0, txn=0x0, flags=0)
        at TransactedContainer.cpp:167
    #5  0x009b70c5 in DbXml::TransactedContainer::transactedMethod (this=0x96a71d0, txn=0x0, flags=0,
        f=@0xbff66500) at TransactedContainer.cpp:217
    #6  0x009b71e4 in DbXml::TransactedContainer::updateDocument (this=0x96a71d0, txn=0x0,
        document=@0x96e3608, context=@0x96a3fc8) at TransactedContainer.cpp:164
    #7  0x009d7616 in DbXml::Modify::updateDocument (this=0x96c1748, txn=0x0, document=@0xbff665b0,
        context=@0xbff669dc, uc=@0xbff669e4)
        at /scratch_bernoulli/pkeller/dbxml-2.2.13/dbxml/build_unix/../dist/../include/dbxml/XmlDocument.hpp:72
    #8  0x009d9c18 in DbXml::Modify::execute (this=0x96c1748, txn=0x0, toModify=@0x96a7280,
        context=@0xbff669dc, uc=@0xbff669e4) at Modify.cpp:743
    #9  0x009c1c35 in DbXml::XmlModify::execute (this=0xbff666c0, toModify=@0x96a7280, context=@0xbff669dc,
        uc=@0xbff669e4) at XmlModify.cpp:128
    #10 0x08066bda in CommandException::~CommandException ()
    #11 0x0805f64e in CommandException::~CommandException ()
    #12 0x08050c82 in ?? ()
    #13 0x00705de3 in __libc_start_main () from /lib/tls/libc.so.6
    #14 0x0804fccd in ?? ()
    Current language:  auto; currently c++

    Hi George,
    I can get the coredump with the following XML data (cut down from its original
    size of around 900Kb):
    <file name="GLU.xml">
    <_StorageUnit time="Wed Apr  5 11:06:49 2006" release="1.0.212"
    packageName="ccp.ChemComp" root="tempData" originator="CCPN Python XmlIO">
    <parent>
      <key1 tag="molType">protein</key1>
      <key2 tag="ccpCode">GLU</key2>
    </parent>
    <StdChemComp ID="1" code1Letter="E" stdChemCompCode="GLU" molType="protein" ccpCode="GLU" code3Letter="GLU" msdCode="GLU_LFOH" cifCode="GLU" merckCode="12,4477">
      <name>GLUTAMIC ACID</name>
      <commonNames>L-glutamic acid</commonNames>
    </_StorageUnit>
    <!--End of Memops Data-->
    </file>This happens when the data from 106 other files have been inserted beforehand
    (ranging in size from 1Kb to 140Kb). If I manipulate the order so that the above data
    is loaded earlier in the sequence, it inserts fine and I get the coredump when
    loading data from a different file.
    The actual XmlModify calls look something like:
      qry = mgr.prepare("/datapkg/dir[@name='dir1']/dir[@name='dir2']", qc)
      mdfy.addAppendStep(qry, XmlModify.Element, "",
                         '<file name='" + fileName + '">' +
                          data[pos:] + "</file>")
      mdfy.execute(XmlValue(doc), qc, uc)where data[pos:] points to the location in the mmap-ed file containing the
    above data just after the <?xml ...?> header.
    If you want to try to reproduce the crash at your end there are a couple of ways
    we could do it. I have just figured out that this forum software doesn't let me
    upload files or reveal my e-mail address in my profile, but you can contact me with
    username: pkeller; domain name: globalphasing.com and I can send the
    data to you.
    Regards,
    Peter.

  • Adding new data to leave request DropDown

    Hi,
    We have deployed ESS 1.0 BP. In leave request application we select the leave request type(PL, CL, SL) from drop down menu.
    Here privelige Leave is by default selected... but we need to remove PL from default and add hipen(-) so that user has to compulsory select the leave type from drop Down,
    Now the problem is as this list comes from R3 .. so how can we add new item to this drop down menu. Whether its needed to be done R3 side or do i need to modify Leave request Application. If i need to modify this leave request application than h0w can append hipen to the already list coming in drop down menu...
    Can any person specify in detail from where this configuration is needed to be done..?
    Regards,
    Jigar OZa

    Check this thread
    Re: Regarding control of leave types in the dropdown in ESS screen
    Try this from thread
    You can add the leave type that you want to get displayed in ESS in SPRO setting .
    in Spro
    Personnel Management --> Employee Self-service ---> Working Time -> Leave request> Processing Process ---> Specify Processing Process for Types of leave.

  • Is there any object in labview that contains a list of data for the user to select (selection one at a time) or add a new data?

    Is there any object in labview that contains a list of data for the user to select (selection one at a time) or add a new data?

    List and table controls -> listbox..is that what you are thinking of?
    The listbox presents the user with a list of options, and you can set it to only accept one selection at a time...Adding new data to the list can not be done directly by the user but if you make e.g. a text control and a button you can programatically insert new objects described in the text box when the button is pressed...(see example).
    If you need more than one column you have the multicolumn listbox. If you want the users to write new entries directly yu can use a table and read selected cells using it's selection start property to read what cell has been selected.
    MTO
    Attachments:
    Listbox_example.vi ‏34 KB

  • How do I add new data to the same file in a State Machine?

    Hello,
    I have a State Machine, with a State where 3 samples of data are collected in a For Loop. I would like to save this data in a file and keep adding new data to the same file each time I get to this state. The problem I'm running into is that each time I reach this State, my old data in the Excel file gets replaced with the new data instead of being continuously added in the same file.
    Ive tried Shift Registers but I may not be using them correctly since my file keeps displaying only 3 new data points.
    Any ideas will be appreciated!
    Thank you, so much.
    -Peter

    Where should I place these shift registers? Where should I place my File I/O VIs? Is it possible to use the Write to Spreadsheet File VI in this situation?
    Ive attached a very simple example of the problem. Thank you.
    Attachments:
    StandardStateMachine 2.vi ‏16 KB

  • Can't we add new dates automatically via MDIS- unmapped values- ADD

    Hi,
    I have a qualified table with non qualifier as Date(TYPE: Literal Date).
    and Qualifiers as Valid from and valid to.
    We have 4 dates currently in Date field.
    Our incoming file will have New dates init, So want these new dates to be added automaticaly via Import map.
    I have set the Date field property as MDIS unmapped fields as - ADD.
    But it is not adding new dates.
    When i have Date field with Type TEXT and not 'Literal Date'  then the new dates from Incoming file are added automatically.
    Is this Normal that MDIS unmapped value - ADD will not add date Type fields???
    Please Help
    KR
    John

    Hi,
    the incoming date format is MM/DD/YYYY.
    In configutration parameters it is mentioned as MM/DD/YYYY format.
    If the incoming file has Existing dates in MDM then it updates Fine.
    But if the Incoming file has a new date then it failes with value exception..
    'error message : Type mismatch. Invalid field values.<LF/></Trace>
    cant understand this behaviuor of Literal date Field...
    Can anyone please help...
    KR
    John

Maybe you are looking for

  • Cost estimate for material / plant  is incorrect

    Dear Gurus, While creating material cost estimate with quantity structure the above error occurs. Please let me know the solution for this? Regards, Ajit

  • Satellite Windows 8 laptop will no longer boot up after performing a power cycle

    I have a Satellite C855-55107 laptop. It had been working fine, and one day starting this problem: When booting up, it would bring the desktop screen up, and would not let me get to the sign in screen. I went to the Troubleshooting Help here and perf

  • There is no quicktime preferences in System Preferences screen?

    I upgraded to Snow Leopard no problem, bought the Quicktime Pro registration, but there is nowhere in preferences that shows Quicktime 7? Is it a separate download?

  • Itunes Library will not copy to hard drive

    I can not Back up my iTunes library by copying to an external hard drive. The library is 300gb. It starts to copy very well and gets to 27.79 Gb and stops with an error message saying "Itunes already exists in this location." Which it does because th

  • Advance Receipt issue

    Dear Sapgurus, If any customer advance paid 1000 rs i wna t go to customer account 1000 rs and advance royalty 900 and service tax is 100 but in advance roaylty i will give 1000 rs only. Regards Hanuman