jsr344-experts@javaserverfaces-spec-public.java.net

[jsr344-experts] Re: PRD Review and pending issues ( HTML passthrough TagDecorator )

From: Edward Burns <edward.burns_at_oracle.com>
Date: Thu, 31 Jan 2013 22:29:38 -0800

>>>>> On Wed, 30 Jan 2013 20:00:15 -0500, Leonardo Uribe <lu4242_at_gmail.com> said:

LU> Hi
LU> Checking the spec of TagDecorator, I notice that it could be a good idea allow
LU> the following syntax:

LU> <a jsf:outcome="..."> --> <h:link outcome="...">

This one I can do and did do in 11541.

LU> <button jsf:outcome="..." --> <h:button outcome="...">

This one I cannot do because <h:button> is specified to render
<input type="button"> but the incoming markup will have it be

<button ...>Button button label</button>

Consider this markup.

<button jsf:outcome="#{bean.outcome1}">Button label</button>

<h:button outcome="#{bean.outcome1}" value="Button label" />

You would think these would render identical markup, but they do not.

Instead you get.

<button type="button"
  onclick="window.location.href='/contextpath/faces/outcome1.xhtml';
  return false;" value="" />
  Button label
  <input type="button"
         onclick="window.location.href='/contextpath/faces/outcome1.xhtml';
        return false;" value="Button label" />
  </input>

</button>

This is not correct. Unless I hear otherwise, I'll just do the first
one, the <a>.

Ed

-- 
| edward.burns_at_oracle.com | office: +1 407 458 0017
| homepage:               | http://ridingthecrest.com/