cancel
Showing results for 
Search instead for 
Did you mean: 

Clearing the values when i select the value of dropdown key

Former Member
0 Kudos

HI Experts,

I have one dropdown field.When i select the one value in dropdown field the corresponding values are displayed in the Input field for e.x 10 values.In onSelect property of dropdown field i have written the code for getting the value for required selected value in the dropdown field.When i select next value in dd field, the corresponding value get displayed, along with that lastly dispalyed values of dd field is also coming for e.x 15 values(i.e along that 10 values).

Where i have clear the lastly selected values?

Thanks in advance

Regards,

Kiruba.R

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

how you populating the dropdown values through code or simple type.

Former Member
0 Kudos

HI,

I have populating the dropdown values from code..

Kiruba

Former Member
0 Kudos

hi,

post the code here,so easy to solve.

Former Member
0 Kudos

**DropDown key**

Yhrin_Bhr_Vh_0001_Input orgunit=new Yhrin_Bhr_Vh_0001_Input(Model);

wdContext.nodeYhrin_Bhr_Vh_0001_Input().bind(orgunit);

try {

orgunit.execute();

wdContext.nodeOutput_org().invalidate();

orgunit.modelInstance().disconnectIfAlive();

} catch (WDDynamicRFCExecuteException e) {

wdComponentAPI.getMessageManager().reportException("Error VH:"+e.toString(),false);

}

//--Group--

IModifiableSimpleValueSet group=wdThis.wdGetWhoIsWhoController().wdGetContext().getContext().getModifiableTypeOf("Proposedvalue.Admingroup").getSVServices().getModifiableSimpleValueSet();

IPrivateOrgUnit.IEt_Admin_Group_orgElement grpele;

int size=wdContext.nodeEt_Admin_Group_org().size();

for(int i=0;i<size;i++) {

grpele =(IPrivateOrgUnit.IEt_Admin_Group_orgElement)wdContext.nodeEt_Admin_Group_org().getElementAt(i);

group.put(grpele.getValue(),grpele.getValue_Text()); }

**onActionSelect**

Yhrin_Bhr_Vh_0001_Input orgunit=new Yhrin_Bhr_Vh_0001_Input();

wdContext.nodeYhrin_Bhr_Vh_0001_Input().bind(orgunit);

orgunit.setI_Werks(wdContext.currentProposedvalueElement().getAdmingroup());

try {

orgunit.execute();

wdContext.nodeOutput_org().invalidate();

orgunit.modelInstance().disconnectIfAlive();

} catch (WDDynamicRFCExecuteException e) {

wdComponentAPI.getMessageManager().reportException("Error VH:"+e.toString(),false);

}

IModifiableSimpleValueSet Paygroup=wdThis.wdGetWhoIsWhoController().wdGetContext().getContext().getModifiableTypeOf("Proposedvalue.Payrolladmin").getSVServices().getModifiableSimpleValueSet();

IPrivateOrgUnit.IEt_Admin_orgElement paele;

int size=wdContext.nodeEt_Admin_org().size();

for(int i=0;i<size;i++)

{

paele =(IPrivateOrgUnit.IEt_Admin_orgElement)wdContext.nodeEt_Admin_org().getElementAt(i);

Paygroup.put(paele.getValue(),paele.getValue_Text());

}

Former Member
0 Kudos

Hi,

use this to populate the values...

observe the underline statement.

IModifiableSimpleValueSet Paygroup=wdThis.wdGetWhoIsWhoController().wdGetContext().getContext().getModifiableTypeOf("Proposedvalue.Payrolladmin").getSVServices().getModifiableSimpleValueSet();

IPrivateOrgUnit.IEt_Admin_orgElement paele;

int size=wdContext.nodeEt_Admin_org().size();

Paygroup.clear()

for(int i=0;i<size;i++)

{

paele =(IPrivateOrgUnit.IEt_Admin_orgElement)wdContext.nodeEt_Admin_org().getElementAt(i);

Paygroup.put(paele.getValue(),paele.getValue_Text());

}

Edited by: Ramesh Babu V on Sep 15, 2008 3:57 PM

Former Member
0 Kudos

Thanks a lot Ramesh Babu.Its working fine.Thanks

Kiruba