Skip to main content

inputHidden with readonly behavior explanation

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2013-07-13

When I use the attribute readonly with inputHidden and I do not specify a setter for my bean property the form submission works. But from what I'm reading inputHidden does not support HTML standard tags so why does this work ? Does it even work ? This behavior is observed in JSF 2.2

Sample code

import javax.faces.bean.*; 
public class Bean {
    private int x;

    public int getX() {
        return x;

And the xhtml
        <h:inputHidden value="#{bean.x}" readonly="true"/>
        <h:commandButton value="Yo" />

Thank you.