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] htt
ps://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 javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help javaserverfaces.dev.java.net
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe javaserverfaces.dev.java.net
For additional commands, e-mail: dev-help javaserverfaces.dev.java.net
|