Author: jdonnerstag
Date: Sun Apr 15 10:28:26 2007
New Revision: 529033

URL: http://svn.apache.org/viewvc?view=rev&rev=529033
Log:
wicket-374: Allow disable "autoEnable" for wicket:links
I've implemented a realy simple solution, since this feature has not yet been 
requests many times. In order change the default simply set
AutolinkBookmarkablePageLink.autoEnable=false/true.
This a global setting, a per page setting has not yet been implemented.
Please re-open this issue, if you think the solution is not sufficient.

Modified:
    
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/AutoLinkResolver.java

Modified: 
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/AutoLinkResolver.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/AutoLinkResolver.java?view=diff&rev=529033&r1=529032&r2=529033
==============================================================================
--- 
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/AutoLinkResolver.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/resolver/AutoLinkResolver.java
 Sun Apr 15 10:28:26 2007
@@ -143,6 +143,14 @@
 
                private final String anchor;
 
+               /** 
+                * When using <wicket:link> to let Wicket lookup for pages and 
create 
+                * the related links, it's not possible to change the 
"setAutoEnable"
+                * property, which defaults to true. This affects the prototype 
+                * because, sometimes designers _want_ links to be enabled.
+                */
+               public static boolean autoEnable = true;
+               
                /**
                 * Construct
                 * 
@@ -159,7 +167,7 @@
                {
                        super(id, pageClass, parameters);
                        this.anchor = anchor;
-                       setAutoEnable(true);
+                       setAutoEnable(autoEnable);
                }
 
                /**


Reply via email to