JSF 1.2 migration to JSF 2 - empty / null values result in errors - workarounds?
===

    <c:set var="xyz" value=""></c:set>

In jsf 2 this will result in a nice error:

    for servlet Faces Servlet threw exception: javax.faces.view.facelets.TagException: /pages/mypage.xhtml @13,28 <c:set> var set with null or empty value

So I will change c:set to ui:param - on 1200 pages :-)))) 

this seems to work like a charm

    <ui:param name="xxx" value=""></ui:param>



More empty string trouble:

This used to work - now no longer works:

    <h:selectOneListbox value="" id="_x12334">
    		<f:selectItem itemLabel="blabla111x" itemValue="1" id="_1"/>
    		<f:selectItem itemLabel="blabla222x" itemValue="2" id="_2"/>
    	</h:selectOneListbox>

It displays correctly on the entry to the page but results in this error when trying to move to a new page

 

    javax.el.PropertyNotWritableException: /pages/mypage.xhtml @16,44 value="": Illegal Syntax for Set Operation



same occurs for 

    h:selectOneMenu

and probably more tags


btw it is only demo reason to set the value hardcoded to `""` normally I would point a bean there

Is there a workaround for this ? because we have a lot of pages and probably a lot of places where some value first can be empty (e.g. it was not set yet).
Is ui:param and c:set 1:1 compatible?


Does maybe a newer EL solve the problem? (i doubt it)

Sidenote: we have like 1000 web pages in our application - so testing everything quickly is not an option, even testing everything 'slowly' is not an option.
[Related][1]



  [1]: http://stackoverflow.com/questions/8725087/migration-jsf-1-2-to-jsf-2-cset-var-set-with-null-or-empty-value