jsfprimefacesjsf-2viewparams

viewParam with parametername fromName doesn't work


I have the following in my code:

<f:viewParam name="from_name" value="#{bean.fromName}" />

And this parameter doesn't work. I'm absolutely convinced that the getters and setters behind bean.fromName are correct. Yet this parameter doesn't work, while all the other similar parameters in the same file do. If I rename bean.fromName to bean.xfromName and adjust the getters and setters it works. Is fromName a special JSF viewParam value?

Note:

xmlns:f="http://xmlns.jcp.org/jsf/core"

Solution

  • Is your <f:viewParam> tag inside some <f:metadata> tags ?

    <f:metadata>
        <f:viewParam name="from_name" value="#{bean.fromName}" />
    </f:metadata>