This content has been marked as final.
Show 2 replies
-
1. Re: How convertEntity works with the noSelectionLabel
pmuir Feb 23, 2007 9:39 AM (in response to lmen)There were some problems with s:selectItems in 1.1.6 (fixed in CVS) which meant that noSelectionLabel didn't work quite right.
So, in CVS, if the noSelectionLabel is selected a value of null will be passed to the entity converter, which passes this straight through to the backing bean. I know this doesn't really answer the question, but hopefully you can work out what you want to know from here.
Btw this is an idea for a "Any" option, alternatively you could just write a custom converter from scratch...<h:selectOneMenu id="tipoNivel" value="#{descricaoNivelList.descricaoNivel.descricaoTipoNivel}" converter="foo.converter"> <f:selectItem itemLabel="Any" itemValue="any" /> <s:selectItems value="#{descricaoTipoNivelList.resultList}" var="descricaoTipoNivel" label="#{descricaoTipoNivel.descricao}"/> <ec:convertEntity /> </h:selectOneMenu>
Where you would need to write the foo.converter (make it extend EntityConverter, do something with any, then delegate to EntityConverter) -
2. Re: How convertEntity works with the noSelectionLabel
lmen Feb 23, 2007 12:38 PM (in response to lmen)Thanks a lot for the reply. I have followed the solution to change the entity converter (returning null) because it can be applied more easily to other pages.