webtier@glassfish.java.net

Re: [webtier] JSF2 Nightly Build - Custom Component and Form Submit

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Wed, 01 Apr 2009 09:58:29 -0700

On 3/31/09 9:19 AM, webtier_at_javadesktop.org wrote:
> <composite:interface>
> <composite:attribute name="value"/>
> </composite:interface>
>
> <composite:implementation>
> <script type="text/javascript">
> /*<![CDATA[ */
> function isNumberKey(evt)
> {
> var charCode = (evt.which) ? evt.which : event.keyCode
> if (charCode> 31&& (charCode< 48 || charCode> 57))
> return false;
>
> return true;
> }
> /* ]]> */
> </script>
> <h:inputText value="#{compositeComponent.attrs.value}" onkeypress="return isNumberKey(event)"/>
> </composite:implementation>
>
Are you using a Mojarra 2.0.0 nightly build? What container/version is
your app deployed to>

I don't see anything obviously wrong here, and when I attempt this
locally with GFv3, based off the information
you've provided, it seems to work fine.