on 05-18-2009 2:07 PM
How to give value set for model attribute?
plz explain me with some sample code.
Regards,
Srinu
Hi,
Use this peace of code
Ymmin_Iv_Vh_Country_Input con = new Ymmin_Iv_Vh_Country_Input();
wdContext.nodeYmmin_Iv_Vh_Country_Input().bind(con);
try {
con.execute();
wdContext.nodeEt_Country().invalidate();
} catch (WDDynamicRFCExecuteException e3) {
wdComponentAPI.getMessageManager().reportException("Error in Country value help" + e3.getMessage(), false);
}
IModifiableSimpleValueSet rep = wdThis.wdGetContext().getContext().getModifiableTypeOf("VHElements.Country").getSVServices().getModifiableSimpleValueSet();
IPublicInvoiceVerification.IEt_CountryElement reple;
size = wdContext.nodeEt_Country().size();
for (int i = 0; i < size; i++) {
reple = wdContext.nodeEt_Country().getEt_CountryElementAt(i);
rep.put(reple.getLand1(), reple.getLandx());
}
Regards
Trilochan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First create a node of cardinality 1.1 with attribute Country,and create an input field,bind this input field with the attribute Country.
Ymmin_Iv_Vh_Country_Input con = new Ymmin_Iv_Vh_Country_Input();(This is the RFC for country value help)
wdContext.nodeYmmin_Iv_Vh_Country_Input().bind(con);
try {
con.execute();//excute the country value help rfc
wdContext.nodeEt_Country().invalidate();
} catch (WDDynamicRFCExecuteException e3) {
wdComponentAPI.getMessageManager().reportException("Error in Country value help" + e3.getMessage(), false);
}
Now Get the result from Output node and set to the attribute Country by this peace of code
IModifiableSimpleValueSet rep = wdThis.wdGetContext().getContext().getModifiableTypeOf("VHElements.Country").getSVServices().getModifiableSimpleValueSet();
IPublicInvoiceVerification.IEt_CountryElement reple;
size = wdContext.nodeEt_Country().size();
for (int i = 0; i < size; i++) {
reple = wdContext.nodeEt_Country().getEt_CountryElementAt(i);
rep.put(reple.getLand1(), reple.getLandx());
}
Regards
Trilochan
Hi,
IPublicInvoiceVerification.IEt_CountryElement reple;
Here IPublicInvoiceVerification is name of customer controller or what ..............................
size = wdContext.nodeEt_Country().size();
for (int i = 0; i < size; i++) {
reple = wdContext.nodeEt_Country().getEt_CountryElementAt(i);
// Error is coming here
Type mismatch: getCtyElementAt(i) is undefined for the type IPublicFlightlistcust.ICtynode.........
}
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.