You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2012/07/03 14:21:22 UTC
svn commit: r1356692 -
/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java
Author: bommel
Date: Tue Jul 3 12:21:21 2012
New Revision: 1356692
URL: http://svn.apache.org/viewvc?rev=1356692&view=rev
Log:
TOBAGO-1153: Better look and feel for the tc:file upload
Input elements must have an id. Otherwise they would be disabled inside a popup.
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java?rev=1356692&r1=1356691&r2=1356692&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java Tue Jul 3 12:21:21 2012
@@ -110,6 +110,7 @@ public class FileRenderer extends InputR
final Measure prettyWidthSub = getResourceManager().getThemeMeasure(facesContext, file, "prettyWidthSub");
inputStyle.setWidth(style.getWidth().subtract(prettyWidthSub));
writer.startElement(HtmlElements.INPUT, file);
+ writer.writeIdAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "pretty");
writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.TEXT, false);
writer.writeClassAttribute(Classes.create(file, "pretty"));
writer.writeStyleAttribute(inputStyle);
@@ -118,6 +119,7 @@ public class FileRenderer extends InputR
// invisible file input
writer.startElement(HtmlElements.INPUT, file);
+ writer.writeIdAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "real");
writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.FILE, false);
writer.writeClassAttribute(Classes.create(file, "real"));
writer.writeNameAttribute(clientId);