<fmtDef id="myHashtableIndexedCollectionFormat"> <hashtableIColl dataName=resultSet times=*> <hashtable dataName=rowStructure> <fObject dataName ="data_name_1"/> <fObject dataName = "data_name_2"/> ........... <fObject dataName = "data_name_n"/> </hashtable> </hashtableIColl> </fmtDef>
Inside the definition of a HashtableIndexedCollectionFormat there is the definition of a HashtableFormat, which is the format element to be used to unformat the Hashtable elements of the vector.
The tag attributes dataName and times are used in the same way as in the IndexedCollectionFormat. The followings are the sample code to use HashtableIndexedCollectionFormat through the CHA Formatter Service:
com.ibm.btt.formatter.client.FormatElement afmt = new com.ibm.btt.client.FormatElement(); afmt.setName("myHashtableIndexedCollectionFormat"); afmt.unformatIndexedCollection(aVector,aContext); afmt.unformatIndexedCollection(aVector,anIndexedCollection);
If a toolkit application presentation layer entity or client entity needs to access the HashtableIndexedCollectionFormat, use the following code to access the formatter directly:
com.ibm.dse.base.HashtableIndexedCollectionFormat aFmt = (com.ibm.dse.base.HashtableIndexedCollectionFormat)FormatElement.readObject("FormatName"); afmt.unformat(aVector,aContext); afmt.unformatIndexedCollection(aVector,anIndexedCollection);