Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x 597ef45fc -> 35c80feb0


WICKET-5577 Generation of wicket ids with prefix / suffix


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/943a874c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/943a874c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/943a874c

Branch: refs/heads/wicket-6.x
Commit: 943a874c7704f82428697f2a6c2218d00b9bff09
Parents: 597ef45
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Fri May 30 10:30:13 2014 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Fri May 30 10:30:13 2014 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/wicket/Application.java  | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/943a874c/wicket-core/src/main/java/org/apache/wicket/Application.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/Application.java 
b/wicket-core/src/main/java/org/apache/wicket/Application.java
index 514cf2e..b284afc 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Application.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Application.java
@@ -211,6 +211,11 @@ public abstract class Application implements 
UnboundListener, IEventSink
        private IHeaderResponseDecorator headerResponseDecorator;
 
        /**
+        * The generator of markup ids for components
+        */
+       private IMarkupIdGenerator markupIdGenerator = new 
DefaultMarkupIdGenerator();
+
+       /**
         * Checks if the <code>Application</code> threadlocal is set in this 
thread
         * 
         * @return true if {@link Application#get()} can return the instance of 
application, false
@@ -1603,7 +1608,18 @@ public abstract class Application implements 
UnboundListener, IEventSink
        @Deprecated
        public IMarkupIdGenerator getMarkupIdGenerator()
        {
-               return new DefaultMarkupIdGenerator();
+               return markupIdGenerator;
+       }
+
+       /**
+        * Sets a custom generator for the components' markup ids
+        *
+        * @deprecated In Wicket 7.x this method is part of {@link 
org.apache.wicket.settings.def.MarkupSettings}
+        */
+       @Deprecated
+       public void setMarkupIdGenerator(IMarkupIdGenerator markupIdGenerator)
+       {
+               this.markupIdGenerator = Args.notNull(markupIdGenerator, 
"markupIdGenerator");
        }
 
        private static class DefaultExceptionMapperProvider implements 
IProvider<IExceptionMapper>

Reply via email to