You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by ma...@apache.org on 2006/10/31 01:54:07 UTC

svn commit: r469336 - /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/OutputUtils.java

Author: matzew
Date: Mon Oct 30 17:54:07 2006
New Revision: 469336

URL: http://svn.apache.org/viewvc?view=rev&rev=469336
Log:
ADFFACES-271. OutputUtils.renderImage. Thx Bud

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/OutputUtils.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/OutputUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/OutputUtils.java?view=diff&rev=469336&r1=469335&r2=469336
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/OutputUtils.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/OutputUtils.java Mon Oct 30 17:54:07 2006
@@ -244,13 +244,13 @@
    * Renders an image tag.
    */
   static public void renderImage(
-    FacesContext        context,
+    FacesContext     context,
     RenderingContext arc,
-    Object              absoluteUri,
-    Object              width,
-    Object              height,
-    Object              id,
-    Object              altText
+    Object           absoluteUri,
+    Object           width,
+    Object           height,
+    Object           id,
+    Object           altText
     ) throws IOException
   {
     renderImage(context, arc, absoluteUri,
@@ -258,14 +258,30 @@
   }
 
   static public void renderImage(
-    FacesContext        context,
+    FacesContext     context,
     RenderingContext arc,
-    Object              absoluteUri,
-    Object              width,
-    Object              height,
-    Object              id,
-    Object              altText,
-    UIComponent         comp
+    Object           absoluteUri,
+    Object           width,
+    Object           height,
+    Object           id,
+    Object           altText,
+    UIComponent      comp
+    ) throws IOException
+  {
+    renderImage(context, arc, absoluteUri,
+                width, height, id, altText, comp, null);
+  }
+
+  static public void renderImage(
+    FacesContext     context,
+    RenderingContext arc,
+    Object           absoluteUri,
+    Object           width,
+    Object           height,
+    Object           id,
+    Object           altText,
+    UIComponent      comp,
+    String           inlineStyle
     ) throws IOException
   {
     if (absoluteUri == null)
@@ -290,6 +306,11 @@
     if (height != null)
     {
       writer.writeAttribute("height", height, null);
+    }
+
+    if (inlineStyle != null)
+    {
+      writer.writeAttribute("style", inlineStyle, null);
     }
 
     writer.endElement("img");