Deleting a row from JTable

I am trying to delete a row from a JTable whenever the button on the last column is pressed. I know to do this, I can use the removeRow(int) method of the tableModel. But the odd thing is when I try to get a handle to the TableModel from the JTable to use that function, i.e. table.getModel().removeRow(int) it doesn't work. But if I explicitly pass in the tableModel into my class it does work. Here's the code below:
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.table.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.UIManager;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableCellEditor;
import javax.swing.AbstractCellEditor;
import javax.swing.table.DefaultTableModel;
public class tester4 extends JFrame
     protected final int BUTTON_COL = 2;
     private TableCellRenderer defaultRenderer;
     private TableCellEditor defaultEditor;
     private JTable workingTable;
     private String[] transactionCols = {"Qty", "Product", "Cancel"};
     private Object[][] data = {{5, "prod1", "Cancel"},
               {6, "prod2", "Cancel"},
               {7, "prod3", "Cancel"}};
    public tester4()
          workingTable = new JTable(tableModel);
          workingTable.setName("Working Table");
          defaultRenderer = workingTable.getDefaultRenderer(JButton.class);
          defaultEditor = workingTable.getDefaultEditor(Object.class);
          StatusTableRenderer testRenderer = new StatusTableRenderer(defaultRenderer, defaultEditor, workingTable, tableModel);
          workingTable.setDefaultRenderer(Object.class, testRenderer);
          workingTable.setDefaultEditor(Object.class, testRenderer);
        JScrollPane scrollPane = new JScrollPane( workingTable );
        getContentPane().add( scrollPane );
     private DefaultTableModel tableModel = new DefaultTableModel(data, transactionCols){
          // Only allow button column to be editable, if there is an actual
          // button in that row          
          public boolean isCellEditable(int row, int col){
               return (col == BUTTON_COL && data[row][col] != "") ? true : false;
          // Overriden getColumnClass method that will return the object
          // class type of the first instance of the data type otherwise
          // returns the Object.class
          public Class getColumnClass(int column){
            for (int row = 0; row < getRowCount(); row++){
                Object o = getValueAt(row, column);
                if (o != null){ return o.getClass(); }
            return Object.class;
    public static void main(String[] args)
        tester4 frame = new tester4();
        frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
        frame.pack();
        frame.setVisible(true);
    public class StatusTableRenderer extends AbstractCellEditor
                                            implements TableCellRenderer,
                                                           TableCellEditor,
                                                           ActionListener{
         private TableCellRenderer defaultRenderer;
         private TableCellEditor defaultEditor;
         private JButton cancelButton;
         private JButton editButton;
         private String text;
         private int buttonColumn;
         private int selectedRow;
         private JTable table;
         private DefaultTableModel tableModel;
         public StatusTableRenderer(TableCellRenderer renderer,
                                       TableCellEditor editor,
                                       JTable table,
                                       DefaultTableModel tableModel){
              defaultRenderer = renderer;
              defaultEditor = editor;
              this.table = table;
              this.tableModel = tableModel;
              buttonColumn = table.getColumnCount() - 1;
            cancelButton = new JButton();
            editButton = new JButton();
            editButton.setFocusPainted(true);
            editButton.addActionListener(this);
         public StatusTableRenderer(TableCellRenderer renderer,
                                            TableCellEditor editor,
                                            JTable table,
                                            DefaultTableModel tableModel,
                                            int _buttonColumn){
              this(renderer, editor, table, tableModel);
              buttonColumn = _buttonColumn;
         public Component getTableCellRendererComponent(JTable table, Object value,
                   boolean isSelected, boolean hasFocus, int row, int column) {
              if (column == buttonColumn){
                   if (hasFocus){
                        cancelButton.setForeground(table.getForeground());
                        cancelButton.setBackground(UIManager.getColor("Button.background"));
                   else if (isSelected){
                        cancelButton.setForeground(table.getSelectionForeground());
                        cancelButton.setBackground(table.getSelectionBackground());
                   else{
                        cancelButton.setForeground(table.getForeground());
                        cancelButton.setBackground(UIManager.getColor("Button.background"));
                   cancelButton.setText( (value == null) ? "" : value.toString() );
                   return cancelButton;
            return defaultRenderer.getTableCellRendererComponent(
                        table, value, isSelected, hasFocus, row, column);
         public Component getTableCellEditorComponent(JTable table, Object value,
                   boolean isSelected, int row, int column){
              if (column == buttonColumn){
                   text = ((value == null) ? "": value.toString());
                   editButton.setText(text);
                   selectedRow = row;
                   return editButton;
              return defaultEditor.getTableCellEditorComponent(
                        table, value, isSelected, row, column);
        public Object getCellEditorValue()
            return text;
        public void actionPerformed(ActionEvent e)
            fireEditingStopped();
            // This works
            tableModel.removeRow(selectedRow);
           // This does not work
          //  table.getModel().removeRow(selectedRow);
}Take a look at the actionPerfformed method. One way of doing it works, one doesn't. Just trying to understand why me getting a handle to the tableModel through the table doesn't work.
Message was edited by:
deadseasquirrels

It gives me a run-time error Well then your question should be "why do I get this run-time error" and then you would quote the error. Be more descriptive. "It doesn't work" is not descriptive.
table.getModel().removeRow(selectedRow);I don't use JDK1.5 either. But if you are saying that the above line compiles cleanly with JDK1.5 (because of the auto-boxing feature, or whatever its called), then I see no reason why the code wouldn't work since it recognizes the class as a DefaultTableModel.
Presumably you commented out the other line so you don't try to delete the row twice. Otherwise you might be getting a indexing error.

Similar Messages

  • Deleting a row from a JTable using a custom TableModel

    Before I waste any of your time I would like to go ahead and just say that I have searched through the forum using "delete row from Jtable" as the search keywords and while I have found very closely related issues, they have not solved my problem. I have found code postings by carmickr and his arguments as to why we should use DefaultTableModel instead of having created our own custom TableModel, and while I do agree, I just am not quite confident enough in applying it to my scenario. See I am reading from a file a bunch of Contractor objects and I am stuffing it into an arraylist which I am using in the following code posting to populate my TableModel which the JTable object in the gui then uses.
    My problem is that everything works except when I delete and when I delete I understand that the index is changing because I just removed a row from the arraylist object. Suppose I have 33 rows displaying in the GUI. Now after I delete say row #23, the delete function works and dutifuly the row disappears from the table, but if I try to delete a row say...the last row, it does not work and throws me an IndexOutOfBoundsException which totally makes sense. My question is how do I go about fixing it? Do I have to do something with the setRowCount method?
    Any help is appreciated.
    Cheers,
    Surya
    * ContractorTableModel.java
    * Created on January 12, 2006, 11:59 PM
    package code.suncertify.gui;
    import java.util.ArrayList;
    import java.util.logging.Logger;
    import javax.swing.table.AbstractTableModel;
    import code.suncertify.db.Contractor;
    * @author Surya De
    * @version 1.0
    public class ContractorTableModel extends AbstractTableModel {
         * The Logger instance. All log messages from this class are routed through
         * this member. The Logger namespace is <code>sampleproject.gui</code>.
        private Logger log = Logger.getLogger("code.gui");
         * An array of <code>String</code> objects representing the table headers.
        private String [] headerNames = {"Record Number", "Contractor Name",
        "Location", "Specialties","Size", "Rate",
        "Owner"};
         * Holds all Contractor instances displayed in the main table.
        private ArrayList <Object> contractorRecords = new ArrayList<Object>(5);
         * Returns the column count of the table.
         * @return An integer indicating the number or columns in the table.
        public int getColumnCount() {
            return this.headerNames.length;
         * Returns the number of rows in the table.
         * @return An integer indicating the number of rows in the table.
        public int getRowCount() {
            return this.contractorRecords.size();
         * Gets a value from a specified index in the table.
         * @param row An integer representing the row index.
         * @param column An integer representing the column index.
         * @return The object located at the specified row and column.
        public Object getValueAt(int row, int column) {
            Object [] temp = (Object[]) this.contractorRecords.get(row);
            return temp[column];
         * Sets the cell value at a specified index.
         * @param obj The object that is placed in the table cell.
         * @param row The row index.
         * @param column The column index.
        public void setValueAt(Object obj, int row, int column) {
            Object [] temp = (Object []) this.contractorRecords.get(row);
            temp [column] = obj;
         * Returns the name of a column at a given column index.
         * @param column The specified column index.
         * @return A String containing the column name.
        public String getColumnName(int column) {
            return headerNames[column];
         * Given a row and column index, indicates if a table cell can be edited.
         * @param row Specified row index.
         * @param column Specified column index.
         * @return A boolean indicating if a cell is editable.
        public boolean isCellEditable(int row, int column) {
            return false;
         * Adds a row of Contractor data to the table.
         * @param specialty
         * @param recNo The record number of the row in question.
         * @param name The name of the contractor.
         * @param location Where the contractor is located
         * @param size Number of workers for the contractor
         * @param rate The contractor specific charge rate
         * @param owner Name of owner
        public void addContractorRecord(int recNo, String name,
                String location, String specialty,
                int size, float rate, String owner) {
            Object [] temp = {new Integer(recNo), name,
            location, specialty, new Integer(size),
            new Float(rate), owner};
            this.contractorRecords.add(temp);
            fireTableDataChanged();
         * Adds a Contractor object to the table.
         * @param contractor The Contractor object to add to the table.
        public void addContractorRecord(Contractor contractor) {
            Object [] temp = {new Integer(contractor.getRecordNumber()),
            contractor.getName(), contractor.getLocation(),
            contractor.getSpecialties(), new Integer(contractor.getSize()),
            new Float(contractor.getRate()), contractor.getCustomerID()};
            this.contractorRecords.add(temp);
            fireTableDataChanged();
         * Deletes a row of Contractor data to the table.
         * @FIXME Now that I deleted a row then I will have to reset the internal structure so that I can delete again
         * @param recNo The record number of the row in question.
        public void deleteContractorRecord(int recNo) {
            contractorRecords.remove(recNo - 1);
            fireTableRowsDeleted(recNo -1, recNo - 1);
    }

    Wow that was a very quick response. Thanks camickr. I am only trying to delete a single row. I do not know how to go about posting a test program for the code I have posted above because honestly the gui itself is 800 lines of code, and then the file reading class is quite funky in itself. I can maybe email you the entire Netbeans project including code so if you are using Netbeans 5 RC2 you can run the code and see for yourself, but that would not be considerate of me.
    See I am trying to delete any row at any time...but only one at a time not multiple rows...so if a user decides to delete row 23 and then tries to delete the last row which happens to be row 33 in my case, my setup should be smart enough to still allow to delete the row.

  • Problem of deletion of rows in jtable, table refreshing too

    Hi,
    I have a table with empty rows in the beginning with some custom properties( columns have fixed width...), later user would be adding to the rows to this table and can delete, I've a problem while deleting the rows from table,
    When a selected row is deleted the model is also deleting the data but the table(view) is not refreshed.
    Actually i'm selecting a cell of a row, then hitting the delete button.
    So the model is deleting the information, but i'm not able to c the fresh data in table( especially when the last cell of last row is selectd and hit the delete button, i am getting lots of exception)
    Kindly copy the below code and execute it, and let me know,
    * AuditPanel.java
    * Created on August 30, 2002, 3:05 AM
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.util.Vector;
    * @author yaman
    public class AuditPanel extends javax.swing.JPanel {
    // These are the combobox values
    private String[] acceptenceOptions;
    private Vector colNames;
    private Color rowSelectionBackground = Color.yellow;
    private int rowHeight = 20;
    private int column0Width =70;
    private int column1Width =96;
    private int column2Width =327;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    /** Creates new form AuditPanel */
    public AuditPanel() {
    public void renderPanel(){
    initComponents();
    public String[] getAcceptenceOptions(){
    return acceptenceOptions;
    public void setAcceptenceOptions(String[] acceptenceOptions){
    this.acceptenceOptions = acceptenceOptions;
    public Vector getColumnNames(){
    return colNames;
    public void setColumnNames(Vector colNames){
    this.colNames = colNames;
    public Vector getData(){
    Vector dataVector = new Vector();
    /*dataVector.add(null);
    dataVector.add(null);
    dataVector.add(null);
    return dataVector;
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;
    jPanel2 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    jTable1 = new javax.swing.JTable();
    setLayout(new java.awt.GridBagLayout());
    setBorder(new javax.swing.border.EmptyBorder(0,0,0,0));
    jPanel2.setLayout(new java.awt.GridBagLayout());
    jPanel2.setBorder(new javax.swing.border.EmptyBorder(0,0,0,0));
    jButton1.setText("Add");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 8;
    gridBagConstraints.insets = new java.awt.Insets(0, 1, 5, 0);
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    jPanel2.add(jButton1, gridBagConstraints);
    jButton2.setText("Delete");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    jPanel2.add(jButton2, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
    add(jPanel2, gridBagConstraints);
    jPanel1.setLayout(new java.awt.GridBagLayout());
    jPanel1.setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.LOWERED, Color.black, Color.gray) );
    jTable1.setModel(new javax.swing.table.DefaultTableModel(getData(), getColumnNames()));
    // get all the columns and set the column required properties
    java.util.Enumeration enum = jTable1.getColumnModel().getColumns();
    while (enum.hasMoreElements()) {
    TableColumn column = (TableColumn)enum.nextElement();
    if( column.getModelIndex() == 0 ) {
    column.setPreferredWidth(column0Width);
    column.setCellEditor( new ValidateCellDataEditor(true) );
    if( column.getModelIndex() == 1) {
    column.setPreferredWidth(column1Width);
    column.setCellEditor(new AcceptenceComboBoxEditor(getAcceptenceOptions()));
    // If the cell should appear like a combobox in its
    // non-editing state, also set the combobox renderer
    //column.setCellRenderer(new AcceptenceComboBoxRenderer(getAcceptenceOptions()));
    if( column.getModelIndex() == 2 ) {
    column.setPreferredWidth(column2Width); // width of column
    column.setCellEditor( new ValidateCellDataEditor(false) );
    jScrollPane1 = new javax.swing.JScrollPane(jTable1);
    jScrollPane1.setPreferredSize(new java.awt.Dimension(480, 280));
    jTable1.setMinimumSize(new java.awt.Dimension(60, 70));
    //jTable1.setPreferredSize(new java.awt.Dimension(300, 70));
    //jScrollPane1.setViewportView(jTable1);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
    jPanel1.add(jScrollPane1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    add(jPanel1, gridBagConstraints);
    // set the row height
    jTable1.setRowHeight(rowHeight);
    // set selection color
    jTable1.setSelectionBackground(rowSelectionBackground);
    // set the single selection
    jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    // avoid table header to resize/ rearrange
    jTable1.getTableHeader().setReorderingAllowed(false);
    jTable1.getTableHeader().setResizingAllowed(false);
    // Table header font
    jTable1.getTableHeader().setFont( new Font( jTable1.getFont().getName(),Font.BOLD,jTable1.getFont().getSize() ) );
    jButton1.setMnemonic(KeyEvent.VK_A);
    // action of add button
    jButton1.addActionListener( new ActionListener(){
    public void actionPerformed(ActionEvent actionEvent){
    // If a button press is the trigger to leave a JTable cell and save the data in model
    if(jTable1.isEditing() ){
    //System.out.println("table is edition ");
    String text=((javax.swing.text.JTextComponent)jTable1.getEditorComponent()).getText();
    jTable1.setValueAt(text,jTable1.getSelectedRow(),jTable1.getSelectedColumn()) ;
    jTable1.getCellEditor().cancelCellEditing();
    // find out total available rows
    int totalRows = jTable1.getRowCount();
    int cols = jTable1.getModel().getColumnCount();
    if( jTable1.getModel() instanceof DefaultTableModel ) {
    ((DefaultTableModel)jTable1.getModel()).addRow(new Object[cols]);
    int newRowCount = jTable1.getRowCount();
    // select the first row
    jTable1.getSelectionModel().setSelectionInterval(newRowCount-1,newRowCount-1);
    jButton2.setMnemonic(KeyEvent.VK_D);
    // action of Delete button
    jButton2.addActionListener( new ActionListener(){
    public void actionPerformed(ActionEvent actionEvent){
    int totalRows = jTable1.getRowCount();
    // If there are more than one row in table then delete it
    if( totalRows > 0){
    int selectedOption = JOptionPane.showConfirmDialog(null,"Are you sure you want to delete this audit row?","Coeus", JOptionPane.YES_NO_OPTION);
    // if Yes then selectedOption is 0
    // if No then selectedOption is 1
    if(0 == selectedOption ){
    // get the selected row
    int selectedRow = jTable1.getSelectedRow();
    System.out.println("Selected Row "+selectedRow);
    if( selectedRow != -1 ){
    DefaultTableModel dm= (DefaultTableModel)jTable1.getModel();
    java.util.Vector v1=dm.getDataVector();
    System.out.println("BEFOE "+v1);
    v1.remove(selectedRow);
    jTable1.removeRowSelectionInterval(selectedRow,selectedRow);
    System.out.println("After "+v1);
    }else{
    // show the error message
    JOptionPane.showMessageDialog(null, "Please Select an audit Row", "Coeus", JOptionPane.ERROR_MESSAGE);
    } // end of initcomponents
    class AcceptenceComboBoxRenderer extends JComboBox implements TableCellRenderer {
    public AcceptenceComboBoxRenderer(String[] items) {
    super(items);
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected, boolean hasFocus, int row, int column) {
    if (isSelected) {
    setForeground(table.getSelectionForeground());
    super.setBackground(rowSelectionBackground);
    } else {
    setForeground(table.getForeground());
    setBackground(table.getBackground());
    // Select the current value
    setSelectedItem(value);
    return this;
    class AcceptenceComboBoxEditor extends DefaultCellEditor {
    public AcceptenceComboBoxEditor(String[] items) {
    super(new JComboBox(items));
    } // end editor class
    public class ValidateCellDataEditor extends AbstractCellEditor implements TableCellEditor {
    // This is the component that will handle the editing of the
    // cell value
    JComponent component = new JTextField();
    boolean validate;
    public ValidateCellDataEditor(boolean validate){
    this.validate = validate;
    // This method is called when a cell value is edited by the user.
    public Component getTableCellEditorComponent(JTable table, Object value,
    boolean isSelected, int rowIndex, int vColIndex) {
    if (isSelected) {
    component.setBackground(rowSelectionBackground);
    // Configure the component with the specified value
    JTextField tfield =(JTextField)component;
    // if any vaidations to be done for this cell
    if(validate){
    //tfield.setDocument(new JTextFieldFilter(JTextFieldFilter.NUMERIC,4));
    tfield.setText( ((String)value));
    // Return the configured component
    return component;
    // This method is called when editing is completed.
    // It must return the new value to be stored in the cell.
    public Object getCellEditorValue() {
    return ((JTextField)component).getText();
    // This method is called just before the cell value
    // is saved. If the value is not valid, false should be returned.
    public boolean stopCellEditing() {
    String s = (String)getCellEditorValue();
    return super.stopCellEditing();
    public void itemStateChanged(ItemEvent e) {
    super.fireEditingStopped();
    }//end of ValidateCellDataEditor class
    public static void main(String args[]){
    JFrame frame = new JFrame();
    AuditPanel auditPanel = new AuditPanel();
    frame.getContentPane().add(auditPanel);
    auditPanel.setAcceptenceOptions(new String[]{"Accepted", "Rejected", "Requested"} );
    java.util.Vector colVector = new java.util.Vector();
    colVector.add("Fiscal Year");
    colVector.add("Audit Accepted");
    colVector.add("Comment" );
    auditPanel.setColumnNames( colVector);
    auditPanel.renderPanel();
    frame.pack();
    frame.show();

    Hi,
    I've got the solution for it. As when the cursor is in cell of
    a row and hit the delete button, the data in that cell is not saved,
    So i'm trying to save the data first into the model then firing the action event by doing this ..
    jButton2.addActionListener( new ActionListener(){       
    public void actionPerformed(ActionEvent actionEvent){           
    // If a button press is the trigger to leave a JTable cell and save the data in model
    if(jTable1.isEditing() ){                   
    String text=((javax.swing.text.JTextComponent)jTable1.getEditorComponent()).getText();
    jTable1.setValueAt(text,jTable1.getSelectedRow(),jTable1.getSelectedColumn()) ;
    jTable1.getCellEditor().cancelCellEditing();
    // HERE DO THE DELETE ROW OPERATION
    <yaman/>

  • How do i delete multiple rows in JTable

    hello
    how i delete multiple rows in JTable
    when i selected multiple rows from the jtable and delete its give the error ArrayIndexOutOfBoundException
    e.g.
    int rows[]=jtable.getSelectedRows();
    for(int i=0;i<rows.length;i++)
    DefaultTableModel model=(DefaultTableModel)jtable.getModel();
    model.removeRow(rows);
    like this
    please help me
    meraj

    You are trying to remove the rows an equal times to the amount of rows selected.
    You should remove one row at a time:
    model.removeRow(rows);
    Change your code into this.
    for(int i=0;i<rows.length;i++)
    DefaultTableModel model=(DefaultTableModel)jtable.getModel();
    model.removeRow(rows[i]);

  • Store a reference to a row from JTable

    Hello everyone!
    Me and my school mates are working on a project for a peer to peer application for the school. For file sending we wrote a class that extends Thread. We have a JTable to represent the downloading files. If the mentioned class for sending a file is created, I want to store into it's instance a reference to a row from the JTable. So I can always edit the cell in the tables row that represents the progress of downloading. Until now we were accessing the proper tables row over the rows index. But if we delete some rows from the table (we wand to remove finished downloads), the indexes get mixed up.
    I know that .NET has a class that represents a single row in the table. I would like to store the instance of a row in my class that downloads the file in my Java project.
    Thanks for further help!
    Regards.

    I know that .NET has a class that represents a single row in the table.
    I would like to store the instance of a row in my class that downloads the file in my Java project.You need to create a custom TableModel that stores an Object containing the row information.
    Here is a basic shell to get you started:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=610618
    You will need to add method to add/remove rows from the model. You will then need to search the TableModel to find the Object in order to determined which row to update.

  • HOW TO DELETE THE ROW FROM DATABASE

    hI,
    Iam pasting my code below.My problem isi retrieve rows from database and display them in jsp page in rows.For each row there is delete hyperlink.Now when i click that link i should only delete the row corresponding to that delete link temporarily but it should not delete the row from database now.It should only delete the row from database when i click the save button.How can i do this can any one give some code.
    thanks
    naveen
    [email protected]
    <%@ page language="java" import="Utils.*,java.sql.*,SQLCon.ConnectionPool,java.util.Vector,java.util.StringTokenizer" %>
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>Item Details</title>
    <script>
    function submitPage()
    document.details.action = "itemdetails.jsp" ;
    document.details.submit();
    </script>
    </head>
    <body>
    <form name="details" action="itemdetails.jsp" method="post">
    <%
    ConnectionPool pool;
    Connection con = null;
    Statement st;
    ResultSet rs =null;
    %>
    <table border="0" cellpadding="0" cellspacing="0" width="328">
    <tr>
    <td width="323" colspan="4"><b>Reference No :</b> <input type="text" name="txt_refno" size="14">
    <input type="submit" value="search" name="search" ></td>
    </tr>
    <tr>
    <td width="81" bgcolor="#000099"><font color="#FFFFFF"><b>Item Code</b></font></td>
    <td width="81" bgcolor="#000099"><font color="#FFFFFF"><b>Item No</b></font></td>
    <td width="81" bgcolor="#000099"><font color="#FFFFFF"><b>Amount </b></font></td>
    <td width="80" bgcolor="#000099"> </td>
    </tr>
    <%
    pool= new ConnectionPool();
    Utils utils = new Utils();
    double total =0.00;
    String search =utils.returnString(request.getParameter("search"));
    if(search.equals("search"))
    try
    String ref_no =utils.returnString(request.getParameter("txt_refno"));
    String strSQL="select * from ref_table where refno='" + ref_no + "' ";
    con = pool.getConnection();
    st=con.createStatement();
    rs = st.executeQuery(strSQL);
    while(rs.next())
    String itemcode=rs.getString(2);
    int item_no=rs.getInt(3);
    double amount= rs.getDouble(4);
    total= total + amount;
    %>
    <tr>
    <td width="81"><input type=hidden name=hitem value=<%=itemcode%>><%=itemcode%></td>
    <td width="81"><input type=hidden name=hitemno value=<%=item_no%>><%=item_no%></td>
    <td width="81"><input type=hidden name=hamount value=<%=amount%>><%=amount%></td>
    <td width="80"><a href="delete</td>
    </tr>
    <%
    }catch(Exception e){}
    finally {
    if (con != null) pool.returnConnection(con);
    %>
    <tr>
    <td width="323" colspan="4">
    <p align="right"><b>Total:</b><input type="text" name="txt_total" size="10" value="<%=total%>"></td>
    </tr>
    <tr>
    <td width="323" colspan="4">                   
    <input type="button" value="save" name="save"></td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    You mean when you click on the hyperlink you want that row to disappear from the page, but not delete the row from the database until a commit/submit button is pressed?
    Personally, I think I'd prefer that you have a delete checkbox next to every row and NOT remove them from the display if I was a user. You give your users a chance to change their mind about their choice, and when they're done they can see exactly which rows will be deleted before they commit.
    You know your problem, of course, so you might have a good reason for designing it this way. But I'd prefer not removing them from the display. JMO - MOD

  • How to delete multiple rows from ADF table

    How to delete multiple rows from ADF table

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • Deleting a row from a Procedure

    Hi All
    Can one of you tell me how to delete a row from a Procedure
    It is created with
    CREATE OR REPLACE PROCEDURE report.NAMEOFTABLE
    (nPutId IN Report.ID%TYPE,
    cArea IN Report.Area%TYPE,
    cSubject IN Report.Subject%TYPE,
    nUserId IN Report.EngineerID%TYPE,
    cDesc IN Report.Description%TYPE,
    cSide IN Report.SideEffects%TYPE,
    cImpact IN Report.Impact%TYPE,
    cNotes IN Report.Notes%TYPE,
    nValid IN Report.Valid%TYPE) AS
    -- Add or update Report
    -- If nId < 1 then a record is added, otherwise updated.
    BEGIN
    IF nId < 1 THEN
    INSERT INTO Report
    (Area, Subject, EngineerID,
    Description, SideEffects, Impact,
    ReportNotes, Valid)
    VALUES
    (cArea, cSubject, nUserId, cDesc, cSide, cImpact, cNotes, nValid);
    ELSE
    UPDATE Report
    SET ReportArea = cArea,
    ReportSubject = cSubject,
    ReportDescription = cDesc,
    ReportSideEffects = cSide,
    ReportImpact = cImpact,
    ReportNotes = cNotes,
    ReportValid = nValid
    WHERE ReportID = nPutId;
    END IF;
    COMMIT;
    END;
    CREATE SYNONYM Admin.NAMEOFTABLE
    Report.NAMEOFTABLE;
    But I need to make 1 field of the impact and the sideEffect called the ImpactEffect
    So how do i delete the field of Side effect and change the name of the Impact field.
    Sould I make a new Procedure?

    If you want to delete a row, you'd need a DELETE statement. It is not obvious to me, though, that you really want to delete a row. It sounds like you're trying to update a row, and there is an UPDATE statement in the procedure. Unfortunately, I'm very unsure exactly what you're trying to accomplish and how this procedure relates to that goal. Perhaps if you could post the starting state of the row, the procedure call you're trying to make, and the end state of that row, things might be much clearer.
    As an aside, do you really have a schema and a table named REPORT? That seems rather confusing.
    Justin

  • Deleting a row from a table control through right-clic​k menu

    I have a table control. I want to delete a row from it when a user right clicks on a particular row and selects "Delete row" menu item. I have managed the creation of menu item but have not been able to delete the row which is right clicked and the menu item "Delete row" is selected. Guidance required! Thanks!

    smercurio_fc wrote:
    It's irrelevant whether the table is a control or indicator. See attached VI.
    Hi smercurio,
    please see the attached picture. In my previous post i mean the different in the menu. The red marked function is not available, if the table is an indicator. LV8.5!
    Mike
    Message Edited by MikeS81 on 04-18-2008 05:19 PM
    Attachments:
    Unbenannt.PNG ‏22 KB

  • Deleting a row from a Row Repeater

    Hi All,
    How could i delete a row from a row repeater??????
    I am using REMOVE_ELEMENT method from IF_WD_CONTEXT_NODE interface... Is this the correct way!!!!!!.
    Is there anyother way to do the same?????
    Best Regards.
    Shafiq Ahmed Khan.

    Hi
    first u get the index from the context element. with the help of the index u can get that particular element using get element.
    then u remove the element .
    check this code.
    CALL METHOD context_element->get_index
      receiving
        my_index = lv_index.
    CALL METHOD lo_nd_rcf_edu_det->get_element
      EXPORTING
        index        = lv_index
      receiving
        node_element = lo_el_rcf_edu_det .
    CALL METHOD lo_nd_rcf_edu_det->remove_element
      EXPORTING
        element          = lo_el_rcf_edu_det
    receiving
       has_been_removed =
    Declare a parameter context_element in the method of type if_wd_context_element
    regards
    chythanya

  • Deleting a row from matrix by context menu

    Hi all
    does anyone know how can i cause right click on mouse button. on a certain row within a matrix to show a context menu with the option to delete the row. and when pressing the menu item handling the event of deleting the row from the matrix?
    appreciate the help
    Yoav

    Hi Yoav,
    Simply, 'context menu' have to be handled with 'menu event' object.
    It can be done by 'flushToDataSource' method and some tricks.
    Basically, method delete the row without any clause of addon code.
    But it's only can be done in display side.
    If you're using DBDataSource, you have to flush to the datasource.
    I mean, you have to update datasource with the data displayed in the matrix.
    and then, delete the last row of the datasource.
    FlushToDataSource doesn't affect to the number of rows in the datasource.
    You have to delete a row with a method of DBDatasource.. I can't remember the name.
    If, the matrix uses userdatasource, you don't need to delete a row in datasource.
    Because userdatasource doesn't have a concept of 'row', actually.
    Hope this helpful for you.
    Regards,
    Hyunil Choi

  • Deleting a row from a database...

    Here is the method I am calling to delete a row from a database. I keep getting this error, but I am not sure why.
    Error: "Too few parameters. Expected 1."
    //To delete a row
      public void removeRow(String x, String y) {
       try {
       Statement stmt = con.createStatement();
       //delete row with same x and y
    //first is a string and second is a number
       String query = "DELETE * FROM table WHERE first = '" +x+ "' AND " +
       "second = " +Integer.parseInt(y);
       int result = stmt.executeUpdate(query); //runs delete query, ERROR HERE *************
       System.out.println("Test"); //debug statement, never gets here
       //deletion confirmation message
       JOptionPane.showMessageDialog(null, "Row deleted",
       "Delete Reservation", JOptionPane.INFORMATION_MESSAGE);
          catch (Exception e) { System.out.println(e); }

    Additionally, in the future you might want to use:
    catch(SQLException sqlx) {
      System.out.println( sqlx.getSQLState()
                                       +"\t"+sqlx.getMessage()
                                       +"\t"+sqlx.getErrorCode() );... It'll help with diagnostics.
    &#9786;Bill

  • Deleting a row from a table using jsp

    Given a table in a jsp, can an user click on a row of that table and retrieve the information so that the program can delete a record from a database table?
    most of the tables that I have seen are static, the user cannot interact with them(specially when the user wants to delete several records from a database table).
    Can anyone suggests a good book or way of deleting a row from table using jsp.

    eg use a column in the table that has a radio button or check box,
    on submit, get all the rows that are checked, using the row as an index into your db store, get the key and use the key to issue the sql delete command.

  • Deleting a row from parent table

    Dear Guru's
    I am having two table with parent - child relationship. My problem is when I am deleting a row from parent table the curresponding child row from child table also should be deleted.
    My Primary table 'Employee, EMPID Primary key
    Child table 'Privilage' inthis EMPID referencing the EMPID of Employee table
    My need is when I am deleting a row from parent table the curresponding child row from child table also should be deleted
    I issued the SQL query like,
    delete from employee where empid='12345' cascade constraints;
    Then it showing me error like,
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    Please resolve my issue , Its Top urgent
    Thanks & Cheers
    Antony

    Choosing How Foreign Keys Enforce Referential Integrity
    Oracle Database allows different types of referential integrity actions to be enforced, as specified with the definition of a FOREIGN KEY constraint:
    Prevent Delete or Update of Parent Key The default setting prevents the deletion or update of a parent key if there is a row in the child table that references the key. For example:
    CREATE TABLE Emp_tab ( 
    FOREIGN KEY (Deptno) REFERENCES Dept_tab);Delete Child Rows When Parent Key Deleted The ON DELETE CASCADE action allows parent key data that is referenced from the child table to be deleted, but not updated. When data in the parent key is deleted, all rows in the child table that depend on the deleted parent key values are also deleted. To specify this referential action, include the ON DELETE CASCADE option in the definition of the FOREIGN KEY constraint. For example:
    CREATE TABLE Emp_tab (
        FOREIGN KEY (Deptno) REFERENCES Dept_tab 
            ON DELETE CASCADE); Set Foreign Keys to Null When Parent Key Deleted The ON DELETE SET NULL action allows data that references the parent key to be deleted, but not updated. When referenced data in the parent key is deleted, all rows in the child table that depend on those parent key values have their foreign keys set to null. To specify this referential action, include the ON DELETE SET NULL option in the definition of the FOREIGN KEY constraint. For example:
    CREATE TABLE Emp_tab (
        FOREIGN KEY (Deptno) REFERENCES Dept_tab 
            ON DELETE SET NULL);
    SQL> conn scott/tiger
    Connected.
    SQL> create table ppk ( no number primary key);
    Table created.
    SQL> begin for inn in 1..10 loop insert into ppk values (inn); end loop; end;
    PL/SQL procedure successfully completed.
    SQL> create table ffk ( no number references ppk(no));
    Table created.
    SQL> begin for inn in 1..10 loop insert into ffk values (inn); end loop; end;
    PL/SQL procedure successfully completed.
    SQL> drop table ppk cascade constraints;
    Table dropped.Message was edited by:
    user52
    Message was edited by:
    user52
    Message was edited by:
    user52

  • Deleting a row from a Parent VO gives NullPointerException

    I am using JDev 11.1.1.2.0
    Deleting a row from a Parent VO gives NullPointerException raised from oracle.jbo.server.EntityImpl.vetoRemoveWithDetails(EntityImpl.java:8214)
    Here is my implementation:
    There are two Entity Objects(Named "Parent" and "Child").
    Both EO are NOT based on a database table. (These are populated from a method in the AM, the method calls a database API that returns an nested array and this array is used to populate the Parent and Child entities)
    All attributes in these entity objects are Non-persistent.
    The View Object "ParentEv" is based on "Parent" EO
    The View Object "ChildEv" is based on "Child" EO
    The View Objects "ParentEv" and "ChildEv" are linked by a view link.
    The Entities "Parent" and"Child" are linked by Entity Association ( as "Composition Association" with "Implement Cascade Delete" checked.)
    I am programatically deleting and populating the View Objects ParentEv and ChildEv from a method in the AM.
    The first time I execute the method in BC Tester, it works fine.
    The second time I execute the method it works fine.
    But on third execution, it gives the below error which seems to be NullPointerException raised from oracle.jbo.server.EntityImpl.vetoRemoveWithDetails(EntityImpl.java:8214)
    I am able to reproduce this in a test case scenario. It always works the first 2 times and fails when the method to delete and populate the VOs is executed a 3rd time.
    If we base the "Parent" and "Child" entities on some dummy database views, it works fine, the problem only occurs when the Entities are NOT based on any table.
    Can someone advise on what could be causing this issue?
    Thanks,
    Mitesh.

    Here's the method that I use in my test case to populate the VOs.
       * This method populates the VOs ParentEv and ChildEv.
       * These VOs are based on EOs Paren and Child, respectively.
       * Before populating the VOs I am deleting any existing rows.
       * The first two times this method is executed, it works fine.
       * The third time this method executes it gives a nullpointerexception raised from
       * oracle.jbo.server.EntityImpl.vetoRemoveWithDetails(EntityImpl.java:8214)
      public void populateMethod(){
        int rowCount = getParentEv().getRowCount();   
        for (int i = 0; i < rowCount; i++) {
             Row row = getParentEv().last();
             if(row!=null)
               row.remove();
        rowCount = getChildEv().getRowCount();
        for (int i = 0; i < rowCount; i++) {
         Row row = getChildEv().last();
         if(row!=null)
           row.remove();
        int k = 0;
        for (int i = 1; i < 5; i++) {   
          ParentEvRowImpl parentEvRow = (ParentEvRowImpl)getParentEv().createRow();
          parentEvRow.setParentPk("Parent " + i);
          parentEvRow.setParentDesc("Parent Desc " + i);
          getParentEv().insertRow(parentEvRow);   
          for (int j = 1; j < 5; j++) {   
         k++;
         ChildEvRowImpl childEvRow = (ChildEvRowImpl)getChildEv().createRow();
         childEvRow.setChildPk("Child " + k);
         childEvRow.setChildDesc("Child Desc " + k);
         getChildEv().insertRow(childEvRow);   
      }==============================================================================
    Here is the Parent.xml for the Parent EO:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
    <!---->
    <Entity
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="Parent"
      Version="11.1.1.55.36"
      AliasName="Parent"
      BindingStyle="OracleName"
      UseGlueCode="false"
      RowClass="oracle.jbo.server.EntityImpl"
      DefClass="oracle.jbo.server.EntityDefImpl"
      CollClass="oracle.jbo.server.EntityCache">
      <DesignTime>
        <AttrArray Name="_publishEvents"/>
      </DesignTime>
      <Attribute
        Name="ParentPk"
        IsQueriable="false"
        IsPersistent="false"
        ColumnName="PARENTPK"
        SQLType="VARCHAR"
        Type="java.lang.String"
        ColumnType="$none$"
        PrimaryKey="true"/>
      <Attribute
        Name="ParentDesc"
        IsQueriable="false"
        IsPersistent="false"
        ColumnName="$none$"
        SQLType="VARCHAR"
        Type="java.lang.String"
        ColumnType="$none$"/>
      <AccessorAttribute
        Name="Child"
        Association="model.eo.ea.ChildParentAssoc"
        AssociationEnd="model.eo.ea.ChildParentAssoc.Child"
        AssociationOtherEnd="model.eo.ea.ChildParentAssoc.Parent"
        Type="oracle.jbo.RowIterator"
        IsUpdateable="false"/>
    </Entity>==============================================================================
    Here is the Child.xml for the Child EO:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
    <!---->
    <Entity
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="Child"
      Version="11.1.1.55.36"
      AliasName="Child"
      BindingStyle="OracleName"
      UseGlueCode="false">
      <DesignTime>
        <AttrArray Name="_publishEvents"/>
      </DesignTime>
      <Attribute
        Name="ChildPk"
        IsUpdateable="while_insert"
        IsQueriable="false"
        IsPersistent="false"
        IsNotNull="true"
        ColumnName="CHILDPK"
        SQLType="VARCHAR"
        Type="java.lang.String"
        ColumnType="$none$"
        PrimaryKey="true"/>
      <Attribute
        Name="ChildDesc"
        IsQueriable="false"
        IsPersistent="false"
        ColumnName="$none$"
        SQLType="VARCHAR"
        Type="java.lang.String"
        ColumnType="$none$"/>
      <Attribute
        Name="ParentPk"
        IsQueriable="false"
        IsPersistent="false"
        IsNotNull="true"
        ColumnName="$none$"
        SQLType="VARCHAR"
        Type="java.lang.String"
        ColumnType="$none$"/>
    </Entity>==============================================================================
    Here is the ChildParentAssoc.xml for the Association between Parent and Child EOs:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE Association SYSTEM "jbo_03_01.dtd">
    <!---->
    <Association
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="ChildParentAssoc"
      Version="11.1.1.55.36">
      <DesignTime>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <AssociationEnd
        Name="Parent"
        Cardinality="1"
        Source="true"
        Owner="model.eo.Parent"
        DeleteContainee="true"
        LockLevel="NONE"
        ExposedAccessor="false">
        <DesignTime>
          <Attr Name="_aggregation" Value="0"/>
          <Attr Name="_finderName" Value="Parent"/>
          <Attr Name="_isUpdateable" Value="true"/>
          <Attr Name="_minCardinality" Value="1"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item Value="model.eo.Parent.ParentPk"/>
        </AttrArray>
      </AssociationEnd>
      <AssociationEnd
        Name="Child"
        Cardinality="-1"
        Owner="model.eo.Child"
        HasOwner="true">
        <DesignTime>
          <Attr Name="_aggregation" Value="0"/>
          <Attr Name="_finderName" Value="Child"/>
          <Attr Name="_isUpdateable" Value="true"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item Value="model.eo.Child.ParentPk"/>
        </AttrArray>
      </AssociationEnd>
    </Association>==============================================================================
    Here is the ParentEv.xml for the ParentEv VO:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="ParentEv"
      Version="11.1.1.55.36"
      BindingStyle="OracleName"
      CustomQuery="true"
      RowClass="model.vo.ev.ParentEvRowImpl"
      ComponentClass="model.vo.ev.ParentEvImpl"
      PageIterMode="Full"
      UseGlueCode="false">
      <DesignTime>
        <Attr Name="_codeGenFlag2" Value="Access|Coll"/>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <EntityUsage
        Name="Parent"
        Entity="model.eo.Parent"/>
      <ViewAttribute
        Name="ParentDesc"
        IsSelected="false"
        IsQueriable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="255"
        EntityAttrName="ParentDesc"
        EntityUsage="Parent"
        AliasName="PARENTDESC"/>
      <ViewAttribute
        Name="ParentPk"
        IsQueriable="false"
        IsPersistent="false"
        PrecisionRule="true"
        EntityAttrName="ParentPk"
        EntityUsage="Parent"/>
      <ViewLinkAccessor
        Name="ChildEv"
        ViewLink="model.vo.vl.ChildEvParentEvVl"
        Type="oracle.jbo.RowIterator"
        IsUpdateable="false"/>
    </ViewObject>==============================================================================
    Here is the ChildEv.xml for the ChildEv VO:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="ChildEv"
      Version="11.1.1.55.36"
      BindingStyle="OracleName"
      CustomQuery="true"
      RowClass="model.vo.ev.ChildEvRowImpl"
      ComponentClass="model.vo.ev.ChildEvImpl"
      PageIterMode="Full"
      UseGlueCode="false">
      <DesignTime>
        <Attr Name="_codeGenFlag2" Value="Access|Coll"/>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <EntityUsage
        Name="Child"
        Entity="model.eo.Child"/>
      <ViewAttribute
        Name="ChildDesc"
        IsSelected="false"
        IsQueriable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="255"
        EntityAttrName="ChildDesc"
        EntityUsage="Child"
        AliasName="CHILDDESC"/>
      <ViewAttribute
        Name="ChildPk"
        IsUpdateable="while_insert"
        IsQueriable="false"
        IsPersistent="false"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="ChildPk"
        EntityUsage="Child"/>
      <ViewAttribute
        Name="ParentPk"
        IsQueriable="false"
        IsPersistent="false"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="ParentPk"
        EntityUsage="Child"/>
    </ViewObject>==============================================================================
    Here is the ChildEvParentEvVl.xml for the view link between ParentEv and ChildEv VOs:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE ViewLink SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewLink
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="ChildEvParentEvVl"
      Version="11.1.1.55.36">
      <DesignTime>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <ViewLinkDefEnd
        Name="ParentEv"
        Cardinality="1"
        Owner="model.vo.ev.ParentEv"
        Source="true">
        <DesignTime>
          <Attr Name="_finderName" Value="ParentEv"/>
          <Attr Name="_isUpdateable" Value="true"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item Value="model.vo.ev.ParentEv.ParentPk"/>
        </AttrArray>
      </ViewLinkDefEnd>
      <ViewLinkDefEnd
        Name="ChildEv"
        Cardinality="-1"
        Owner="model.vo.ev.ChildEv">
        <DesignTime>
          <Attr Name="_finderName" Value="ChildEv"/>
          <Attr Name="_isUpdateable" Value="true"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item Value="model.vo.ev.ChildEv.ParentPk"/>
        </AttrArray>
      </ViewLinkDefEnd>
    </ViewLink>

Maybe you are looking for

  • S.M.A.R.T. status message-what is this?

    S.M.A.R.T. status changed  messsage appeared on desktop. What does this mean?

  • How to send data from database to textimput

    How to do this correct? [php] if ($_POST['request'] == "pokazOnas") {      $sql = mysql_query("SELECT text FROM podstrony WHETE podstrona=Onas");      $result = "";      $result .= '<tab>';      while($row = mysql_fetch_array($sql))          $result

  • Payment term field.

    hi, i am doing a Finace Aging report now, and i need to cater for the payment term field. however, does any know the table for payment term that store the days value? i cant find it. thanks

  • Degraded mirrored raid- won't rebuild

    I've had 2 500 gig drives mirrored. When I set up the drives I did not check "automatically rebuild". I just discovered ( not too long after installing Leopard) that one slice was "damaged" and the raid was degraded. I tried to rebuild, but got an er

  • Add to Selection Fails for Single Row/Column

    Hi, Has anyone encountered this. Making additions to selections with the Rectangular and Elliptical Marquee tools works fine. However it fails with both single row and single column marquee tools. This was doable with my previous version of Photoshop