You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by titou10 titou10 <ti...@gmail.com> on 2013/05/02 15:01:50 UTC

Myfaces: not existing props handled differently with faces-config/resource-bundle vs f:loadBundle ?

It seems that the handling of unknown properties is different when we
load the resource bundle with  <f:loadbundle> vs declaring it in the
"resource-bundle" clause in faces-config.xml

With :
- no resource-bundle clause in faces-config.xml
- a <f:loadundled var="msg"> tag in the facelets  page
#{msg['not.existing.prop']}  in the page displays
"???not.existing.prop???" on the page which is the expected result

Now, with:
- a resource-bundle clause in faces-config.xml pointing to the
resource bundle (<var>msg</var>)
- no <f:loadundled> tag in the facelets  page
#{msg['not.existing.prop']}  displays the error page with
"javax.faces.FacesException: javax.el.ELException:
/pagesApp/accueil.xhtml: Property 'not.existing.prop' not found on
type java.util.PropertyResourceBundle"

We were expecting the same result in both cases, ie the page
displaying "???not.existing.prop???"
Is this a bug or does it work as design?
FI, Both cases works fine if the property exist in the resource bundle
We use Myfaces embedded in WebSphere v8.5.0.2