private void createObject() throws Exception {

		Iterator iterator = textFields.keySet().iterator();
		ClassAttributeInfo cai = null;
		NonNativeObjectInfo nnoi = new NonNativeObjectInfo(classInfo);

		while (iterator.hasNext()) {
			cai = (ClassAttributeInfo) iterator.next();
			JTextField tfValue = (JTextField) textFields.get(cai);
			String value = tfValue.getText();
			if (cai.isNative()) {
				if (cai.getAttributeType().isAtomicNative()) {
					nnoi.setAttributeValue(cai.getId(), ObjectTool.stringToObjectInfo(cai.getAttributeType().getId(), value,
							ObjectTool.ID_CALLER_IS_ODB_EXPLORER,null));
				} else {
					if (cai.getAttributeType().isCollection()) {
						// Must be array of collection
						Collection c = new ArrayList();
						StringTokenizer tokenizer = new StringTokenizer(value, ",");
						while (tokenizer.hasMoreElements()) {
							c.add(new ObjectReference(OIDBuilder.buildObjectOID(tokenizer.nextElement().toString())));
						}
						CollectionObjectInfo coi = new CollectionObjectInfo(c);
						nnoi.setAttributeValue(cai.getId(), coi);
					}
					if (cai.getAttributeType().isArray()) {
						// Must be array of collection

						StringTokenizer tokenizer = new StringTokenizer(value, ",");
						Object[] objects = new Object[tokenizer.countTokens()];
						int i = 0;
						while (tokenizer.hasMoreElements()) {
							objects[i++] = new ObjectReference(OIDBuilder.buildObjectOID(tokenizer.nextElement().toString()));
						}
						ArrayObjectInfo aoi = new ArrayObjectInfo(objects);
						nnoi.setAttributeValue(cai.getId(), aoi);
					}

				}
			} else {
				if (value != null && value.length() > 0) {
					nnoi.setAttributeValue(cai.getId(), new ObjectReference(OIDBuilder.buildObjectOID(value)));
				} else {
					nnoi.setAttributeValue(cai.getId(), new NonNativeNullObjectInfo(cai.getClassInfo()));
				}
			}
		}
		DLogger.info("Creating object:" + nnoi);

		// OID id =
		// storageEngine.getObjectWriter().writeNonNativeObjectInfo(StorageEngineConstant.NULL_OBJECT_ID,
		// nnoi, -1, true,true);
		OID id = storageEngine.writeObjectInfo(StorageEngineConstant.NULL_OBJECT_ID, nnoi, -1, true);
		btCancel.setEnabled(false);
		btCreate.setEnabled(false);
		btCreate.setText(Messages.getString("Object Created : id = " + id));

	}