Duplicate Attribute > disabled="disabled" disabled="true"

UI Components for JSF
Post Reply
aziru
Posts: 2
Joined: 13 Oct 2010, 12:42

13 Oct 2010, 13:09

Version Primefaces 2.2M1
JSF Impl: Mojarra 2.0.3
IE Explorer: 7.0.57
Firefox: 3.6.10 Ubuntu/Windows
Chromiun: 6.0.47

When we are using a tag with the attribute disable like calendar, when we see the code generate for the tag we can see something like this:

XHTML CODE:

Code: Select all

<p:calendar id="feResultado" clearfield="true" value="#{bean.resultado.feResultado}" disabled="true" pattern="dd/MM/yyyy" locale="es" readOnlyInputText="true" navigator="true" showOn="button" popupIconOnly="true" inputStyleClass="width100"/>
HTML CODE GENERATE

Code: Select all

<span id="feResultado"><input id="feResultado_input" name="feResultado_input" type="text" class="width100" readonly="readonly" disabled="disabled" disabled="true" /></span><script type="text/javascript">
In Internet Explorer and firefox (ubuntu) we haven't any problem, but in firefox (windows) and google chrome we can see an error and the pages doesn't rendered correctly, we can see something like this:

Code: Select all

Error de lectura XML: atributo duplicado
Ubicación: http://10.1.103.55:8080/bdjuridicas/jsp/module/conflictividad_institucional/alta.xhtml
Número de línea 248, columna 155:<span id="feResultado"><input id="feResultado_input" name="feResultado_input" type="text" class="width100" readonly="readonly" disabled="disabled" disabled="true" /></span><script type="text/javascript">
If we see into the calendar classes we can see that Calendar.java has a property called "INPUT_TEXT_ATTRS_WITHOUT_EVENTS", in this array have the string "disabled", when this attribute is processing by CalendarRendered.java into the method renderPassThruAttributes (CoreRendered.java) the value assign is true¡¡ This do that the navigator crash, my provisional solution is clear this attribute for INPUT_TEXT_ATTRS_WITHOUT_EVENTS, but this is only a provisional solution for this tag but i think that if this occurred in another tag the result will be the same, an error into our navigator:

Code: Select all

public static String[] INPUT_TEXT_ATTRS_WITHOUT_EVENTS = { "accesskey", "alt", "autocomplete", "dir", "lang", "maxlength", "size", "tabindex", "title", "clearField" };

brownsca
Posts: 9
Joined: 20 Oct 2010, 19:20

13 Nov 2010, 21:47

I have also experienced this problem and webkit definitely gags on this.

I noticed that there is no open issue for this bug. I'm gonna post one, hope that's ok.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

13 Nov 2010, 22:25

Fixed now, thanks!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 51 guests