myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r432958 - /myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/effect/EffectRenderer.java
Date Sun, 20 Aug 2006 10:11:58 GMT
Author: werpu
Date: Sun Aug 20 03:11:56 2006
New Revision: 432958

URL: http://svn.apache.org/viewvc?rev=432958&view=rev
Log:
fixup for the dojo update, it now works again

Modified:
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/effect/EffectRenderer.java

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/effect/EffectRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/effect/EffectRenderer.java?rev=432958&r1=432957&r2=432958&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/effect/EffectRenderer.java
(original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/effect/EffectRenderer.java
Sun Aug 20 03:11:56 2006
@@ -151,7 +151,10 @@
             String fadeColor = (String) component.getAttributes().get(EffectTag.TAG_PARAM_FADECOLOR);
             fadeColor = (fadeColor != null) ? fadeColor : DEFAULT_FADE_COLOR;
             fadeColor = fadeColor.equals("") ? DEFAULT_FADE_COLOR : fadeColor;
-            return fadeColor;
+            if(fadeColor.trim().matches("^\\\\[(.*\\,)+\\\\]$")) //pattern [col,col,col]
roughly
+            	return fadeColor;
+            else return "\""+fadeColor+"\"";
+            
         }
         return null;
     }
@@ -248,15 +251,16 @@
 
         if (fade != null && fade.booleanValue())
         {
-            writer.startElement(HTML.SCRIPT_ELEM, component);
+            DojoUtils.addRequire(facesContext,component, "dojo.lfx.*");
+        	writer.startElement(HTML.SCRIPT_ELEM, component);
             writer.writeAttribute(HTML.TYPE_ATTR, HTML.SCRIPT_TYPE_TEXT_JAVASCRIPT, null);
             writer.writeAttribute(HTML.SCRIPT_LANGUAGE_ATTR, HTML.SCRIPT_LANGUAGE_JAVASCRIPT,
null);
             StringBuffer commandBuffer = new StringBuffer(128);
-            commandBuffer.append("dojo.fx.html.colorFadeIn(dojo.byId('");
+            commandBuffer.append("dojo.lfx.html.highlight('");
             commandBuffer.append(component.getClientId(facesContext));
-            commandBuffer.append("'),'");
+            commandBuffer.append("',");
             commandBuffer.append(getFadeColor(component));
-            commandBuffer.append("'," + duration.toString() + ");");
+            commandBuffer.append(",0).play(" + duration.toString() + ");");
             writer.write(commandBuffer.toString());
             writer.endElement(HTML.SCRIPT_ELEM);
 



Mime
View raw message