dev@javaserverfaces.java.net

Re: ButtonRenderer encodeBegin

From: Matthias Wessendorf <matzew_at_apache.org>
Date: Thu, 20 Sep 2007 14:48:22 +0200

hi,

history doesn't mean, can be changed in newer versions of the spec, isn't it ?

Trinidad renders commandButtons as <button>...</button>, for instance.

-M

On 9/20/07, Roger Kitain <Roger.Kitain_at_sun.com> wrote:
> I think there was some history as to why we decided to go with "input"
> element
> over "button" element, but I don't recall why.
>
> Matthias Wessendorf wrote:
> > any reason, why the spec doesn't say, render as <button>blah</button> ?
> >
> > -M
> >
> > On 9/19/07, Ryan Lubke <Ryan.Lubke_at_sun.com> wrote:
> >
> >> Gurkan Erdogdu wrote:
> >>
> >>> Hi,
> >>> When I want to add <h:commandButton type='button'>, renderer renders
> >>> it as submit button. Because of the following code in ButtonRenderer
> >>> encodeBegin method
> >>>
> >>> // 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);
> >>> }
> >>>
> >>> Because type not reset and not submit always put submit type.
> >>>
> >>> Is it intentionally written like this?
> >>>
> >> Yes. The renderkit docs [1] clearly state the valid values for the type
> >> attribute.
> >>
> >> [1]
> >> http://java.sun.com/javaee/javaserverfaces/1.2_MR1/docs/renderkitdocs/HTML_BASIC/javax.faces.Commandjavax.faces.Button.html
> >>
> >>> Thanks
> >>> Gurkan
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> ------------------------------------------------------------------------
> >>> Shape Yahoo! in your own image. Join our Network Research Panel today!
> >>> <http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7>
> >>>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> >> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
> >>
> >>
> >>
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>


-- 
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org