public void delete(int index) { if (scope == null) { super.delete(index); } else { scope.delete(this, index); } }
public void delete(String name) { if (scope == null) { super.delete(name); } else { scope.delete(this, name); } }
/** * Attach the specified object to this object, and delegate all indexed property lookups to it. In other words, * if the object has 3 elements, then an attempt to look up or modify "[0]", "[1]", or "[2]" will be delegated * to this object. Additional indexed properties outside the range specified, and additional non-indexed * properties, may still be added. The object specified must implement the ExternalArrayData interface. * * @param array the List to use for delegated property access. Set this to null to revert back to regular * property access. * @since 1.7.6 */ public void setExternalArrayData(ExternalArrayData array) { externalData = array; if (array == null) { delete("length"); } else { // Define "length" to return whatever length the List gives us. defineProperty("length", null, GET_ARRAY_LENGTH, null, READONLY | DONTENUM); } }
public void delete(int index) { if (delegate instanceof Repeater) { Repeater repeater = (Repeater)delegate; if (index >= 0 && index < repeater.getSize()) { repeater.removeRow(index); return; } } else if (delegate instanceof MultiValueField) { MultiValueField field = (MultiValueField)delegate; Object[] values = (Object[])field.getValue(); if (values != null && values.length > index) { Object[] newValues = new Object[values.length-1]; int i; for (i = 0; i < index; i++) { newValues[i] = values[i]; } i++; for (;i < values.length;i++) { newValues[i-1] = values[i]; } field.setValues(newValues); } return; } super.delete(index); }
@Override public void delete(String name) { int info = findInstanceIdInfo(name); if (info != 0) { // Let the super class to throw exceptions for sealed objects if (!isSealed()) { int attr = (info >>> 16); if ((attr & PERMANENT) == 0) { int id = (info & 0xFFFF); setInstanceIdValue(id, NOT_FOUND); } return; } } if (prototypeValues != null) { int id = prototypeValues.findId(name); if (id != 0) { if (!isSealed()) { prototypeValues.delete(id); } return; } } super.delete(name); }
@Override public void delete(String name) { int info = findInstanceIdInfo(name); if (info != 0) { // Let the super class to throw exceptions for sealed objects if (!isSealed()) { int attr = (info >>> 16); if ((attr & PERMANENT) == 0) { int id = (info & 0xFFFF); setInstanceIdValue(id, NOT_FOUND); } return; } } if (prototypeValues != null) { int id = prototypeValues.findId(name); if (id != 0) { if (!isSealed()) { prototypeValues.delete(id); } return; } } super.delete(name); }
@Override public void delete(String name) { int info = findInstanceIdInfo(name); if (info != 0) { // Let the super class to throw exceptions for sealed objects if (!isSealed()) { int attr = (info >>> 16); if ((attr & PERMANENT) == 0) { int id = (info & 0xFFFF); setInstanceIdValue(id, NOT_FOUND); } return; } } if (prototypeValues != null) { int id = prototypeValues.findId(name); if (id != 0) { if (!isSealed()) { prototypeValues.delete(id); } return; } } super.delete(name); }
public void delete(String name) { int info = findInstanceIdInfo(name); if (info != 0) { // Let the super class to throw exceptions for sealed objects if (!isSealed()) { int attr = (info >>> 16); if ((attr & PERMANENT) == 0) { int id = (info & 0xFFFF); setInstanceIdValue(id, NOT_FOUND); } return; } } if (prototypeValues != null) { int id = prototypeValues.findId(name); if (id != 0) { if (!isSealed()) { prototypeValues.delete(id); } return; } } super.delete(name); }
@Override public void delete(String name) { int info = findInstanceIdInfo(name); if (info != 0) { // Let the super class to throw exceptions for sealed objects if (!isSealed()) { int attr = (info >>> 16); if ((attr & PERMANENT) == 0) { int id = (info & 0xFFFF); setInstanceIdValue(id, NOT_FOUND); } return; } } if (prototypeValues != null) { int id = prototypeValues.findId(name); if (id != 0) { if (!isSealed()) { prototypeValues.delete(id); } return; } } super.delete(name); }
@Override public void delete(String name) { int info = findInstanceIdInfo(name); if (info != 0) { // Let the super class to throw exceptions for sealed objects if (!isSealed()) { int attr = (info >>> 16); if ((attr & PERMANENT) == 0) { int id = (info & 0xFFFF); setInstanceIdValue(id, NOT_FOUND); } return; } } if (prototypeValues != null) { int id = prototypeValues.findId(name); if (id != 0) { if (!isSealed()) { prototypeValues.delete(id); } return; } } super.delete(name); }