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 2010/02/02 21:52:53 UTC
svn commit: r905790 -
/myfaces/tobago/trunk/example/tobago-theme-example/src/main/java/org/apache/myfaces/tobago/renderkit/html/example/standard/tag/InRenderer.java
Author: bommel
Date: Tue Feb 2 20:52:50 2010
New Revision: 905790
URL: http://svn.apache.org/viewvc?rev=905790&view=rev
Log:
fixed compile error
Modified:
myfaces/tobago/trunk/example/tobago-theme-example/src/main/java/org/apache/myfaces/tobago/renderkit/html/example/standard/tag/InRenderer.java
Modified: myfaces/tobago/trunk/example/tobago-theme-example/src/main/java/org/apache/myfaces/tobago/renderkit/html/example/standard/tag/InRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/tobago-theme-example/src/main/java/org/apache/myfaces/tobago/renderkit/html/example/standard/tag/InRenderer.java?rev=905790&r1=905789&r2=905790&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/tobago-theme-example/src/main/java/org/apache/myfaces/tobago/renderkit/html/example/standard/tag/InRenderer.java (original)
+++ myfaces/tobago/trunk/example/tobago-theme-example/src/main/java/org/apache/myfaces/tobago/renderkit/html/example/standard/tag/InRenderer.java Tue Feb 2 20:52:50 2010
@@ -24,8 +24,6 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
/**
* Simple example for dynamic markups.
@@ -53,21 +51,17 @@
super.encodeEnd(facesContext, component);
UIInput input = (UIInput) component;
- List<String> markup = Arrays.asList(input.getMarkup());
- if (markup.contains("changeaware")) {
- String id = input.getClientId(facesContext);
- final String[] cmds = {
- "new Example.ChangeAware('" + id + "');"
- };
- HtmlRendererUtils.writeScriptLoader(facesContext, null, cmds);
- }
- if (markup.contains("blink")) {
- String id = input.getClientId(facesContext);
- final String[] cmds = {
- "new Example.Blinker('" + id + "');"
- };
- HtmlRendererUtils.writeScriptLoader(facesContext, null, cmds);
+ for (String markup : input.getMarkup()) {
+ if (markup.equals("changeaware")) {
+ String id = input.getClientId(facesContext);
+ final String[] cmds = {"new Example.ChangeAware('" + id + "');"};
+ HtmlRendererUtils.writeScriptLoader(facesContext, null, cmds);
+ }
+ if (markup.equals("blink")) {
+ String id = input.getClientId(facesContext);
+ final String[] cmds = {"new Example.Blinker('" + id + "');"};
+ HtmlRendererUtils.writeScriptLoader(facesContext, null, cmds);
+ }
}
}
-
}