cancel
Showing results for 
Search instead for 
Did you mean: 

check box

Former Member
0 Kudos

hiii,

I have a jdbc query from where i get the value of a field called IS_CHARGEABLE.

The logic is , if the value is "Y", the checkbox shud b ticked, if "N",then unticked, if null, then also unticked.

In the 'checked' property of checkbox i have bound it to the value attribute ischargeable.

my code is :

while(group_rs.next())

{

is_Chargeable =group_rs.getString(1);

}

boolean ischargeable=false;

if(is_Chargeable.equalsIgnoreCase("Y"))

{

ischargeable=true;

wdComponentAPI.getMessageManager().reportSuccess("Y");

}

else if(is_Chargeable.equalsIgnoreCase("N"))

{

ischargeable=false;

}

else if(is_Chargeable.equalsIgnoreCase(null))

else

{

ischargeable=false;

}

goElement.setIsChargeable(ischargeable);

NB : group_rs--> IS the resultset

goElement-->the element of the concerned node.

But in the output i get the check-box unticked under all circumstances....Please do suggest.

View Entire Topic
Former Member
0 Kudos

Hi,

just make sure that is_Chargeable is not null before checking

it into if condition add the below loop.

before ur condition.


if(is_Chargeable!=null)

regards

Surender Dahiya