We just started to migrate an older jsf 1 project to jsf version 2.3 with new requirements. Currently I am working on pages that use viewparams. what would be the right way to silently ignore wrong parameter-types?
for example with this definition for page searchResults.xhtml:
<f:metadata>
<f:viewParam name="lastPrice"
value="#{ReportAgentBean.lastPrice}" converter="javax.faces.Double"/>
<f:viewParam name="currentPrice"
value="#{ReportAgentBean.currentPrice}" converter="javax.faces.Double"/>
<f:viewParam name="listPrice"
value="#{ReportAgentBean.listPrice}" converter="javax.faces.Double"/>
</f:metadata>
what would be the best approach to ignore invalid parameters or just handle them as null if someone fires a request like:
http://www.ourapp.com/reports/searchResults?lastPrice=undefined?currentPrice=INVALIDSTRING
which ideally would result in:
http://www.ourapp.com/reports/searchResults
thanks for any hint.