Skip to Content
0
Former Member
Mar 16, 2009 at 02:57 PM

Hide Radi Button

17 Views

Hi Friends,

I have a requirement where i have to hide or show radio buttons based on employee SUBTYPE , say example i have three radio buttons like 1. Savings 2. Checking 3. Fixed

Here the Scenario:

String Value = wdContext.currentSubtypesElement().getSubtype();

if (Value = 9U01)

{

I have to show 2 Radio buttons (1. Savings 2. Checking )

}

else{

I ahve to show 3 Radio button that is ( 1. Savings 2. Checking 3.Fixed)

}

To achieve the above functionality i am doing this;

After implementing below give code , if i click on Subtype 01 for Main Bank it is showing 3 Radio buttons as i expected but if i come back and select Subtype 9U01 for Fixed it is till showing 3 Radio Butons where as it should show 2 Radio Buttons.

some how theo Subtype value is not getting refresh when i come back from Detail screen to Overview screen, please help.

	String Value = wdContext.currentSubtypesElement().getSubtype();
	
	if (!Value.equals("9U01") && Value.equals("0") || Value.equals("2") )
	{
	
		Collection coll = new ArrayList();
		IPrivateDetailView.IAccount_type_radiobuttonElement elementRadio0 = wdContext.createAccount_type_radiobuttonElement();
		IPrivateDetailView.IAccount_type_radiobuttonElement elementRadio1 = wdContext.createAccount_type_radiobuttonElement();
		IPrivateDetailView.IAccount_type_radiobuttonElement elementRadio2 = wdContext.createAccount_type_radiobuttonElement();
		elementRadio0.setText(wdThis.wdGetAPI().getComponent().getTextAccessor().getText("Savings"));
		elementRadio0.setValue("01");
		coll.add(elementRadio0);
		elementRadio1.setText(wdThis.wdGetAPI().getComponent().getTextAccessor().getText("Checking"));
		elementRadio1.setValue("02");
		coll.add(elementRadio1);
		elementRadio2.setText("None");

			elementRadio2.setText("Fixed"); 
			elementRadio2.setValue("");
			coll.add(elementRadio2);

		node.bind(coll);
	
	}
else
	{
		Collection coll = new ArrayList();
		IPrivateDetailView.IAccount_type_radiobuttonElement elementRadio0 = wdContext.createAccount_type_radiobuttonElement();
		IPrivateDetailView.IAccount_type_radiobuttonElement elementRadio1 = wdContext.createAccount_type_radiobuttonElement();
		
		elementRadio0.setText(wdThis.wdGetAPI().getComponent().getTextAccessor().getText("Savings"));
		elementRadio0.setValue("01");
		coll.add(elementRadio0);
		elementRadio1.setText(wdThis.wdGetAPI().getComponent().getTextAccessor().getText("Checking"));
		elementRadio1.setValue("02");
		coll.add(elementRadio1);
		node.bind(coll);
		
	}

Thanks

Advance

Edited by: peter Mark on Mar 16, 2009 4:03 PM