Runtime components
:
Core components
:
Contexts
:
Tasks
:
Working with contexts
: Updating the data elements of a context's keyed collection
Updating the data elements of a context's keyed collection
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");
Go up to
Working with contexts
This site works best with JavaScript enabled