Thursday, May 24, 2012

ADF Table dependant list select one choice : Thing I learned being stupid final

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());

        return covertedList;

No comments:

Post a Comment