myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonardo Uribe <lu4...@gmail.com>
Subject Re: Pass-through Attributes support for Trinidad
Date Wed, 19 Apr 2017 20:11:04 GMT
Hi

I think it is safe to only pass the component in
responseWriter.startElement when it is really wanted, and pass null in
other cases. Trinidad overrides the default (and updated)
HtmlResponseWriter, so it is necessary to update the ResponseWriter there
with the new JSF 2.2 logic. There is no other logic involved in that part,
in fact before JSF 2.2, the component was passed but it was just ignored.

In the example I would say the html <input> is the relevant one (the
<label> and the <span> is renderkit decoration).

regards,

Leonardo Uribe



2017-04-19 13:11 GMT-05:00 Bernd Bohmann <bernd.bohmann@googlemail.com>:

> Hello,
>
> with my latest commits on trinidad trunk pass-through Attributes should
> work.
>
> But there are some open questions.
>
> Inside some Renderer there are several calls to
> responseWriter.startElement with a component instance.
>
> For example inputText will result following Html rendering:
>
>
> <tr:inputText label="Username:" simple="true">
>     <f:passThroughAttribute name="placeholder" value="Enter username"/>
> </tr:inputText>
>
> <span placeholder="[Enter username]" class="af_inputText">
>   <input placeholder="[Enter username]" id="id" name="id"
> class="af_inputText_content" size="30" type="text">
>   <label placeholder="[Enter username]" for="id" class="p_OraHiddenLabel">
> Username:</label>
> </span>
>
> I could reduce the usage of responseWriter.startElement with a component
> instance. But then it will be only rendered inside the span element and not
> inside the input element.
>
> Now I'm asking for feedback, suggestions.... and of cause bug reports
>
> Thanks
>
> Bernd
>

Mime
View raw message