on 09-14-2007 4:47 PM
I am displaying a table. For the employee I show all their hours by type (regular, vacation, etc). Each hour type line has a validation flag that I have to compute. I'm obviously doing something wrong as I only seem to be able to get my supply function to supply the flag to the first record the remaining are blank.
OutputHours
-EmplHours - 0..n
--wkHours - 0..n
-
TimeType
-
Hours
-
Contkz
-
ComputedCompValues <== Value node I added others above are bound from model
-
Contlz_String <==Value attribute I'm trying to populate based on Contkz containing "something"
Here is the code -
public void supplyComputedCompValues(IPrivateEmployeeTimeVerificatioinCust.IComputedCompValuesNode node, IPrivateEmployeeTimeVerificatioinCust.IWkhoursElement parentElement)
{
//@@begin supplyComputedCompValues(IWDNode,IWDNodeElement)
IComputedCompValuesElement elem = node.createComputedCompValuesElement();
if (wdContext.currentWkhoursElement().getContkz().trim().length() > 0)
{
elem.setContlz_String("Verified");
}
else
{
elem.setContlz_String("HI!");
}
node.bind(elem);
//@@end
}
WHen I run the code my view only has Verified for the first entry in wkhours all others are blank. I did check the fields (bound Contlz directly to the field in the view) and they all contained a "2".
Regards,
Diane
Diane, I would better make ComputedCompValues node as non singleton, cardinality 1..1, selection 1..1 and make Contlz_String as calculated attribute. Supply function on ComputedCompValues gonna be called only if lead selection of wkHours is changed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Singleton - property showing whether instance of node is assigned exlusivly to parent`s node element (Singleton=false, multiple instances of child node exist at the same time) or it is assigned to the parent node`s lead selected element only (Singleton=true, only ONE instances of child node exist at the same time). Using singleton=true is useful in combination with supply function - when lead selection of parent node is changed, supply function for child node is called and you can load data depending on lead selected node element from parent node. Useful by implementing table - detail pattern.
Cardinality - how many elements could node have.
Selection - how many elements could be selected in the node (lead selection and plain selection).
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.