You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by eh...@apache.org on 2006/10/20 14:09:07 UTC
svn commit: r466083 - in /incubator/wicket/branches/wicket-1.x/wicket/src:
changes/changes.xml main/java/wicket/markup/html/form/FormComponent.java
Author: ehillenius
Date: Fri Oct 20 05:09:05 2006
New Revision: 466083
URL: http://svn.apache.org/viewvc?view=rev&rev=466083
Log:
made tweaking the tag for disabled components possible
Modified:
incubator/wicket/branches/wicket-1.x/wicket/src/changes/changes.xml
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/html/form/FormComponent.java
Modified: incubator/wicket/branches/wicket-1.x/wicket/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/changes/changes.xml?view=diff&rev=466083&r1=466082&r2=466083
==============================================================================
--- incubator/wicket/branches/wicket-1.x/wicket/src/changes/changes.xml (original)
+++ incubator/wicket/branches/wicket-1.x/wicket/src/changes/changes.xml Fri Oct 20 05:09:05 2006
@@ -15,6 +15,7 @@
<release version="1.3" date="tbd" description="Wicket 1.3">
</release>
<release version="1.2.3" description="Wicket 1.2.3">
+ <action type="add" dev="Eelco Hillenius">Added method protected void onDisabled(final ComponentTag tag) to FormComponent, which is called during rendering when the component is disabled. By default, an disabled="disabled" attribute is added, but clients may override this method.</action>
<action type="add" dev="Eelco Hillenius">Made synchronization timeout configurable on an application level. Later, we might add more fine grained control.</action>
<action type="add" dev="Eelco Hillenius">Implemented optional interface for initializers: IDestroyer that may be implemented by initializers to clear up stuff when the application is shut down. Wicket's JMX code uses this to clean up the JMX beans it registered on application shutdown.</action>
<action type="add" dev="Eelco Hillenius">Wicket now has JMX support. For 1.2 as a separate project (wicket-jmx), for 2.0 as part of the core distribution.</action>
Modified: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/html/form/FormComponent.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/html/form/FormComponent.java?view=diff&rev=466083&r1=466082&r2=466083
==============================================================================
--- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/html/form/FormComponent.java (original)
+++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/markup/html/form/FormComponent.java Fri Oct 20 05:09:05 2006
@@ -1079,10 +1079,24 @@
if (!isEnabled() || !isEnableAllowed())
{
- tag.put("disabled", "disabled");
+ onDisabled(tag);
}
super.onComponentTag(tag);
+ }
+
+ /**
+ * Called by {@link #onComponentTag(ComponentTag)} when the component is
+ * disabled. By default, this method will add a disabled="disabled"
+ * attribute to the tag. Components may override this method to tweak the
+ * tag as they think is fit.
+ *
+ * @param tag
+ * the tag that is being rendered
+ */
+ protected void onDisabled(final ComponentTag tag)
+ {
+ tag.put("disabled", "disabled");
}
protected void onDetach()