[ 
https://issues.apache.org/jira/browse/WICKET-5498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-5498.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 7.0.0
         Assignee: Martin Grigorov

For Wicket 7 a new method is added: 
org.apache.wicket.settings.DebugSettings#setComponentPathAttributeName(String).

Its parameter will be used as the name of the attribute if it is not null or 
empty string. It is responsibility of the application to provide a valid 
attribute name.

The old 
org.apache.wicket.settings.DebugSettings#setOutputComponentPath(boolean) is 
still here but is deprecated and will be removed in Wicket 8. It is used only 
when org.apache.wicket.settings.DebugSettings#getComponentPathAttributeName() 
returns an empty value.

The straight migration is:
in MyApp.java:

// replace 
getDebugSettings.setOutputComponentPath(true)

// with
getDebugSettings#setComponentPathAttributeName("wicketpath")

> OutputComponentPath Html5 compliance
> ------------------------------------
>
>                 Key: WICKET-5498
>                 URL: https://issues.apache.org/jira/browse/WICKET-5498
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.11.0
>         Environment: Jetty, Windows7, IE, Firefox
>            Reporter: S. Pieper
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 7.0.0
>
>
> This issue has cropped up in our project because the attribute name 
> "wicket-path" or "wicketpath" is not compliant with html5.
> Custom attributes need to start with "data" as in "data-wicket-path"
> http://www.w3.org/TR/2010/WD-html5-20101019/elements.html#embedding-custom-non-visible-data-with-the-data-attributes
> It would be appreciated if this could be made configurable. It is possible to 
> write a custom implementation of the DebugSettings interface, however, the 
> problem lies in the Component class, where currently the string wicketpath is 
> hardcoded.
> If Component could be adapted like this:
> {{protected void onComponentTag(final ComponentTag tag)}}
> ...
> {{tag.put(getApplication().getDebugSettings().getOutputComponentPath() , 
> path);}}
> IDebugSettings would need two new methods:
> {{String getOutputComponentPath();}}
> {{setOutputComponentPath(boolean enabled,String outputComponentPath);}}
> And the implementation of IDebugSettings in the class DebugSettings would of 
> course have to implement these methods and store the outputComponentpath in a 
> field. 
> This would make it possible to use wicketpath and be html5 compliant.
> This has already been referred to in 
> https://issues.apache.org/jira/browse/WICKET-1877



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to