cancel
Showing results for 
Search instead for 
Did you mean: 

Value set for model attribute..

Former Member
0 Kudos

How to give value set for model attribute?

plz explain me with some sample code.

Regards,

Srinu

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

thanks for posting.

I didnt understand.can u please explain.

Regards,

srinu

Former Member
0 Kudos

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

Former Member
0 Kudos

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.........

}