on 09-30-2006 5:10 AM
Hi All,
My requirement is to fill a dropdown with values in accordance to the selected value of another drop down...
My code is as follows..
private void fillTaxTypes(){
IModifiableSimpleValueSet dropTTValueSet;
IWDAttributeInfo addressAttributeInfo = wdContext.getNodeInfo().getAttribute("vaTaxType");
wdComponentAPI.getMessageManager().reportWarning("check here");
dropTTValueSet = addressAttributeInfo.getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();
//wdComponentAPI.getMessageManager().reportWarning("check there");
int nodeSize = wdContext.nodeCONTRACCOUNTLIST_new().size();
dropTTValueSet.clear();
dropTTValueSet.put("0","Select");
for(int i=0;i<nodeSize;i++){
dropTTValueSet.put(wdContext.nodeCONTRACCOUNTLIST_new().getElementAt(i).getAttributeAsText("cONT_ACCT"),wdContext.nodeCONTRACCOUNTLIST_new().getElementAt(i).getAttributeAsText("cONT_ACCT"));
}
I am calling the method in an action.(event handler)
But I am getting an error...
Kindly suggest me...
Regards
DK
DK,
I guess your problem is with the Variable Type.
Use your view local context variable in the below code.
IWDAttributeInfo addressAttributeInfo = wdContext.getNodeInfo().getAttribute("vaTaxType");
(Or) get the Custom controller / Component Controller context attribute info like this.
IWDAttributeInfo iAttInfo = wdThis.wdGetWelcomeComponentController().wdGetContext().getNodeInfo().getAttribute("vaTaxType");
Hopefully, your problem might have solved.
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,
Whats the Error?
Regards,
SK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you let me know the error you got?
And also is the <b>nodeCONTRACCOUNTLIST_new</b> getting data from a backend?
Regards,
Santhosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.