on 10-04-2006 4:55 PM
Hi,
My objective is to select a value from a dropdownlistbykey (DDL1) and by doing so it loads some data to another dropdownlistbykey (DDL2).
The problem is that if data is loaded to DDL2 when i make another select on DDL1 the data loaded to DDL2 is the correct and also the previous.
My code is:
ZKKC_Example_Input input = new ZKKC_Example_Input();
wdContext.nodeExample().bind(input);
wdContext.nodeExample().currentExampleElement().modelObject().execute();
IWDAttributeInfo ainfo = wdContext.nodeExample().getNodeInfo().getAttribute("activitieId");
ISimpleTypeModifiable st = info.getModifiableSimpleType();
IModifiableSimpleValueSet vs = st.getSVServices().getModifiableSimpleValueSet();
for(int i=0; i<wdContext.nodeIt_Activitiesbyproject().size(); i++){
example_el = wdContext.nodeExample().getExampletElementAt(i);
if(example_el.getId().equals(filter))
vs.put(example_el.getID(),example_el.getDesc());
}
thanks for any help.
Pedro Barbosa
Hi,
If you want to load Data on DDL1 Selection to DDL2.
Then create a Action and assign it to the DDL1 on Selection Property. Write your logic, in that method to populate second drop down list.
If yo want to keep your Previous values also in DDL2, then
do these below steps in global or (init), hopefully it works for you.
IWDAttributeInfo ainfo = wdContext.nodeExample().getNodeInfo().getAttribute("activitieId");
ISimpleTypeModifiable st = info.getModifiableSimpleType();
IModifiableSimpleValueSet vs = st.getSVServices().getModifiableSimpleValueSet();
For More information go thru the link.
If this is not ur solution, please explain your question in detail.
Regards,
Sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sridhar,
The code i displayed was from the method called on DDL1 selection. The way your saying is to maintain the previous values and that's my problem.
The way my code is working it also keeps the previous values But what i want is to remove the previous data.
I've tried invalidating the node, removing by hand all elements and then made sure the node was empty but after the loop:
for(int i=0; i<wdContext.nodeIt_Activitiesbyproject().size(); i++){
example_el = wdContext.nodeExample().getExampletElementAt(i);
if(example_el.getId().equals(filter))
vs.put(example_el.getID(),example_el.getDesc());
}
all data gets displayed.
I also checked the if statement and is getting true only a couple of times (like it's supposed).
So how can I filter the data?
thanks
Pedro Barbosa
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.