You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Kaspar Fischer (JIRA)" <ji...@apache.org> on 2008/06/02 17:25:45 UTC

[jira] Created: (WICKET-1680) AutoCompleteTextField does not validate

AutoCompleteTextField does not validate
---------------------------------------

                 Key: WICKET-1680
                 URL: https://issues.apache.org/jira/browse/WICKET-1680
             Project: Wicket
          Issue Type: Bug
          Components: wicket-extensions
    Affects Versions: 1.4-M2
            Reporter: Kaspar Fischer


validator.w3.org does not validate the markup of AutoCompleteTextField as Strict XHTML 1.0:

  there is no attribute "autocomplete".
  <input value="" autocomplete="off" type="text" class="wide-auto-complete" name=...

Is the 'autocomplete="off"' really needed?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1680) AutoCompleteTextField does not validate

Posted by "Kaspar Fischer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602393#action_12602393 ] 

Kaspar Fischer commented on WICKET-1680:
----------------------------------------

I've just read more about this: http://developer.mozilla.org/en/docs/How_to_Turn_Off_Form_Autocompletion

It appears that there is no way to fix the validation issue.

Sorry for posting before researching.

Kaspar

> AutoCompleteTextField does not validate
> ---------------------------------------
>
>                 Key: WICKET-1680
>                 URL: https://issues.apache.org/jira/browse/WICKET-1680
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.4-M2
>            Reporter: Kaspar Fischer
>
> validator.w3.org does not validate the markup of AutoCompleteTextField as Strict XHTML 1.0:
>   there is no attribute "autocomplete".
>   <input value="" autocomplete="off" type="text" class="wide-auto-complete" name=...
> Is the 'autocomplete="off"' really needed?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-1680) AutoCompleteTextField does not validate

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1680.
-----------------------------------

    Resolution: Invalid

> AutoCompleteTextField does not validate
> ---------------------------------------
>
>                 Key: WICKET-1680
>                 URL: https://issues.apache.org/jira/browse/WICKET-1680
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.4-M2
>            Reporter: Kaspar Fischer
>
> validator.w3.org does not validate the markup of AutoCompleteTextField as Strict XHTML 1.0:
>   there is no attribute "autocomplete".
>   <input value="" autocomplete="off" type="text" class="wide-auto-complete" name=...
> Is the 'autocomplete="off"' really needed?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1680) AutoCompleteTextField does not validate

Posted by "Ian Bacher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664512#action_12664512 ] 

Ian Bacher commented on WICKET-1680:
------------------------------------

I ran into the same issue, but there's a pretty simple work-around, if you don't mind sub-classing AutoCompleteBehavior (either by overriding newAutoCompleteBehavior for the AutoCompleteTextField or in its own class). In your new behavior, override renderHead() with something like:

public void renderHead(IHeaderResponse response) {
        super.renderHead(response);
        reponse.renderOnDomReadyJavascript(String.format("Wicket.$('%s').autocomplete='on';", getComponent().getMarkupId()));
}

Of course, this might not work if you refresh your AutoCompleteTextField via AJAX (which is why setting the attribute on the component itself is the cleanest solution), in which case you should override respond() to do something similar via target.appendJavaScript().

Or you might just decide that strict XHTML validation is not really worth the trouble anyway.

Ian

> AutoCompleteTextField does not validate
> ---------------------------------------
>
>                 Key: WICKET-1680
>                 URL: https://issues.apache.org/jira/browse/WICKET-1680
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.4-M2
>            Reporter: Kaspar Fischer
>
> validator.w3.org does not validate the markup of AutoCompleteTextField as Strict XHTML 1.0:
>   there is no attribute "autocomplete".
>   <input value="" autocomplete="off" type="text" class="wide-auto-complete" name=...
> Is the 'autocomplete="off"' really needed?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.