It ended up the source of all my problems was an invalid long to string conversion while rendering my select items.
So if you are having endless hassles with a dependent select box in a table try this when you are rendering the lists to make sure you are not rendering a string and matching on long or int:
public List- convertItem(List
- dataItems) {
ArrayList covertedList = new ArrayList();
if (dataItems != null) {
for (Site dataItem : dataItems) {
SelectItem item = new SelectItem(new String(dataItem.getId()), dataItem.getDescription());
covertedList.add(item);
}
}
return covertedList;
}
So if you are having endless hassles with a dependent select box in a table try this when you are rendering the lists to make sure you are not rendering a string and matching on long or int:
public List
ArrayList
if (dataItems != null) {
for (Site dataItem : dataItems) {
SelectItem item = new SelectItem(new String(dataItem.getId()), dataItem.getDescription());
covertedList.add(item);
}
}
return covertedList;
}
Comments
Post a Comment