[ 
https://issues.apache.org/jira/browse/WICKET-5577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14013382#comment-14013382
 ] 

Martin Grigorov commented on WICKET-5577:
-----------------------------------------

o.a.w.Application#getMarkupIdGenerator() method is a temporary workaround in 
Wicket 6.x. In Wicket 7.x it is part of MarkupSettings and has both getter and 
setter. It is not possible to use IMarkupSettings in Wicket 6.x because this 
will be an API break.
In your application you can do:

public class MyApplication extends WebApplication {

  private IMarkupIdGenerator markupIdGenerator;

  @Override 
  public void init() {
    markupIdGenerator = new CustomMarkupIdGenerator();
  }

  @Override
  public IMarkupIdGenerator getMarkupIdGenerator() {
     return markupIdGenerator;
  }
}

I'd like to avoid polluting the APIs in Wicket 6.x with more deprecated methods 
unless really necessary.

> Generation of wicket ids with prefix / suffix
> ---------------------------------------------
>
>                 Key: WICKET-5577
>                 URL: https://issues.apache.org/jira/browse/WICKET-5577
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.13.0
>         Environment: -
>            Reporter: Tobias Soloschenko
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 6.16.0, 7.0.0-M2
>
>         Attachments: de.tests.wicketid.zip
>
>
> As mentioned in the following post of the users mailing list:
> http://wicket-users.markmail.org/message/54lo4i4qwoqtmuqv?q=tobias+soloschenko
> It would be great to be able to change the way wicket ids are generated so 
> that it is possible to define a custom prefix / suffix.
> Example:
> Without prefix
> <div id="menuItem32">...</div>
> With prefix
> <div id=" ns_Z7_0G8AH001I8CJD0AKTUU2F21004__menuItem32">...</div>
> "ns_Z7_0G8AH001I8CJD0AKTUU2F21004__" would be the prefix.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to