src/org/tiefaces/components/websheet/utility/CommandUtility.java
@SuppressWarnings({ "rawtypes", "unchecked" })
	private static String insertEmptyObjectInContext(final String fullName,
			final Collection lastCollection, final EachCommand eachCommand,
			final int lastCollectionIndex,
			final Map<String, Object> dataContext) {
		if (!(lastCollection instanceof List)) {
			throw new EvaluationException(
					"Collection must be list in order to insert/delete.");
		}
		List collectionList = (List) lastCollection;
		// the object must support empty constructor.
		Object currentObj = collectionList.get(lastCollectionIndex);
		Object insertObj;
		try {
			insertObj = currentObj.getClass().newInstance();
			collectionList.add(lastCollectionIndex + 1, insertObj);
			dataContext.put(eachCommand.getVar(), insertObj);
			return fullName.substring(0, fullName.lastIndexOf('.') + 1)
					+ (lastCollectionIndex + 1);
		} catch (InstantiationException | IllegalAccessException e) {
			throw new EvaluationException(e);

		}

	}
@SuppressWarnings({ "rawtypes", "unchecked" })
	private static String insertEmptyObjectInContext(final String fullName,
			final Collection lastCollection, final EachCommand eachCommand,
			final int lastCollectionIndex,
			final Map<String, Object> dataContext) {
		if (!(lastCollection instanceof List)) {
			throw new EvaluationException(
					"Collection must be list in order to insert/delete.");
		}
		List collectionList = (List) lastCollection;
		// the object must support empty constructor.
		Object currentObj = collectionList.get(lastCollectionIndex);
		Object insertObj;
		try {
			insertObj = currentObj.getClass().newInstance();
			collectionList.add(lastCollectionIndex + 1, insertObj);
			dataContext.put(eachCommand.getVar(), insertObj);
			return fullName.substring(0, fullName.lastIndexOf('.') + 1)
					+ (lastCollectionIndex + 1);
		} catch (InstantiationException | IllegalAccessException e) {
			throw new EvaluationException(e);

		}

	}
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) private static String insertEmptyObjectInContext ( final String fullName , final Collection lastCollection , final EachCommand eachCommand , final int lastCollectionIndex , final Map < String , Object > dataContext ) { if ( ! ( lastCollection instanceof List ) ) { throw new EvaluationException ( "Collection must be list in order to insert/delete." ) ; } List collectionList = ( List ) lastCollection ; // the object must support empty constructor.
 Object currentObj = collectionList . get ( lastCollectionIndex ) ; Object insertObj ; try { insertObj = currentObj . getClass ( ) . newInstance ( ) ; collectionList . add ( lastCollectionIndex + 1 , insertObj ) ; dataContext . put ( eachCommand . getVar ( ) , insertObj ) ; return fullName . substring ( 0 , fullName . lastIndexOf ( ' ' ) + 1 ) + ( lastCollectionIndex + 1 ) ; } catch ( InstantiationException | IllegalAccessException e ) { throw new EvaluationException ( e ) ; } }
Insert empty object in context.

@param fullName
the full name
@param lastCollection
the last collection
@param eachCommand
the each command
@param lastCollectionIndex
the last collection index
@param dataContext
the data context
@return the string
@throws EvaluationException
the evaluation exception
Insert empty object in context .