on 06-18-2008 11:29 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
9 | |
9 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.