on 04-10-2008 7:20 AM
Dear frds..
I have drop down index say a,b,c
when i selected value a i shoud create a drop down index by
name a and list a values should be populated..
and when i select value to b
then same as above should be done
Thanks
Shravan
Can you please explain more clearly? Do you want to populate a second drop-down list depending on the selection of the first one?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
create two node elements and bind them for those two dropdowns and try this code
in the wddoinit try this
Hashtable verticle = new Hashtable();
verticle.put("a", "a");
verticle.put("b", "b");
sbi = new Hashtable();
sbi.put("a1", "a1");
sbi.put("a2", "a2");
Hashtable mfg = new Hashtable();
mfg.put("b1", "b1");
mfg.put("b2", "b2");
main = new Hashtable();
main.put("a", sbi);
main.put("b", mfg);
Enumeration keys = verticle.keys();
IPrivateCompView.INamesNode nameNode = wdContext.nodeNames();
while (keys.hasMoreElements()) {
IPrivateCompView.INamesElement ele = nameNode.createNamesElement();
ele.setFirst(keys.nextElement().toString());
nameNode.addElement(ele);
and in the first dropdown on select method
write this code
wdContext.nodeSecondnames().invalidate();
IPrivateCompView.ISecondnamesNode secondnode = wdContext.nodeSecondnames();
Hashtable contacts = new Hashtable ();
contacts = (Hashtable) main.get(new String(wdContext.nodeNames().currentNamesElement().getFirst()));
Enumeration tableKeys = contacts.keys();
while (tableKeys.hasMoreElements()) {
String tableKey = tableKeys.nextElement().toString();
String tableValue = contacts.get(tableKey).toString();
IPrivateCompView.ISecondnamesElement ele = secondnode.createSecondnamesElement();
ele.setSecond(tableValue);
secondnode.addElement(ele);
}
and delclare these hashtables in begin others
Hashtable main = new Hashtable();
Hashtable sbi = new Hashtable();
Hashtable mfg = new Hashtable();
iam giving this for two dropdowns
hope this will be helpful
thanks®ards,
ramani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shravan,
Can you please specify your question more clearly? I am not able to understand your requirement.
Regards,
Gopal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.