dev@javaserverfaces.java.net

Re: type button for ButtonRenderer

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Thu, 30 Aug 2007 09:13:49 -0700

 From the relevant section of the renderkit specification:

Type of button to create. Valid values are "submit" and "reset". If not
specified, or not a valid value, the default value is "submit".

At any rate, feel free to log an enhancement against the spec [1].

[1] https://javaserverfaces-spec-public.dev.java.net.


Yann Simon wrote:
> Hi!
>
> I'm using JSF ri 1.2_04.
> I wanted to create a input of type button.
>
> But the code does not let that:
> ButtonRenderer, l. 143:
> // Which button type (SUBMIT, RESET, or BUTTON) should we generate?
> String type = (String) component.getAttributes().get("type");
> String styleClass;
> if (type == null || (!"reset".equals(type) && !"submit".equals(type))) {
> type = "submit";
> // This is needed in the decode method
> component.getAttributes().put("type", type);
> }
>
> The comment let us forsee that we can use the type button, but the
> code lets only submit and reset.
>
> Was the "button" type removed on purpose? Why?
>
> I just ended by writting my own ButtonRenderer, but I found this
> solution "overengineer" :) just for an input of type button.
>
> Yann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>