[SNMP4J] Deleting row by OID index not works

Alexander Fooks afooks at allot.com
Mon Dec 8 14:30:54 CET 2008


Hi,

I use the table and has problem with deleting row by index.

This is exerpt from my code:

//
public int addRow(  OID index,  int severity, 
					  String descr,
					  Long timestamp){
	  Variable[] rowValue = new Variable[] {new Integer32(severity),

			                                new
OctetString(descr), 
			                                new
Counter64(timestamp)};
	  ((MOMutableTableModel)alEntryModel).addRow(new
DefaultMOMutableRow2PC(index, rowValue));
	  int rowCount = alEntryModel.getRowCount();	  
	  return  rowCount;
	}
public void deleteRow(OID index){
	  MOMutableTableModel model = (MOMutableTableModel)alEntryModel;
	  MOTableRow row = model.removeRow(index);
	  if(row==null){
		  log.error("Problem with Alarm deleting: row not
exists: index:["+index+"]");		  
	  }
}
//

If I try to delete row with the same index row has been added I've
always got null.
Could you help me to understand what's wrong?


Thank you

BR
Alex Fooks





More information about the SNMP4J mailing list