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 2008/04/18 19:43:55 UTC
svn commit: r649625 - in /myfaces/tobago/trunk:
example/tobago-theme-example/src/main/java/org/apache/myfaces/tobago/renderkit/html/example/standard/tag/
example/tobago-theme-example/src/main/resources/org/apache/myfaces/tobago/renderkit/html/example/s...
Author: bommel
Date: Fri Apr 18 10:43:53 2008
New Revision: 649625
URL: http://svn.apache.org/viewvc?rev=649625&view=rev
Log:
example for override the required handling in scarborough
Modified:
myfaces/tobago/trunk/example/tobago-theme-example/src/main/java/org/apache/myfaces/tobago/renderkit/html/example/standard/tag/InRenderer.java
myfaces/tobago/trunk/example/tobago-theme-example/src/main/resources/org/apache/myfaces/tobago/renderkit/html/example/standard/script/tobago.js
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/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=649625&r1=649624&r2=649625&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 Fri Apr 18 10:43:53 2008
@@ -18,6 +18,7 @@
*/
import org.apache.myfaces.tobago.component.UIInput;
+import org.apache.myfaces.tobago.component.UIInputBase;
import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
import javax.faces.component.UIComponent;
@@ -41,6 +42,11 @@
*
*/
public class InRenderer extends org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.InRenderer{
+
+ @Override
+ protected void applyExtraStyle(FacesContext facesContext, UIInputBase input, String currentValue) {
+
+ }
@Override
public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
Modified: myfaces/tobago/trunk/example/tobago-theme-example/src/main/resources/org/apache/myfaces/tobago/renderkit/html/example/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/tobago-theme-example/src/main/resources/org/apache/myfaces/tobago/renderkit/html/example/standard/script/tobago.js?rev=649625&r1=649624&r2=649625&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/tobago-theme-example/src/main/resources/org/apache/myfaces/tobago/renderkit/html/example/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/example/tobago-theme-example/src/main/resources/org/apache/myfaces/tobago/renderkit/html/example/standard/script/tobago.js Fri Apr 18 10:43:53 2008
@@ -41,3 +41,7 @@
Example.Blinker = function(id) {
window.setTimeout("Tobago.removeCssClass('" + id + "', 'tobago-in-markup-blink')", 2000);
};
+
+Tobago.In.prototype.setup = function() {
+ // do nothing
+};
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java?rev=649625&r1=649624&r2=649625&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java Fri Apr 18 10:43:53 2008
@@ -119,12 +119,7 @@
}
writer.writeStyleAttribute();
- if (currentValue != null && currentValue.length() > 0
- && ComponentUtil.getBooleanAttribute(input, ATTR_REQUIRED)) {
- StyleClasses styleClasses = StyleClasses.ensureStyleClasses(input);
- String rendererName = HtmlRendererUtil.getRendererName(facesContext, input);
- styleClasses.removeAspectClass(rendererName, StyleClasses.Aspect.REQUIRED);
- }
+ applyExtraStyle(facesContext, input, currentValue);
HtmlRendererUtil.renderDojoDndItem(component, writer, true);
writer.writeClassAttribute();
/*if (component instanceof UIInputBase) {
@@ -178,6 +173,15 @@
HtmlRendererUtil.writeScriptLoader(facesContext, scripts, cmds);
}
+ }
+
+ protected void applyExtraStyle(FacesContext facesContext, UIInputBase input, String currentValue) {
+ if (currentValue != null && currentValue.length() > 0
+ && ComponentUtil.getBooleanAttribute(input, ATTR_REQUIRED)) {
+ StyleClasses styleClasses = StyleClasses.ensureStyleClasses(input);
+ String rendererName = HtmlRendererUtil.getRendererName(facesContext, input);
+ styleClasses.removeAspectClass(rendererName, StyleClasses.Aspect.REQUIRED);
+ }
}
public int encodeAjax(FacesContext context, UIComponent component) throws IOException {