
Hello,
This is for Updating. I had two SQL queries one for only selected values the user has choosen before and the second SQL query to show all the values. Iwas trying to display multiple selection selected from the list of all the values in the list box. Somehow I can just show only one as selected but not multiple records. Please review my code and need help.
arListSts = getInfoForSelectedDDValues(sqlQryDisplayOnlySelected);
int in = 0;
while(in < arListSts.size()) {
stsCodeVal = (String)arListSts.get(in);
System.out.println(" VAL TO SHOW AS SELECTED "+stsCodeVal );
// } // while arListSts
arListDD = getInfoForDropDown(sqlQryDisplayAll);
if(arListDD != null && arListDD.size() > 0) {
int i = 0;
while(i < arListDD.size()) {
codeVal = arListDD.get(i);
i++;
if(stsCodeVal != null || stsCodeVal.length()!=0){
if(stsCodeVal.equals(codeVal))
{
System.out.println("Status matches !!! );
jspw.println("<option selected value="+codeVal+">"+codeVal+"</option>");
}
else{jspw.println("<option value="+codeVal+">"+codeVal+"</option>");}
}
}
in++;
} // while arListSts
} //If arListsSts not null
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.