Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Form API replicants issue
ruler
I am trying to do event control using the Form API..Attached pls find the datacapture.cfg file.
I have four selection fields(replicants)...I need to do this:
When i choose from the top level field it should populate only the relevant fields to choose from, in the second field and so on;
Is callserver the way to go...If so how do i do it..I never used it..Any help appreciated...Thanks.
Whats the easiet way...Is data deploy an option?
Find more posts tagged with
Comments
jbonifaci
Without looking at your code, I would recommend creating a javascript object that contains the relationship between each of the selections. Doing a callServer every time a user does a select will degrade performance. Then onItemChange of the parent, just reference the object to populate the child item. As to building the object, you could do it with a callServer onInit, or you could just have a separate js file that all it has is a hard coded definition of the object. This js file could be rebuilt any time one of the values changes. Obviously if these values are going to be added to/changed often, you'd want to go with the callServer route. callServers are pretty straight forward. You should be able to find examples both in the forum and in the documentation on your teamsite server:
http://<server>/iw/help/tst/formapi/
~Jeff
ruler
If you have seen my datacapture file, i have created the options that go with the fields in there.
But how/where would i define the groupings?
Lets say in the Pareent field i has selection options A, B, C, D
And if i selected A the second field should show X, Y, Z and so on?
jbonifaci
Read up on javascript arrays and objects. As I said, you just want an array of objects of arrays of objects of arrays of objects, etc. for as many levels as you want to go down. Here is a simple example of one way you could architect your array of objects:
// Define Array of level one option objects.
var OptionArray = new Array;
// Define the first level one option.
OptionArray[0] = new Object;
OptionArray[0].value = "L1 V1";
OptionArray[0].label = "L1 L1";
OptionArray[0].children = new Array;
// Define the first child option of the first level one option.
OptionArray[0].children[0] = new Object;
OptionArray[0].children[0].value = "L1 V1 - L2 V1";
OptionArray[0].children[0].label = "L1 L1 - L2 L1";
OptionArray[0].children[0].children = new Array;
// Define the first child option of the first level two option of the first level one option.
OptionArray[0].children[0].children[0] = new Object;
OptionArray[0].children[0].children[0].value = "L1 V1 - L2 V1 - L3 V1";
OptionArray[0].children[0].children[0].label = "L1 L1 - L2 L1 - L3 L1";
OptionArray[0].children[0].children[0].children = new Array;
// Define the second child option of the first level two option of the first level one option.
OptionArray[0].children[0].children[1] = new Object;
OptionArray[0].children[0].children[1].value = "L1 V1 - L2 V1 - L3 V2";
OptionArray[0].children[0].children[1].label = "L1 L1 - L2 L1 - L3 L2";
OptionArray[0].children[0].children[1].children = new Array;
// Define the third child option of the first level two option of the first level one option.
OptionArray[0].children[0].children[2] = new Object;
OptionArray[0].children[0].children[2].value = "L1 V1 - L2 V1 - L3 V3";
OptionArray[0].children[0].children[2].label = "L1 L1 - L2 L1 - L3 L3";
OptionArray[0].children[0].children[2].children = new Array;
// Define the second child option of the first level one option.
OptionArray[0].children[1] = new Object;
OptionArray[0].children[1].value = "L1 V1 - L2 V2";
OptionArray[0].children[1].label = "L1 L1 - L2 L2";
OptionArray[0].children[1].children = new Array;
// Define the first child option of the second level two option of the first level one option.
OptionArray[0].children[1].children[0] = new Object;
OptionArray[0].children[1].children[0].value = "L1 V1 - L2 V2 - L3 V1";
OptionArray[0].children[1].children[0].label = "L1 L1 - L2 L2 - L3 L1";
OptionArray[0].children[1].children[0].children = new Array;
// Define the second child option of the second level two option of the first level one option.
OptionArray[0].children[1].children[1] = new Object;
OptionArray[0].children[1].children[1].value = "L1 V1 - L2 V2 - L3 V2";
OptionArray[0].children[1].children[1].label = "L1 L1 - L2 L2 - L3 L2";
OptionArray[0].children[1].children[1].children = new Array;
// Define the third child option of the second level two option of the first level one option.
OptionArray[0].children[1].children[2] = new Object;
OptionArray[0].children[1].children[2].value = "L1 V1 - L2 V2 - L3 V3";
OptionArray[0].children[1].children[2].label = "L1 L1 - L2 L2 - L3 L3";
OptionArray[0].children[1].children[2].children = new Array;
// Define the third child option of the first level one option.
OptionArray[0].children[2] = new Object;
OptionArray[0].children[2].value = "L1 V1 - L2 V3";
OptionArray[0].children[2].label = "L1 L1 - L2 L3";
OptionArray[0].children[2].children = new Array;
// Define the first child option of the third level two option of the first level one option.
OptionArray[0].children[2].children[0] = new Object;
OptionArray[0].children[2].children[0].value = "L1 V1 - L2 V3 - L3 V1";
OptionArray[0].children[2].children[0].label = "L1 L1 - L2 L3 - L3 L1";
OptionArray[0].children[2].children[0].children = new Array;
// Define the second child option of the third level two option of the first level one option.
OptionArray[0].children[2].children[1] = new Object;
OptionArray[0].children[2].children[1].value = "L1 V1 - L2 V3 - L3 V2";
OptionArray[0].children[2].children[1].label = "L1 L1 - L2 L3 - L3 L2";
OptionArray[0].children[2].children[1].children = new Array;
// Define the third child option of the third level two option of the first level one option.
OptionArray[0].children[2].children[2] = new Object;
OptionArray[0].children[2].children[2].value = "L1 V1 - L2 V3 - L3 V3";
OptionArray[0].children[2].children[2].label = "L1 L1 - L2 L3 - L3 L3";
OptionArray[0].children[2].children[2].children = new Array;
// Define the second level one option.
OptionArray[1] = new Object;
OptionArray[1].value = "L1 Value 2";
OptionArray[1].label = "L1 Label 2";
OptionArray[1].children = new Array;
// Define the first child option of the second level one option.
...
~Jeff
ruler
Jeff,
I have changed the script a little. Like u said i have put an array Object and put in all the values.
I am using a java script function to do the cascade dropdown.
But i think i still have some problems ..I have attached the new file.
Can you pls let me know if i am doing something wrong .
All i am doing is using this function "Update" <select onchange="update(this, cars)" size="1" name="ProductId">
Trying to make this work.
Thanks.
brandon1
I think you forgot the file.
Current Project: TS 6.1
Environment: Windows
ruler
Sorry...Here it is
jbonifaci
Forgot it again...
Scripting.rptdesign
ruler
Think there is some problem...Here u go
<?xml version="1.0" standalone="no"?>
<!DOCTYPE datacapture SYSTEM "datacapture5.0.dtd">
<data-capture-requirements type="content" name="Alltext">
<!-- data-capture-requirements elements contain area elements -->
<ruleset name="Alltext">
<description>Alltext</description>
<container name="Alltext">
<item name="Text">
<text required="f" size="50" maxlength="200">
<cgi-callout url="/iw-bin/iw_cgi_wrapper.cgi/datacapture_callout.ipl/test.txt" label="Search" window-features="width=800,height=600,scrollbars=yes,resizable=yes,status=yes,location=yes"/>
</text>
</item>
<item name="FilePath">
<!--browser size="50" extns=".gif,.jpg" initial-dir="/templatedata/chairpersontoolkit/Alltext/images/" ceiling-dir=""/ -->
<browser extns=".gif,.jpg" size="56" required="t" initial-dir="/templatedata/chairpersontoolkit/Alltext/images" ceiling-dir="/templatedata/chairpersontoolkit/Alltext/images"/>
</item>
<item name="FileType">
<label>FileType</label>
<select>
<option value="1" label="DOC"></option>
<option value="2" label="PDF"></option>
<option value="3" label="PPT"></option>
<option value="4" label="ZIP"></option>
<option value="5" label="JPG"></option>
</select>
</item>
<item name="Active" rowcontinue="f" >
<label>Active</label>
<radio required="t">
<option value="Y" label="Yes" />
<option selected = "t" value="N" label="No" />
</radio>
</item>
<item name="ReplicantItems">
<label>Replicant Items</label>
<replicant min="1" max="4">
<item name="RegionId">
<label>Region ID</label>
<select onchange="update(this, cars)" size="1" name="RegionId">
<option>Please select</option>
<option></option>
<option></option>
<option></option>
</select>
</item>
<item name="ProductId">
<label>Product ID</label>
<select onchange="update(this, cars)" size="1" name="ProductId">
<option>Please select</option>
<option></option>
<option></option>
<option></option>
</select>
</item>
<item name="ReplicantCategory">
<replicant min="1" max="12">
<item name="Category">
<label>Category</label>
<select onchange="update(this, cars)" size="1" name="Category">
<option>Please select</option>
<option></option>
<option></option>
<option></option>
</select>
</item>
<item name="ReplicantSubCategory">
<replicant min="1" max="12">
<item name="Sub Category">
<label>Sub Category</label>
<select>
<option value="1" label="Book Talks"></option>
<option value="2" label="Read alouds"></option>
<option value="3" label="Preschool-Clifford"></option>
<option value="4" label="Family event Invitations"></option>
<option value="5" label="Bookmarks"></option>
<option value="1" label="Floorplans"></option>
<option value="2" label="Checklists"></option>
</select>
</item>
</replicant>
</item>
</replicant>
</item>
</replicant>
</item>
</container>
<script> <![CDATA[
var cars = new Array(
new Array("form","RegionId","ProductId","Category"),
new Array(true,"Lincoln","Continental","Black"),
new Array(true,"Lincoln","Continental","Silver"),
new Array(true,"Lincoln","TownCar","Green"),
new Array(true,"Acura","Legend","Blue"),
new Array(true,"Acura","Legend","Black"),
new Array(true,"Acura","Integra","Black")
);
function init() {
IWEventRegistry.addFormHandler("onClose", handle_close);
// To set the initial state of the form, call the event
// handlers now.
IWEventRegistry.addItemHandler("/ReplicantItems/ProductId", "onItemChange", ItemChange);
Itemchange(IWEventRegistry.getItem("/ReplicantItems/ProductId"));
}
function update(e, dd)
{
for (j=1; j < dd.length; j++)
{
dd[0] = true;
}
for (j=1; j < dd[0].length; j++)
{
for (i=1; i < dd.length; i++)
{
current = dd
.split("|");
value = current[0];
choice = current[0];
if (current.length == 2) choice = current[1];
if (value != document[dd[0][0]][dd[0]][document[dd[0][0]][dd[0]].selectedIndex].value) dd
[0] = false;
}
if (e == document[dd[0][0]][dd[0]])
{
dropdown(j+1,dd);
for (k=j+2; k < dd[0].length; k++)
{
document[dd[0][0]][dd[0]].length = 0;
}
break;
}
}
}
function dropdown(item,dd)
{
var pre1 = "";
var j = 1;
document[dd[0][0]][dd[0][item]].options.length = 0;
document[dd[0][0]][dd[0][item]].options[0] = new Option('Select ' + dd[0][item], '');
document[dd[0][0]][dd[0][item]].options[0].selected = true;
for (i=1; i < dd.length; i++)
{
if (dd
[0] || item == 1)
{
current = dd
[item].split("|");
value = current[0];
choice = current[0];
if (current.length == 2) choice = current[1];
if (value != pre1)
{
var op = new Option(choice, value);
document[dd[0][0]][dd[0][item]].options = op;
j++;
pre1 = value;
}
}
}
}
function ItemChange(item)
{
var flag = item.getOptions()[item.getValue()].value == "1";
IWDatacapture.getItem("/ReplicantItems/ProductId").setVisible(flag);
IWDatacapture.getItem("/ReplicantItems/ReplicantCategory/ReplicantSubCategory/SubCategory").setVisible(flag);
IWDatacapture.getItem("/ReplicantItems/ReplicantCategory/Category").setVisible(flag);
}
function unlockDCR() {
//alert ("hello");
var parameters = new Object();
parameters.workarea = parent.gWorkarea;
parameters.dcrname = IWDCRInfo.getDCRName();
parameters.dcrtdt = parent.gTDT;
var server = window.location.hostname;
//alert ("DCRPATH= y:"+ parameters.workarea + "/templatedata/" + parameters.dcrtdt + "/data/" + parameters.dcrname);
IWDatacapture.callServer("http://" + server + "/iw-bin/iw_cgi_wrapper.cgi/formAPI_unlock.ipl", parameters, true);
}
function handle_close() {
//alert ("handle _close");
var isModified1 = IWDCRInfo.isModifiedInWA();
if (isModified1) {
//alert("file is modified");
unlockDCR();
alert ("This template has been unlocked.");
} else {
//alert ("file is not modified");
unlockDCR();
alert ("This template has been unlocked.");
}
return true;
}
init();
]]>
</script>
</ruleset>
</data-capture-requirements>
jbonifaci
Well, this first thing that jumps out at me is that you aren't using the interwoven events for your onItemChange, which you need to do:
IWEventRegistry.addItemHandler('/Item', 'onItemChange', functionName);
You also should be using onFormInit to ensure that the form is completely loaded before your init function is kicked off:
IWEventRegistry.addFormHandler("onFormInit", init());
Why don't you read up on these and see if you are still having problems. You can find documentation on the support site or on your own server at
http://<serverName>/iw/help/tst/formapi
.
~Jeff
brandon1
To elaborate on what Jeff says
onchange="update(this, cars)"
will not fire when the user changes the value of a select.
Current Project: TS 6.1
Environment: Windows
jbonifaci
Another thing I noticed is that it appears you are storing your images in /templatedata/chairpersontoolkit/Alltext/images. The only content that should exist below templatedata are DCRs. Any other content (generated files, images, includes, etc.) should be under their own directory structure apart from templatedata.
~Jeff
ruler
Yes...we are in the process of cleaning all that up.
I am not a full time Interwoven person, just trying to fill in for someone.
Also regarding the original question
I have changed the init function to
function init() {
IWEventRegistry.addFormHandler("onClose", handle_close);
// To set the initial state of the form, call the event
// handlers now.
//IWEventRegistry.addItemHandler("/ReplicantItems/ProductId", "onItemChange", ItemChange);
//Itemchange(IWEventRegistry.getItem("/ReplicantItems/ProductId"));
IWEventRegistry.addItemHandler("/ReplicantItems/ProductId", "onItemChange", update);
update(IWDatacapture.getitem("/ReplicantItems/ProductId"), cars);
}
Is this right ..I feel I need to be doing something in the select options for eaching of these replicant fields but donot know wat i need to do exactly.
I dont see any values in the fields
jbonifaci
One thing with iwov event handler functions is that you can't pass any arguments. So your update function can not have any arguments, besides the item object, which is passed in by default.
Now, the first thing you need to do is test that the event is even being fired. The easiest way to do this is to just throw an alert in your function. One thing I did notice is that you did not include the container name in front of the item name. Change the item name to /Alltext/ReplicantItems/ProductId and it will then fire off the event when the item is changed. One thing to note though, if Product ID has no values, you won't be able to change the value and therefor the event will not be fired.
~Jeff
ruler
Jeff,
This is my new Datacapture.cfg...The itemchange function would not do anything because i dont have the mapping between different fields.
I tried to use the array declaration where i connected ProductId, regionId, category etc but donot know how i am going to call this when i am doing on ItemChange function call which can take only item as a parameter.
<?xml version="1.0" standalone="no"?>
<!DOCTYPE datacapture SYSTEM "datacapture5.0.dtd">
<data-capture-requirements type="content" name="Alltext">
<!-- data-capture-requirements elements contain area elements -->
<ruleset name="Alltext">
<description>Alltext</description>
<container name="Alltext">
<item name="Text">
<text required="f" size="50" maxlength="200">
<cgi-callout url="/iw-bin/iw_cgi_wrapper.cgi/datacapture_callout.ipl/test.txt" label="Search" window-features="width=800,height=600,scrollbars=yes,resizable=yes,status=yes,location=yes"/>
</text>
</item>
<item name="FilePath">
<!--browser size="50" extns=".gif,.jpg" initial-dir="/templatedata/chairpersontoolkit/Alltext/images/" ceiling-dir=""/ -->
<browser extns=".gif,.jpg" size="56" required="t" initial-dir="/templatedata/chairpersontoolkit/Alltext/images" ceiling-dir="/templatedata/chairpersontoolkit/Alltext/images"/>
</item>
<item name="FileType">
<label>FileType</label>
<select>
<option value="1" label="DOC"></option>
<option value="2" label="PDF"></option>
<option value="3" label="PPT"></option>
<option value="4" label="ZIP"></option>
<option value="5" label="JPG"></option>
</select>
</item>
<item name="Active" rowcontinue="f" >
<label>Active</label>
<radio required="t">
<option value="Y" label="Yes" />
<option selected = "t" value="N" label="No" />
</radio>
</item>
<item name="ReplicantItems">
<label>Replicant Items</label>
<replicant min="1" max="4">
<item name="RegionId">
<label>Region ID</label>
<select>
<option value="1" label="1"></option>
<option value="2" label="2"></option>
<option value="3" label="3"></option>
<option value="4" label="4"> </option>
<option value="5" label="5"></option>
</select>
</item>
<item name="ProductId">
<label>Product ID</label>
<select>
<option value="1" label="Product1"></option>
<option value="2" label="Product2"></option>
<option value="3" label="Product3"></option>
<option value="4" label="Product4"> </option>
<option value="5" label="Product5"></option>
</select>
</item>
<item name="ReplicantCategory">
<replicant min="1" max="12">
<item name="Category">
<label>Category</label>
<select>
<option value="1" label="Category1"></option>
<option value="2" label="Category2"></option>
<option value="3" label="Category3"></option>
<option value="4" label="Category4"> </option>
<option value="5" label="Category5"></option>
</select>
</item>
<item name="ReplicantSubCategory">
<replicant min="1" max="12">
<item name="SubCategory">
<label>Sub Category</label>
<select>
<option value="1" label="Book Talks"></option>
<option value="2" label="Read alouds"></option>
<option value="3" label="Preschool-Clifford"></option>
<option value="4" label="Family event Invitations"></option>
<option value="5" label="Bookmarks"></option>
<option value="6" label="Floorplans"></option>
<option value="7" label="Checklists"></option>
</select>
</item>
</replicant>
</item>
</replicant>
</item>
</replicant>
</item>
</container>
<script> <![CDATA[
var records = new Array(
new Array("form","RegionId","ProductId","Category"),
new Array(true,"1","Product1","Category1"),
new Array(true,"1","Product3","Category2"),
new Array(true,"2","Product4","Category3"),
new Array(true,"2","Product5","Category3"),
new Array(true,"3","Product2","Category5"),
new Array(true,"4","Product1","Category4"),
new Array(true,"5","Product3","Category2")
);
function init() {
IWEventRegistry.addFormHandler("onClose", handle_close);
// To set the initial state of the form, call the event
// handlers now.
IWEventRegistry.addItemHandler("/Alltext/ReplicantItems/ProductId", "onItemChange", ItemChange);
//Itemchange(IWEventRegistry.getItem("/ReplicantItems/ProductId"));
//IWEventRegistry.addItemHandler("/Alltext/ReplicantItems/ProductId", "onItemChange", update);
//update(IWDatacapture.getitem("/Alltext/ReplicantItems/ProductId"), cars);
}
function update(e, dd)
{
for (j=1; j < dd.length; j++)
{
dd[0] = true;
}
for (j=1; j < dd[0].length; j++)
{
for (i=1; i < dd.length; i++)
{
current = dd
.split("|");
value = current[0];
choice = current[0];
if (current.length == 2) choice = current[1];
if (value != document[dd[0][0]][dd[0]][document[dd[0][0]][dd[0]].selectedIndex].value) dd
[0] = false;
}
if (e == document[dd[0][0]][dd[0]])
{
dropdown(j+1,dd);
for (k=j+2; k < dd[0].length; k++)
{
document[dd[0][0]][dd[0]].length = 0;
}
break;
}
}
}
function dropdown(item,dd)
{
var pre1 = "";
var j = 1;
document[dd[0][0]][dd[0][item]].options.length = 0;
document[dd[0][0]][dd[0][item]].options[0] = new Option('Select ' + dd[0][item], '');
document[dd[0][0]][dd[0][item]].options[0].selected = true;
for (i=1; i < dd.length; i++)
{
if (dd
[0] || item == 1)
{
current = dd
[item].split("|");
value = current[0];
choice = current[0];
if (current.length == 2) choice = current[1];
if (value != pre1)
{
var op = new Option(choice, value);
document[dd[0][0]][dd[0][item]].options = op;
j++;
pre1 = value;
}
}
}
}
function ItemChange(item)
{
var flag = item.getOptions();
IWDatacapture.getItem("/Alltext/ReplicantItems/ProductId").setVisible(flag);
IWDatacapture.getItem("/Alltext/ReplicantItems/ReplicantCategory/ReplicantSubCategory/SubCategory").setVisible(flag);
IWDatacapture.getItem("/Alltext/ReplicantItems/ReplicantCategory/Category").setVisible(flag);
}
function unlockDCR() {
//alert ("hello");
var parameters = new Object();
parameters.workarea = parent.gWorkarea;
parameters.dcrname = IWDCRInfo.getDCRName();
parameters.dcrtdt = parent.gTDT;
var server = window.location.hostname;
//alert ("DCRPATH= y:"+ parameters.workarea + "/templatedata/" + parameters.dcrtdt + "/data/" + parameters.dcrname);
IWDatacapture.callServer("http://" + server + "/iw-bin/iw_cgi_wrapper.cgi/formAPI_unlock.ipl", parameters, true);
}
function handle_close() {
//alert ("handle _close");
var isModified1 = IWDCRInfo.isModifiedInWA();
if (isModified1) {
//alert("file is modified");
unlockDCR();
alert ("This template has been unlocked.");
} else {
//alert ("file is not modified");
unlockDCR();
alert ("This template has been unlocked.");
}
return true;
}
init();
]]>
</script>
</ruleset>
</data-capture-requirements>
jbonifaci
Hey, I don't have time to look at this today, but if you post it as an attachment, I'll look at it tomorrow. To attach a file, click reply, then make sure to check "I want to preview my post and/or attach a file. Then click the browse button that is given to you in the prview and select the file you want to upload (you can only do 1). Then make sure to hit the continue that is below the preview/browse, not below in the "Edit some more" window.
~Jeff
ruler
Thanks Jeff...I have attached the file.
jbonifaci
Cool, if anyone else hasn't looked at it by tomorrow, I will. I'm heading out for the day though.
~Jeff
jbonifaci
1)
As I mentioned before, you will want to use onFormInit. So replace this line:
init();
With this line:
IWEventRegistry.addFormHandler("onFormInit", init());
Now, this won't fix your problem, but it is something you always want to do when working with formapi to ensure the form is fully loaded before your script begins.
2)
Formatted and commented code is much easier to work with. I know a lot developers say they will go back and make it pretty and add comments, but most never do. It is easier and better to add comments and format well as you code, even if you are in a time cruch. In time it will become second nature and you will wonder how you ever got by before.
3)
For sending examples on devnet it is probably easier to include the javascript right in the DCT, but I would suggest moving all of your formapi/javascript to an external .js file and then including it in your DCT:
<script src='/iw/clientName/datacaptureName.js' />
4)
For changing values and manipluating form elements, you can't use conventional javascript. Or, if you can get it to work, you probably shouldn't be. You really need to sit down and read through the formapi documenation and/or read through all of the formapi help located at
http://<serverName>/iw/help/tst/formapi
. I know you said this isn't your job, but you need to know this stuff in order to deliver a quality product. If you don't have the time, tell your company to hire someone who does.
5)
What relationships do you want between selects. Meaning, which selects are dependant on each other? I noticed that some of your selects are within replicants. Which, lucky for you, will make things a bit more complicated if you have relationships between them. Please define what those relationships are needed.
6)
I have attached your DCT better formatted and with a simple example of populating Product ID based on the selection of Region ID. Also note that these items are both empty in the DCT declaration. The FormAPI populates them on load of the form.
~Jeff
Adam Stoller
You really need to sit down and read through the formapi documenation and/or read through all of the formapi help located at
serverName>http://
serverName
/iw/help/tst/formapi
.
For the record - I believe TeamSite no longer ships with the on-line FormAPI guide (I think it stopped with 6.x - not sure though) - you pretty much need to get the manual now (which isn't bad)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
jbonifaci
Ah, it is still there with 6.1. I guess it was removed with 6.5.
Thanks for clarifying Adam.
~Jeff
ruler
Thanks very much Jeff...sorry for all the trouble...Thanks again!
jbonifaci
No problem, glad to help, just trying to set you on the right path. Good luck applying my example to the rest of your DCT.
~Jeff
ruler
Hey Jeff one more question.
i will be needing to update the "category" based on both "Region+Product" combination.
Taking it further a combination of region+product+category will have unique subcategories.
But IWEventRegistry.addItemHandler doesnot handle 2 items...How do i proceed further?
jbonifaci
The user can only change one item at a time. So if the user changes region, you need to update product and category and sub category. If the user changes product, you need to update category and sub category. If the user changes category, you need to update sub category. Events are triggered off the change of one item. You should be able to apply the concepts and code I wrote for you to get this to work for all levels.
~Jeff