select manylistbox
i am using selectmanylistbox
but when i select some values ,it displays the result for that .next time when i select nothing still it is retaining last selected values.
code is here
jsp
<h:selectManyListbox id="CATG" value="#{PersInp.category}" styleClass="option" style="font-family: Verdana; font-size: 8pt; padding: 0" size="3" >
<f:selectItems id = "CATGLIST" value ="#{PersInp.catgList}" />
</h:selectManyListbox></td>
/**
* set method for category
* @param as_category
*/
public void setCategory(Object[] as_category)
{
int len=0;
if (null == as_category || ( len = as_category.length)==0 )
{
return;
}
category.clear();
category = new ArrayList(len);
for ( int i = 0 ; i < len ; i++)
{
category.add(as_category);
}
}
/**
* get method for category
* @return category
*/
public Object[] getCategory()
{
return category.toArray();
}
also catglist is there

