webtier@glassfish.java.net

Re: [webtier] form prependId=false not working

From: Joel Weight <digitaljoel_at_gmail.com>
Date: Mon, 5 Apr 2010 17:28:33 -0600

Sorry, forgot to mention, JSF 2.0.2-b10 on Glassfish V3.

On Mon, Apr 5, 2010 at 5:27 PM, <webtier_at_javadesktop.org> wrote:

> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>