IBM WebSphere Multichannel Bank Transformation Toolkit, Version 7.1

Updating the data elements of a context's keyed collection

About this task

To show how to update a data element of a context's keyed collection, the example code assumes that the definition files contain the following definitions:
Context definition
<context id="myContext" type="test" parent="nil">
  <refKColl refId="contextCollection">
  </refKColl>
</context>
Data definition
<kColl id="contextCollection">
  <field id="field1"/>
  <field id="field2"/>
</kColl>
To do the update, use code like the following example:
Context ctxt = (Context) Context.readObject("myContext");
ctxt.setValueAt("field1","Hello"); 


Feedback