incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Hoover" <whoo...@nemours.org>
Subject SelectOneChoice and lost values...
Date Thu, 29 Mar 2007 16:27:49 GMT
Is there any reason why SelectOneChoice (or any other selection component for that matter)
can't check to see if that submitted value is one of the SelectItems values?

Something like:

List<SelectItem> items = SelectItemSupport.getSelectItems(component, SelectItemSupport.getConverter(component));
for (SelectItem item : items) {
	if (item.getValue() != null && item.getValue().equals(value)) {
		return true;
	}
}

The reason is that I have a scenario where the value gets lost due to a UINamingContainer
row index insertion in child components id. This causes the value to be set to an empty String.
Which, in this case, is not a valid SelectOneChoice > SelectItem value.

It just seems logical that the SelectOneChoiceRenderer is already cycling through the List<SelectItem>
that it could also check to see if the submitted value is a valid SelectItem value?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message