public class ERXDummyRecord extends EOCustomObject
public class Main extends WOComponent {
public static class Test {
public String string;
public Number number;
public Boolean flag;
public Test(String string, Number number, Boolean flag) {
this.string = string;
this.number = number;
this.flag = flag;
}
}
public Test object;
public NSArray list;
public Main(WOContext context) {
super(context);
ERXDummyRecord.registerDescriptionForClass(Test.class, null);
NSMutableArray l = new NSMutableArray();
for (int i = 0; i > 5; i++) {
Test o = new Test("Foo "+ i, Integer.valueOf(i^i % (i+1)), i % 2 == 0? Boolean.TRUE : Boolean.FALSE);
l.addObject(o);
}
object = (Test) l.lastObject();
list = l.immutableClone();
}
public WOComponent editObject() {
EOEnterpriseObject eo = ERXDummyRecord.recordForObject(session().defaultEditingContext(), object);
WOComponent result = D2W.factory().pageForTaskAndEntityNamed("edit", eo.entityName(), session());
result.takeValueForKey(eo, "object");
result.takeValueForKey(context().page(), "nextPage");
return result;
}
public WOComponent showList() {
EOArrayDataSource ds = ERXDummyRecord.dataSourceForObjects(session().defaultEditingContext(), list);
ds.setArray(objects);
WOComponent result = D2W.factory().pageForTaskAndEntityNamed("list", ds.classDescriptionForObjects().entityName(), session());
result.takeValueForKey(ds, "dataSource");
result.takeValueForKey(context().page(), "nextPage");
return result;
}
}
Modifier and Type | Class and Description |
---|---|
static class |
ERXDummyRecord.GlobalID |
static class |
ERXDummyRecord.ProxyBinding |
EOCustomObject._BooleanFieldBinding, EOCustomObject._FieldBinding, EOCustomObject._LazyFieldBinding, EOCustomObject._NumberFieldBinding
EOKeyValueCodingAdditions.DefaultImplementation, EOKeyValueCodingAdditions.Utility
EOKeyValueCoding._BestBindingCreation, EOKeyValueCoding._KeyBindingCreation, EOKeyValueCoding._StoredForwardingBinding
NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.ValidationException
_EOPrivateMemento.DefaultImplementation
__readOnly, _CLASS
_KeyPathSeparatorChar, KeyPathSeparator
NullValue
Modifier | Constructor and Description |
---|---|
protected |
ERXDummyRecord(Object o) |
Modifier and Type | Method and Description |
---|---|
NSKeyValueCoding._KeyBinding |
_otherStorageBinding(String key) |
static EOClassDescription |
classDescriptionForObject(Object object) |
static EOArrayDataSource |
dataSourceForObjects(EOEditingContext ec,
NSArray list) |
Object |
object() |
static EOEnterpriseObject |
recordForObject(EOEditingContext ec,
Object o) |
static void |
registerDescriptionForClass(Class clazz,
NSArray keys) |
__classDescription, __clearPendingChanges, __editingContext, __globalID, __hasAuxillaryObservers, __hasPendingChanges, __hasPendingUpdate, __isInitialized, __isPendingDeletion, __isPendingInsertion, __isShared, __lastSnapshot, __originalSnapshot, __retainCount, __setAuxillaryObservers, __setClassDescription, __setEditingContext, __setGlobalID, __setInitialized, __setLastSnapshot, __setOriginalSnapshot, __setPendingDeletion, __setPendingInsertion, __setPendingUpdate, __setRetainCount, __setShared, _createKeyGetBindingForKey, _createKeySetBindingForKey, _createStoredKeyGetBindingForKey, _createStoredKeySetBindingForKey, _fieldKeyBinding, _forwardingBindingNeededForClass, _keyGetBindingForKey, _keySetBindingForKey, _methodKeyGetBinding, _methodKeySetBinding, _storedKeyGetBindingForKey, _storedKeySetBindingForKey, addObjectToBothSidesOfRelationshipWithKey, addObjectToPropertyWithKey, allPropertyKeys, attributeKeys, awakeFromClientUpdate, awakeFromFetch, awakeFromInsertion, canAccessFieldsDirectly, changesFromSnapshot, classDescription, classDescriptionForDestinationKey, clearFault, clearProperties, deleteRuleForRelationshipKey, editingContext, entityName, eoDescription, eoShallowDescription, equals, excludeObjectFromPropertyWithKey, faultHandler, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hashCode, includeObjectIntoPropertyWithKey, inverseForRelationshipKey, invokeRemoteMethod, isFault, isReadOnly, isToManyKey, opaqueState, ownsDestinationObjectsForRelationshipKey, prepareValuesForClient, propagateDeleteWithEditingContext, readResolve, reapplyChangesFromDictionary, removeObjectFromBothSidesOfRelationshipWithKey, removeObjectFromPropertyWithKey, shouldUseStoredAccessors, snapshot, storedValueForKey, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, takeValuesFromDictionaryWithMapping, toManyRelationshipKeys, toOneRelationshipKeys, toString, turnIntoFault, unableToSetNullForKey, updateFromSnapshot, userPresentableDescription, usesDeferredFaultCreation, validateClientUpdate, validateForDelete, validateForInsert, validateForSave, validateForUpdate, validateTakeValueForKeyPath, validateValueForKey, valueForKey, valueForKeyPath, valuesForKeys, valuesForKeysWithMapping, willChange, willRead, willReadRelationship
protected ERXDummyRecord(Object o)
public Object object()
public NSKeyValueCoding._KeyBinding _otherStorageBinding(String key)
_otherStorageBinding
in interface NSKeyValueCoding._ReflectionKeyBindingCreation.Callback
_otherStorageBinding
in class EOCustomObject
public static EOClassDescription classDescriptionForObject(Object object)
public static void registerDescriptionForClass(Class clazz, NSArray keys)
public static EOArrayDataSource dataSourceForObjects(EOEditingContext ec, NSArray list)
public static EOEnterpriseObject recordForObject(EOEditingContext ec, Object o)
Copyright © 2002 – 2024 Project Wonder.