webtier@glassfish.java.net

form prependId=false not working

From: <webtier_at_javadesktop.org>
Date: Mon, 05 Apr 2010 16:27:51 PDT

I have this form in a composite component

<h:form id="loginForm" prependId="false" >
    <h:outputText value="#{cc.attrs.labelUsername}" />: <h:inputText id="j_username" value="#{cc.attrs.beanUser.username}"/><br/>
    <h:outputText value="#{cc.attrs.labelPassword}" />: <h:inputSecret id="j_password" value="#{cc.attrs.beanUser.password}"/><br />
    <h:commandButton type="submit" id="action" value="#{cc.attrs.labelLogin}" action="#{cc.attrs.action}" />
</h:form>

I would expect the various input IDs not to have the form's id prepended to them. This is the form that I get in my web browser.

<form id="j_idt9:loginForm" name="j_idt9:loginForm" method="post" action="/comp/faces/test/login/testLogin.xhtml" enctype="application/x-www-form-urlencoded">

    <input type="hidden" name="j_idt9:loginForm" value="j_idt9:loginForm" />
    Username: <input id="[b]j_idt9:j_username[/b]" type="text" name="j_idt9:j_username" /><br />
    Password: <input id="[b]j_idt9:j_password[/b]" type="password" name="j_idt9:j_password" value="" /><br />
    <input id="j_idt9:action" type="submit" name="j_idt9:action" value="Submit" />
    <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="3823458531816362878:8106158547383944399" autocomplete="off" />
</form>

Notice the incorrect ids for all controls in the form. Am I using prependId incorrectly, or is it broken?

Thanks,
Joel
[Message sent by forum member 'jweight']

http://forums.java.net/jive/thread.jspa?messageID=395392