You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2006/03/16 12:38:00 UTC
svn commit: r386312 -
/incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java
Author: weber
Date: Thu Mar 16 03:37:57 2006
New Revision: 386312
URL: http://svn.apache.org/viewcvs?rev=386312&view=rev
Log:
fix for TOBAGO-6 (Font of the <tc:link> is not correct, if disabled="true" (should be the same font-size, but with color grey))
Modified:
incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java
Modified: incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java?rev=386312&r1=386311&r2=386312&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java (original)
+++ incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java Thu Mar 16 03:37:57 2006
@@ -87,15 +87,14 @@
LabelWithAccessKey label = new LabelWithAccessKey(component);
- if (!ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED)) {
+ if (ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED)) {
+ writer.startElement("span", component);
+ } else {
writer.startElement("a", component);
- writer.writeComponentClass();
- writer.writeNameAttribute(component.getClientId(facesContext));
writer.writeAttribute("href", href, null);
if (onclick != null) {
writer.writeAttribute("onclick", onclick, null);
}
- writer.writeAttribute("title", null, ATTR_TIP);
writer.writeAttribute("target", null, ATTR_TARGET);
if (label.getAccessKey() != null) {
if (LOG.isInfoEnabled()
@@ -104,8 +103,13 @@
}
writer.writeAttribute("accesskey", label.getAccessKey(), null);
}
- writer.writeText("", null); // force closing the start tag
}
+ writer.writeComponentClass();
+ writer.writeNameAttribute(component.getClientId(facesContext));
+ writer.writeAttribute("title", null, ATTR_TIP);
+
+ //TODO: check if this is still needed
+ writer.writeText("", null); // force closing the start tag
// image
String image = (String) component.getAttributes().get(ATTR_IMAGE);
@@ -130,7 +134,9 @@
public void encodeEndTobago(FacesContext facesContext, UIComponent component)
throws IOException {
ResponseWriter writer = facesContext.getResponseWriter();
- if (!ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED)) {
+ if (ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED)) {
+ writer.endElement("span");
+ } else {
writer.endElement("a");
}
}