JBoss Rich Faces SVN: r17176 - root/ui/core/trunk/api/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-21 10:12:15 -0400 (Fri, 21 May 2010)
New Revision: 17176
Modified:
root/ui/core/trunk/api/src/main/java/org/richfaces/renderkit/html/CommandButtonRendererBase.java
Log:
Fixed incorrect faces-config.xml generation
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/renderkit/html/CommandButtonRendererBase.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/renderkit/html/CommandButtonRendererBase.java 2010-05-21 14:10:54 UTC (rev 17175)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/renderkit/html/CommandButtonRendererBase.java 2010-05-21 14:12:15 UTC (rev 17176)
@@ -23,26 +23,20 @@
package org.richfaces.renderkit.html;
-import org.richfaces.cdk.annotations.JsfRenderer;
-import org.richfaces.renderkit.AjaxCommandRendererBase;
+import java.io.IOException;
-import javax.faces.component.UICommand;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import java.io.IOException;
+import org.richfaces.renderkit.AjaxCommandRendererBase;
+
/**
* @author Nick Belaevski
*
*/
-@JsfRenderer
public abstract class CommandButtonRendererBase extends AjaxCommandRendererBase {
- public static final String COMPONENT_FAMILY = UICommand.COMPONENT_FAMILY;
-
- public static final String RENDERER_TYPE = "org.richfaces.CommandButtonRenderer";
-
protected void encodeTypeAndImage(FacesContext context, UIComponent uiComponent) throws IOException {
ResponseWriter writer = context.getResponseWriter();
String type = (String) uiComponent.getAttributes().get("type");
14 years, 1 month
JBoss Rich Faces SVN: r17175 - in root: core/trunk/impl/src/main/java/org/richfaces/resource/css and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-21 10:10:54 -0400 (Fri, 21 May 2010)
New Revision: 17175
Added:
root/examples/core-demo/trunk/src/main/webapp/skinning.xhtml
Modified:
root/core/trunk/impl/src/main/java/org/richfaces/resource/CompiledCSSResource.java
root/core/trunk/impl/src/main/java/org/richfaces/resource/css/CSSVisitorImpl.java
root/examples/core-demo/trunk/src/main/java/org/richfaces/demo/SkinBean.java
root/examples/core-demo/trunk/src/main/webapp/WEB-INF/web.xml
root/examples/core-demo/trunk/src/main/webapp/welcome.xhtml
Log:
https://jira.jboss.org/browse/RF-8672
Modified: root/core/trunk/impl/src/main/java/org/richfaces/resource/CompiledCSSResource.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/resource/CompiledCSSResource.java 2010-05-21 13:15:51 UTC (rev 17174)
+++ root/core/trunk/impl/src/main/java/org/richfaces/resource/CompiledCSSResource.java 2010-05-21 14:10:54 UTC (rev 17175)
@@ -25,10 +25,12 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.nio.ByteBuffer;
import java.text.MessageFormat;
import javax.faces.application.ProjectStage;
import javax.faces.application.Resource;
+import javax.faces.component.StateHolder;
import javax.faces.context.FacesContext;
import org.richfaces.log.RichfacesLogger;
@@ -47,7 +49,7 @@
/**
* @author amarkhel Class, that represented dynamic CSS resource.
*/
-public class CompiledCSSResource extends AbstractBaseResource {
+public class CompiledCSSResource extends AbstractBaseResource implements StateHolder {
private static final String ECSS = ".ecss";
@@ -159,16 +161,11 @@
return "text/css";
}
- public static String getHash(String path) {
- return Integer.toHexString(getSkinHashCode());
+ private static int getSkinHashCode(FacesContext context) {
+ Skin skin = SkinFactory.getInstance().getSkin(context);
+ return skin.hashCode(context);
}
- private static int getSkinHashCode() {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- Skin skin = SkinFactory.getInstance().getSkin(facesContext);
- return skin.hashCode(facesContext);
- }
-
@Override
public boolean userAgentNeedsUpdate(FacesContext context) {
// TODO nick - review
@@ -234,4 +231,22 @@
}
}
+
+ public boolean isTransient() {
+ return false;
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ //do nothing
+ }
+
+ public Object saveState(FacesContext context) {
+ ByteBuffer buffer = ByteBuffer.allocate(4);
+ buffer.putInt(getSkinHashCode(context));
+ return buffer.array();
+ }
+
+ public void setTransient(boolean newTransientValue) {
+ //do nothing
+ }
}
\ No newline at end of file
Modified: root/core/trunk/impl/src/main/java/org/richfaces/resource/css/CSSVisitorImpl.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/resource/css/CSSVisitorImpl.java 2010-05-21 13:15:51 UTC (rev 17174)
+++ root/core/trunk/impl/src/main/java/org/richfaces/resource/css/CSSVisitorImpl.java 2010-05-21 14:10:54 UTC (rev 17175)
@@ -46,7 +46,6 @@
import org.w3c.dom.css.CSSStyleSheet;
import org.w3c.dom.css.CSSUnknownRule;
import org.w3c.dom.stylesheets.MediaList;
-import org.richfaces.resource.CompiledCSSResource;
/**
* @author Nick Belaevski
@@ -131,9 +130,6 @@
resourceName = resourceName.replaceAll("\"", "").replaceAll("'", "").trim();
}
}
- if (resourceName.indexOf(".ecss") != -1) {
- resourceName = resourceName + CompiledCSSResource.getHash(resourceName);
- }
Resource imported = FacesContext.getCurrentInstance().getApplication().
getResourceHandler().createResource(resourceName);
if (imported == null) {
Modified: root/examples/core-demo/trunk/src/main/java/org/richfaces/demo/SkinBean.java
===================================================================
--- root/examples/core-demo/trunk/src/main/java/org/richfaces/demo/SkinBean.java 2010-05-21 13:15:51 UTC (rev 17174)
+++ root/examples/core-demo/trunk/src/main/java/org/richfaces/demo/SkinBean.java 2010-05-21 14:10:54 UTC (rev 17175)
@@ -2,12 +2,31 @@
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
+import javax.faces.model.SelectItem;
@ManagedBean(name = "skinBean")
@SessionScoped
public class SkinBean {
+
+ private SelectItem[] skinSetItems = {
+ new SelectItem("blueSky"),
+ new SelectItem("classic"),
+ new SelectItem("deepMarine"),
+ new SelectItem("DEFAULT"),
+ new SelectItem("emeraldTown"),
+ new SelectItem("japanCherry"),
+ new SelectItem("NULL"),
+ new SelectItem("plain"),
+ new SelectItem("ruby"),
+ new SelectItem("wine")
+ };
+
private String skin = "classic";
+ private boolean enableElementsSkinning = true;
+
+ private boolean enableClassesSkinning = false;
+
public String getSkin() {
return skin;
}
@@ -15,4 +34,24 @@
public void setSkin(String skin) {
this.skin = skin;
}
+
+ public boolean isEnableElementsSkinning() {
+ return enableElementsSkinning;
+ }
+
+ public void setEnableElementsSkinning(boolean enableElementsSkinning) {
+ this.enableElementsSkinning = enableElementsSkinning;
+ }
+
+ public boolean isEnableClassesSkinning() {
+ return enableClassesSkinning;
+ }
+
+ public void setEnableClassesSkinning(boolean enableClassesSkinning) {
+ this.enableClassesSkinning = enableClassesSkinning;
+ }
+
+ public SelectItem[] getSkinSetItems() {
+ return skinSetItems;
+ }
}
Modified: root/examples/core-demo/trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- root/examples/core-demo/trunk/src/main/webapp/WEB-INF/web.xml 2010-05-21 13:15:51 UTC (rev 17174)
+++ root/examples/core-demo/trunk/src/main/webapp/WEB-INF/web.xml 2010-05-21 14:10:54 UTC (rev 17175)
@@ -14,8 +14,23 @@
<param-name>org.richfaces.SKIN</param-name>
<param-value>#{skinBean.skin}</param-value>
</context-param>
+
+ <context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING</param-name>
+ <param-value>#{skinBean.enableElementsSkinning ? 'enable' : ''}</param-value>
+ </context-param>
<context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
+ <param-value>#{skinBean.enableClassesSkinning ? 'enable' : ''}</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+
+ <context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
Added: root/examples/core-demo/trunk/src/main/webapp/skinning.xhtml
===================================================================
--- root/examples/core-demo/trunk/src/main/webapp/skinning.xhtml (rev 0)
+++ root/examples/core-demo/trunk/src/main/webapp/skinning.xhtml 2010-05-21 14:10:54 UTC (rev 17175)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j">
+<f:view>
+ <h:head>
+ </h:head>
+ <h:body>
+ <h:form>
+ <h:outputLabel value="Select skin: " for="skinSelector" />
+ <h:selectOneRadio id="skinSelector" value="#{skinBean.skin}"
+ onclick="submit()">
+ <f:selectItems value="#{skinBean.skinSetItems}" />
+ </h:selectOneRadio>
+
+ <br />
+ <h:outputLabel value="Enable skinning via elements: "
+ for="skinViaElementsCheck" />
+ <h:selectBooleanCheckbox id="skinViaElementsCheck"
+ value="#{skinBean.enableElementsSkinning}" onclick="submit()" />
+ <br />
+ <h:outputLabel value="Enable skinning via classes: "
+ for="skinViaClassesCheck" />
+ <h:selectBooleanCheckbox id="skinViaClassesCheck"
+ value="#{skinBean.enableClassesSkinning}" onclick="submit()" />
+ <br />
+
+ <h:commandButton value="Apply" />
+ </h:form>
+
+ Skinned via elements:
+
+ <form>
+ <fieldset>
+ <legend>Legend</legend>
+
+ <button>Test</button>
+ <button disabled="disabled">Test disabled</button>
+
+ <input type="button" value="Test" />
+ <input disabled="disabled" type="button" value="Test disabled" />
+
+ <input type="checkbox" name="check" />
+ <input type="checkbox" name="check" checked="checked"/>
+ <input type="checkbox" name="check" disabled="disabled"/>
+ <input type="checkbox" name="check" checked="checked" disabled="disabled" />
+
+ <input type="file" />
+
+ <input type="radio" name="radio" />
+ <input type="radio" name="radio" checked="checked"/>
+ <input type="radio" name="radio" disabled="disabled" />
+ <input type="radio" name="radio0" checked="checked" disabled="disabled" />
+
+ <input type="text" value="Test" />
+ <input type="text" value="Test disabled" disabled="disabled" />
+ <input type="text" value="Test readonly" readonly="readonly"/>
+
+ <select size="1">
+ <option>Test</option>
+ <option>Test</option>
+ <option>Test</option>
+ <option>Test</option>
+ </select>
+ <select size="1" disabled="disabled">
+ <option>Test</option>
+ <option>Test</option>
+ <option>Test</option>
+ <option>Test</option>
+ </select>
+
+ <select multiple="multiple" size="4">
+ <option>Test</option>
+ <option>Test1</option>
+ <option>Test2</option>
+ <option>Test3</option>
+ </select>
+ <select multiple="multiple" size="4" disabled="disabled">
+ <option>Test</option>
+ <option>Test1</option>
+ <option>Test2</option>
+ <option>Test3</option>
+ </select>
+
+ <br/><br/>
+ <textarea>text</textarea>
+ <textarea disabled="disabled">text disabled</textarea>
+ <textarea readonly="readonly">text readonly</textarea>
+
+ <keygen />
+ <keygen disabled="disabled" />
+ <br /><br />
+ <isindex />
+
+ <a href="#1">Link 1</a>
+ <br />
+ <a href="#2">Link 2</a>
+ </fieldset>
+ </form>
+ </h:body>
+</f:view>
+</html>
\ No newline at end of file
Modified: root/examples/core-demo/trunk/src/main/webapp/welcome.xhtml
===================================================================
--- root/examples/core-demo/trunk/src/main/webapp/welcome.xhtml 2010-05-21 13:15:51 UTC (rev 17174)
+++ root/examples/core-demo/trunk/src/main/webapp/welcome.xhtml 2010-05-21 14:10:54 UTC (rev 17175)
@@ -24,6 +24,7 @@
<li><h:link outcome="queue">a4j:queue</h:link></li>
<li><h:link outcome="repeat">a4j:repeat</h:link></li>
<li><h:link outcome="region">a4j:region</h:link></li>
+ <li><h:link outcome="skinning">controls skinning</h:link></li>
</ul>
</center>
</h:body>
14 years, 1 month
JBoss Rich Faces SVN: r17174 - in root/core/trunk/impl/src/main/java/org/richfaces/renderkit/html: images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-21 09:15:51 -0400 (Fri, 21 May 2010)
New Revision: 17174
Modified:
root/core/trunk/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java
root/core/trunk/impl/src/main/java/org/richfaces/renderkit/html/images/BaseControlBackgroundImage.java
Log:
https://jira.jboss.org/browse/RF-8457
Modified: root/core/trunk/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java 2010-05-21 13:05:57 UTC (rev 17173)
+++ root/core/trunk/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java 2010-05-21 13:15:51 UTC (rev 17174)
@@ -150,7 +150,7 @@
}
public Dimension getDimension() {
- return new Dimension(width, height);
+ return new Dimension(getWidth(), getHeight());
}
/**
@@ -160,6 +160,14 @@
return gradientHeight;
}
+ protected int getHeight() {
+ return height;
+ }
+
+ protected int getWidth() {
+ return width;
+ }
+
/**
* @return the baseColor
*/
Modified: root/core/trunk/impl/src/main/java/org/richfaces/renderkit/html/images/BaseControlBackgroundImage.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/renderkit/html/images/BaseControlBackgroundImage.java 2010-05-21 13:05:57 UTC (rev 17173)
+++ root/core/trunk/impl/src/main/java/org/richfaces/renderkit/html/images/BaseControlBackgroundImage.java 2010-05-21 13:15:51 UTC (rev 17174)
@@ -21,14 +21,13 @@
package org.richfaces.renderkit.html.images;
+import javax.faces.context.FacesContext;
+
import org.ajax4jsf.util.NumericDataInputStream;
import org.ajax4jsf.util.NumericDataOutputStream;
import org.richfaces.renderkit.html.BaseGradient;
import org.richfaces.skin.Skin;
-import javax.faces.context.FacesContext;
-import java.awt.*;
-
/**
* Created 23.02.2008
*
@@ -38,10 +37,6 @@
public abstract class BaseControlBackgroundImage extends BaseGradient {
- private static final Dimension DEFAULT_DIMENSION = new Dimension(1, 1);
-
- private Dimension dimension = null;
-
//TODO - lazy initialize?
private Integer height = getHeight(FacesContext.getCurrentInstance(), Skin.GENERAL_SIZE_FONT);
@@ -50,14 +45,10 @@
}
@Override
- public Dimension getDimension() {
- if (dimension != null) {
- return dimension;
- }
-
- return DEFAULT_DIMENSION;
+ protected int getHeight() {
+ return height;
}
-
+
@Override
protected void writeState(FacesContext context,
NumericDataOutputStream stream) {
14 years, 1 month
JBoss Rich Faces SVN: r17173 - in root/core/trunk/impl/src/main: resources/META-INF/resources and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-21 09:05:57 -0400 (Fri, 21 May 2010)
New Revision: 17173
Added:
root/core/trunk/impl/src/main/resources/META-INF/resources/skinning.ecss
root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_both.ecss
root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss
Removed:
root/core/trunk/impl/src/main/resources/META-INF/resources/basic.ecss
root/core/trunk/impl/src/main/resources/META-INF/resources/basic_both.ecss
root/core/trunk/impl/src/main/resources/META-INF/resources/basic_classes.ecss
root/core/trunk/impl/src/main/resources/META-INF/resources/extended.ecss
root/core/trunk/impl/src/main/resources/META-INF/resources/extended_both.ecss
root/core/trunk/impl/src/main/resources/META-INF/resources/extended_classes.ecss
Modified:
root/core/trunk/impl/src/main/java/org/richfaces/context/SkinningResourcesPhaseListener.java
Log:
https://jira.jboss.org/browse/RF-8457
Modified: root/core/trunk/impl/src/main/java/org/richfaces/context/SkinningResourcesPhaseListener.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/context/SkinningResourcesPhaseListener.java 2010-05-21 12:58:49 UTC (rev 17172)
+++ root/core/trunk/impl/src/main/java/org/richfaces/context/SkinningResourcesPhaseListener.java 2010-05-21 13:05:57 UTC (rev 17173)
@@ -51,28 +51,28 @@
private static final String BOTH_ECSS = "_both.ecss";
- private static final String BASIC_CONTROLS;
+ private static final String CONTROLS_SKINNING;
- private static final String BASIC_BOTH;
+ private static final String BOTH_SKINNING;
- private static final String BASIC_CLASSES;
+ private static final String CLASSES_SKINNING;
private static final String STYLESHEET_RENDERER = "javax.faces.resource.Stylesheet";
static {
- String basicName = "basic";
+ String skinningName = "skinning";
- BASIC_CONTROLS = basicName + ECSS;
- BASIC_BOTH = basicName + BOTH_ECSS;
- BASIC_CLASSES = basicName + CLASSES_ECSS;
+ CONTROLS_SKINNING = skinningName + ECSS;
+ BOTH_SKINNING = skinningName + BOTH_ECSS;
+ CLASSES_SKINNING = skinningName + CLASSES_ECSS;
}
- private static final class BasicResourceName extends BaseReadOnlyValueExpression {
+ private static final class SkinningResourceNameExpression extends BaseReadOnlyValueExpression {
private static final long serialVersionUID = 7520575496522682120L;
- public BasicResourceName() {
+ public SkinningResourceNameExpression() {
super(String.class);
}
@@ -84,23 +84,23 @@
boolean classes = ContextInitParameters.isStandardControlSkinningClassesEnabled(facesContext);
if (controls && classes) {
- return BASIC_BOTH;
+ return BOTH_SKINNING;
}
if (classes) {
- return BASIC_CLASSES;
+ return CLASSES_SKINNING;
}
- return BASIC_CONTROLS;
+ return CONTROLS_SKINNING;
}
}
- private static final class BasicResourceRendered extends BaseReadOnlyValueExpression {
+ private static final class SkinningResourceRenderedExpression extends BaseReadOnlyValueExpression {
private static final long serialVersionUID = -1579256471133808739L;
- public BasicResourceRendered() {
+ public SkinningResourceRenderedExpression() {
super(Boolean.TYPE);
}
@@ -138,8 +138,8 @@
attributes.put(RESOURCES_PROCESSED_MARKER, Boolean.TRUE);
UIComponent basic = createComponentResource(context);
- basic.setValueExpression("name", new BasicResourceName());
- basic.setValueExpression("rendered", new BasicResourceRendered());
+ basic.setValueExpression("name", new SkinningResourceNameExpression());
+ basic.setValueExpression("rendered", new SkinningResourceRenderedExpression());
viewRoot.addComponentResource(context, basic);
}
Deleted: root/core/trunk/impl/src/main/resources/META-INF/resources/basic.ecss
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/basic.ecss 2010-05-21 12:58:49 UTC (rev 17172)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/basic.ecss 2010-05-21 13:05:57 UTC (rev 17173)
@@ -1,75 +0,0 @@
-/* basic skinning styles */
-
-input, select, textarea, button, keygen, isindex, legend, a {
- font-size : '#{richSkin.generalSizeFont}';
- font-family : '#{richSkin.generalFamilyFont}';
- color : '#{richSkin.controlTextColor}';
-}
-fieldset {
- border-width: 1px;
- border-style: solid;
- padding: 10px;
- border-color : '#{richSkin.panelBorderColor}';
-}
-hr {
- border-width: 1px;
- border-style: solid;
- border-color : '#{richSkin.panelBorderColor}';
-}
-a {
- color : '#{richSkin.generalLinkColor}';
-}
-a:hover {
- color : '#{richSkin.hoverLinkColor}';
-}
-a:visited {
- color : '#{richSkin.visitedLinkColor}';
-}
-
-/* extended skinning styles */
-
-input, select, textarea, button, keygen, isindex {
- border-width: 1px;
- border-color: '#{richSkin.panelBorderColor}';
- color: '#{richSkin.controlTextColor}';
-}
-
-button, input[type="reset"], input[type="submit"], input[type="button"] {
- border-width: 1px;
- border-color: '#{richSkin.panelBorderColor}';
-
- font-size: '#{richSkin.generalSizeFont}';
- font-family: '#{richSkin.generalFamilyFont}';
- color: '#{richSkin.headerTextColor}';
-
- background-repeat: repeat-x;
- background-position: top left;
- background-color: '#{richSkin.headerBackgroundColor}';
- background-image: "url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
-}
-
-button[disabled], input[type="reset"][disabled], input[type="submit"][disabled], input[type="button"][disabled] {
- color: '#{richSkin.tabDisabledTextColor}';
- border-color: '#{richSkin.tableFooterBackgroundColor}';
- background-color: '#{richSkin.tableFooterBackgroundColor}';
- background-image: "url(#{resource['org.richfaces.renderkit.html.images.ButtonDisabledBackgroundImage']})";
-}
-
-textarea, input[type="text"], input[type="password"], select {
- border-width: 1px;
- border-style: inset;
- border-color: '#{richSkin.panelBorderColor}';
-
- font-size: '#{richSkin.generalSizeFont}';
- font-family: '#{richSkin.generalFamilyFont}';
- color: '#{richSkin.controlTextColor}';
-
- background-repeat: no-repeat;
- background-position: 1px 1px;
- background-color: '#{richSkin.controlBackgroundColor}';
- background-image: "url(#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']})";
-}
-
-textarea[disabled], input[type="text"][disabled], input[type="password"][disabled], select[disabled] {
- color: '#{richSkin.panelBorderColor}';
-}
\ No newline at end of file
Deleted: root/core/trunk/impl/src/main/resources/META-INF/resources/basic_both.ecss
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/basic_both.ecss 2010-05-21 12:58:49 UTC (rev 17172)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/basic_both.ecss 2010-05-21 13:05:57 UTC (rev 17173)
@@ -1,2 +0,0 @@
-@import url("#{resource['basic.ecss']}");
-@import url("#{resource['basic_classes.ecss']}");
\ No newline at end of file
Deleted: root/core/trunk/impl/src/main/resources/META-INF/resources/basic_classes.ecss
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/basic_classes.ecss 2010-05-21 12:58:49 UTC (rev 17172)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/basic_classes.ecss 2010-05-21 13:05:57 UTC (rev 17173)
@@ -1,425 +0,0 @@
-/* basic skinning styles */
-
-.rich-container input, .rich-input, .rich-container select, .rich-select,
-.rich-container textarea, .rich-textarea, .rich-container button, .rich-button,
-.rich-container keygen, .rich-keygen,.rich-container isindex, .rich-isindex,
-.rich-container legend, .rich-legend,.rich-container a, .rich-link,
-.rich-container fieldset, .rich-fieldset,.rich-field, .rich-field-edit, .rich-field-error,
-.rich-button, .rich-button-disabled, .rich-button-over, .rich-button-press {
- font-size : '#{richSkin.generalSizeFont}';
- font-family : '#{richSkin.generalFamilyFont}';
- color : '#{richSkin.controlTextColor}';
-}
-
-.rich-container fieldset, .rich-fieldset {
- border-width: 1px;
- border-style: solid;
- padding: 10px;
-}
-
-.rich-container hr, .rich-hr {
- border-width: 1px;
- border-style: solid;
-}
-
-.rich-container legend, .rich-legend {
- font-weight : bold;
-}
-
-.rich-container form, .rich-form {
- padding : 0px;
- margin : 0px;
-}
-
-.rich-container fieldset, .rich-fieldset{
- border-color : '#{richSkin.panelBorderColor}';
-}
-
-.rich-container hr, .rich-hr{
- border-color : '#{richSkin.panelBorderColor}';
-}
-
-.rich-container a, .rich-link{
- color: '#{richSkin.generalLinkColor}';
-}
-
-.rich-container a:hover, .rich-link:hover{
- color : '#{richSkin.hoverLinkColor}';
-}
-
-.rich-container a:visited, .rich-link:visited{
- color : '#{richSkin.visitedLinkColor}';
-}
-
-.rich-field, .rich-field-edit, .rich-field-error{
- border-width: 1px;
- border-style: inset;
- border-color: '#{richSkin.panelBorderColor}';
-}
-
-.rich-field{
- background-color : '#{richSkin.controlBackgroundColor}';
- background-image : "url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
- background-repeat : no-repeat;
- background-position : 1px 1px;
-}
-
-.rich-field-edit{
- background-color : '#{richSkin.editBackgroundColor}';
-}
-
-.rich-field-error{
- background-color : '#{richSkin.warningBackgroundColor}';
- background-image : "url(#{resource['org.richfaces.renderkit.html.images.InputErrorIcon']})";
- background-repeat : no-repeat;
- background-position : center left;
- padding-left : 7px;
-}
-
-.rich-button, .rich-button-disabled, .rich-button-over, .rich-button-press{
- border-width : 1px;
- border-style : solid;
- border-color : '#{richSkin.panelBorderColor}';
- background-color : '#{richSkin.trimColor}';
- padding : 2px 10px 2px 10px;
- text-align : center;
- cursor : pointer;
- background-repeat : repeat-x;
- background-position : top left;
-}
-
-.rich-button{
- background-image : "url(#{resource['org.richfaces.renderkit.html.images.StandardButtonBgImage']})";
-}
-
-.rich-button-disabled{
- background-image : "url(#{resource['org.richfaces.renderkit.html.images.StandardButtonBgImage']})";
-}
-
-.rich-button-over{
- background-image : "url(#{resource['org.richfaces.renderkit.html.images.StandardButtonBgImage']})";
-}
-
-.rich-button-press{
- background-image : "url(#{resource['org.richfaces.renderkit.html.images.StandardButtonPressedBgImage']})";
- background-position : bottom left;
-}
-
- /*border color styles*/
-
-.rich-box-border-color-control-select{
- border-color : '#{richSkin.selectControlColor}';
-}
-
-.rich-box-border-color-subborder{
- border-color : '#{richSkin.subBorderColor}';
-}
-
-.rich-box-border-color-header{
- border-color : '#{richSkin.headerBackgroundColor}';
-}
-
-.rich-box-border-color-general{
- border-color : '#{richSkin.generalBackgroundColor}';
-}
-
-.rich-box-border-color-additional{
- border-color : '#{richSkin.additionalBackgroundColor}';
-}
-
-.rich-box-border-color-panel{
- border-color : '#{richSkin.panelBorderColor}';
-}
-
-.rich-box-border-color-tip{
- border-color : '#{richSkin.tipBorderColor}';
-}
-
-.rich-box-border-color-table{
- border-color : '#{richSkin.tableBorderColor}';
-}
-
-.rich-box-border-control-select, .rich-box-border-subborder, .rich-box-border-header,
- .rich-box-border-general, .rich-box-border-additional, .rich-box-border-panel, .rich-box-border-tip, .rich-box-border-table{
- border-style : solid;
- border-width : 1px;
-}
-
-.rich-box-border-control-select{
- border-color : '#{richSkin.selectControlColor}';
-}
-
-.rich-box-border-subborder{
- border-color : '#{richSkin.subBorderColor}';
-}
-
-.rich-box-border-header{
- border-color : '#{richSkin.headerBackgroundColor}';
-}
-
-.rich-box-border-general{
- border-color : '#{richSkin.generalBackgroundColor}';
-}
-
-.rich-box-border-additional{
- border-color : '#{richSkin.additionalBackgroundColor}';
-}
-
-.rich-box-border-panel{
- border-color : '#{richSkin.panelBorderColor}';
-}
-
-.rich-box-border-tip{
- border-color : '#{richSkin.tipBorderColor}';
-}
-
-.rich-box-border-table{
- border-color : '#{richSkin.tableBorderColor}';
-}
-
- /*background color styles*/
-
-.rich-box-bgcolor-header{
- background-color : '#{richSkin.headerBackgroundColor}';
-}
-
-.rich-box-bgcolor-general{
- background-color : '#{richSkin.generalBackgroundColor}';
-}
-
-.rich-box-bgcolor-additional{
- background-color : '#{richSkin.additionalBackgroundColor}';
-}
-
-.rich-box-bgcolor-panel{
- background-color : '#{richSkin.panelBorderColor}';
-}
-
-.rich-box-bgcolor-tab{
- background-color : '#{richSkin.tabBackgroundColor}';
-}
-
-.rich-box-bgcolor-trim{
- background-color : '#{richSkin.trimColor}';
-}
-
-.rich-box-bgcolor-tip{
- background-color : '#{richSkin.tipBackgroundColor}';
-}
-
-.rich-box-bgcolor-table{
- background-color : '#{richSkin.tableBackgroundColor}';
-}
-
-.rich-box-bgcolor-table-footer{
- background-color : '#{richSkin.tableFooterBackgroundColor}';
-}
-
-.rich-box-bgcolor-table-subfooter{
- background-color : '#{richSkin.tableSubfooterBackgroundColor}';
-}
-
-.rich-box-bgcolor-editor{
- background-color : '#{richSkin.editorBackgroundColor}';
-}
-
-.rich-box-bgcolor-edit{
- background-color : '#{richSkin.editBackgroundColor}';
-}
-
- /*text color styles*/
-
-.rich-text-color-header{
- color : '#{richSkin.headerTextColor}';
-}
-
-.rich-text-color-general{
- color : '#{richSkin.generalTextColor}';
-}
-
-.rich-text-color-tab-disabled{
- color : '#{richSkin.tabDisabledTextColor}';
-}
-
-.rich-text-color-select{
- color : '#{richSkin.selectControlColor}';
-}
-
-.rich-text-color-link-general{
- color : '#{richSkin.generalLinkColor}';
-}
-
-.rich-text-color-link-hover{
- color : '#{richSkin.hoverLinkColor}';
-}
-
-.rich-text-color-link-visited{
- color : '#{richSkin.visitedLinkColor}';
-}
-
- /*font size styles*/
-
-.rich-font-size-general{
- font-size : '#{richSkin.generalSizeFont}';
-}
-
-.rich-font-size-header{
- font-size : '#{richSkin.headerSizeFont}';
-}
-
- /*font family styles*/
-
-.rich-font-family-general{
- font-family : '#{richSkin.generalFamilyFont}';
-}
-
-.rich-font-family-header{
- font-family : '#{richSkin.headerFamilyFont}';
-}
-
- /* text styles */
-
-.rich-text-general{
- font-size : '#{richSkin.generalSizeFont}';
- font-family : '#{richSkin.generalFamilyFont}';
- color : '#{richSkin.generalTextColor}';
-}
-
-.rich-text-header{
- font-size : '#{richSkin.generalSizeFont}';
- font-family : '#{richSkin.headerFamilyFont}';
- color : '#{richSkin.headerTextColor}';
-}
-
-.rich-text-tab-disabled{
- font-size : '#{richSkin.generalSizeFont}';
- font-family : '#{richSkin.generalFamilyFont}';
- color : '#{richSkin.tabDisabledTextColor}';
-}
-
-.rich-text-control-select{
- font-size : '#{richSkin.generalSizeFont}';
- font-family : '#{richSkin.headerFamilyFont};
- color : '#{richSkin.selectControlColor}';
-}
-
- /*gradient styles*/
-
-.rich-gradient-header-inverse{
- background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.HeaderInverseGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rich-gradient-header{
- background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.HeaderGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rich-gradient-tab{
- background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.TabGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rich-gradient-tab-inverse{
- background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.TabInverseGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rich-gradient-input{
- background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.InputGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rich-gradient-menu-inverse{
- background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.MenuInverseGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rich-gradient-menu{
- background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.MenuGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rich-gradient-button-inverse{
- background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.ButtonInverseGradientImage']})";
- background-repeat : repeat-x;
-}
-
-.rich-gradient-button{
- background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.ButtonGradientImage']})";
- background-repeat : repeat-x;
-}
-
-/* extended skinning styles */
-
-.rich-container input, .rich-input,
-.rich-container select, .rich-select,
-.rich-container textarea, .rich-textarea,
-.rich-container button, .rich-button,
-.rich-container keygen, .rich-keygen,
-.rich-container isindex, .rich-isindex {
- border-width:1px;
- border-color:'#{richSkin.panelBorderColor}';
- color:'#{richSkin.controlTextColor}';
-}
-
-.rich-container button, .rich-button,
-.rich-button-button,
-.rich-button-reset,
-.rich-button-submit,
-.rich-container input[type="reset"], .rich-input-reset,
-.rich-container input[type="submit"], .rich-input-submit,
-.rich-container input[type="button"], .rich-input-button {
- border-width: 1px;
- border-color:'#{richSkin.panelBorderColor}';
-
- background-repeat : repeat-x;
- background-position : top left;
- background-color:'#{richSkin.headerBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
-
- font-size:'#{richSkin.generalSizeFont}';
- font-family:'#{richSkin.generalFamilyFont}';
- color:'#{richSkin.headerTextColor}';
-}
-
-.rich-container button[disabled], .rich-button-disabled,
-.rich-button-button-disabled,
-.rich-button-reset-disabled,
-.rich-button-submit-disabled,
-.rich-container input[type="reset"][disabled], .rich-input-reset-disabled,
-.rich-container input[type="submit"][disabled], .rich-input-submit-disabled,
-.rich-container input[type="button"][disabled], .rich-input-button-disabled {
- color:'#{richSkin.tabDisabledTextColor}';
- background-color:'#{richSkin.tableFooterBackgroundColor}';
- border-color:'#{richSkin.tableFooterBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonDisabledBackgroundImage']})";
-}
-
-
-.rich-container textarea, .rich-textarea,
-.rich-textarea-textarea,
-.rich-container input[type="text"], .rich-input-text,
-.rich-container input[type="password"], .rich-input-password,
-.rich-container select, .rich-select {
- border-width: 1px;
- border-style : inset;
- border-color:'#{richSkin.panelBorderColor}';
-
- background-repeat : no-repeat;
- background-position : 1px 1px;
- background-color:'#{richSkin.controlBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']})";
-
- font-size:'#{richSkin.generalSizeFont}';
- font-family:'#{richSkin.generalFamilyFont}';
- color:'#{richSkin.controlTextColor}';
-}
-
-.rich-container textarea[disabled], .rich-textarea-disabled,
-.rich-textarea-textarea-disabled,
-.rich-container input[type="text"][disabled], .rich-input-text-disabled,
-.rich-container input[type="password"][disabled], .rich-input-password-disabled,
-.rich-container select[disabled], .rich-select-disabled {
- color:'#{richSkin.panelBorderColor}';
-}
\ No newline at end of file
Deleted: root/core/trunk/impl/src/main/resources/META-INF/resources/extended.ecss
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/extended.ecss 2010-05-21 12:58:49 UTC (rev 17172)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/extended.ecss 2010-05-21 13:05:57 UTC (rev 17173)
@@ -1,86 +0,0 @@
-input, select, textarea, button, keygen, isindex{
- border-width:1px;
- border-color:'#{richSkin.panelBorderColor}';
- color:'#{richSkin.controlTextColor}';
-}
-
-
- *|button {
- border-width: 1px;
- background-repeat : repeat-x;
- background-position : top left;
- }
-
- button[type="button"], button[type="reset"], button[type="submit"], input[type="reset"], input[type="submit"], input[type="button"] {
- border-width: 1px;
- background-repeat : repeat-x;
- background-position : top left;
- }
-
-
- *|button{
- border-color:'#{richSkin.panelBorderColor}';
- font-size:'#{richSkin.generalSizeFont}';
- font-family:'#{richSkin.generalFamilyFont}';
- color:'#{richSkin.headerTextColor}';
- background-color:'#{richSkin.headerBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
-}
-button[type="button"], button[type="reset"], button[type="submit"], input[type="reset"], input[type="submit"], input[type="button"]{
- border-color:'#{richSkin.panelBorderColor}';
- font-size:'#{richSkin.generalSizeFont}';
- font-family:'#{richSkin.generalFamilyFont}';
- color:'#{richSkin.headerTextColor}';
- background-color:'#{richSkin.headerBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
-}
-*|button[disabled]{
- color:'#{richSkin.tabDisabledTextColor}';
- border-color:'#{richSkin.tableFooterBackgroundColor}';
- background-color:'#{richSkin.tableFooterBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonDisabledBackgroundImage']})";
-}
-button[type="button"][disabled], button[type="reset"][disabled], button[type="submit"][disabled], input[type="reset"][disabled], input[type="submit"][disabled], input[type="button"][disabled]{
- color:'#{richSkin.tabDisabledTextColor}';
- border-color:'#{richSkin.tableFooterBackgroundColor}';
- background-color:'#{richSkin.tableFooterBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonDisabledBackgroundImage']})";
-}
-
-
- *|textarea {
- border-width: 1px;
- border-style : inset;
- background-repeat : no-repeat;
- background-position : 1px 1px;
- }
-
- textarea[type="textarea"], input[type="text"], input[type="password"], select {
- border-width: 1px;
- border-style : inset;
- background-repeat : no-repeat;
- background-position : 1px 1px;
- }
-
- *|textarea{
- border-color:'#{richSkin.panelBorderColor}';
- font-size:'#{richSkin.generalSizeFont}';
- font-family:'#{richSkin.generalFamilyFont}';
- color:'#{richSkin.controlTextColor}';
- background-color:'#{richSkin.controlBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']})";
-}
-textarea[type="textarea"], input[type="text"], input[type="password"], select{
- border-color:'#{richSkin.panelBorderColor}';
- font-size:'#{richSkin.generalSizeFont}';
- font-family:'#{richSkin.generalFamilyFont}';
- color:'#{richSkin.controlTextColor}';
- background-color:'#{richSkin.controlBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']})";
-}
-*|textarea[disabled], *|select[disabled]{
- color:'#{richSkin.panelBorderColor}';
-}
-textarea[type="textarea"][disabled], input[type="text"][disabled], input[type="password"][disabled], select[disabled]{
- color:'#{richSkin.panelBorderColor}';
-}
\ No newline at end of file
Deleted: root/core/trunk/impl/src/main/resources/META-INF/resources/extended_both.ecss
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/extended_both.ecss 2010-05-21 12:58:49 UTC (rev 17172)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/extended_both.ecss 2010-05-21 13:05:57 UTC (rev 17173)
@@ -1,2 +0,0 @@
-@import url("#{resource['extended.ecss']}");
-@import url("#{resource['extended_classes.ecss']}");
\ No newline at end of file
Deleted: root/core/trunk/impl/src/main/resources/META-INF/resources/extended_classes.ecss
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/extended_classes.ecss 2010-05-21 12:58:49 UTC (rev 17172)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/extended_classes.ecss 2010-05-21 13:05:57 UTC (rev 17173)
@@ -1,96 +0,0 @@
-.rich-container input, .rich-input, .rich-container select, .rich-select, .rich-container textarea, .rich-textarea, .rich-container button, .rich-button, .rich-container keygen, .rich-keygen, .rich-container isindex, .rich-isindex{
- border-width:1px;
- border-color:'#{richSkin.panelBorderColor}';
- color:'#{richSkin.controlTextColor}';
-}
-
-
- .rich-container *|button, .rich-button {
- border-width: 1px;
- background-repeat : repeat-x;
- background-position : top left;
- }
-
- .rich-button,
- .rich-container button[type="button"], .rich-button-button,
- .rich-container button[type="reset"], .rich-button-reset,
- .rich-container button[type="submit"], .rich-button-submit,
- .rich-container input[type="reset"], .rich-input-reset,
- .rich-container input[type="submit"], .rich-input-submit,
- .rich-container input[type="button"], .rich-input-button {
- border-width: 1px;
- background-repeat : repeat-x;
- background-position : top left;
- }
-
-
- .rich-container *|button, .rich-button{
- border-color:'#{richSkin.panelBorderColor}';
- font-size:'#{richSkin.generalSizeFont}';
- font-family:'#{richSkin.generalFamilyFont}';
- color:'#{richSkin.headerTextColor}';
- background-color:'#{richSkin.headerBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
-}
- .rich-button, .rich-container button[type="button"], .rich-button-button, .rich-container button[type="reset"], .rich-button-reset, .rich-container button[type="submit"], .rich-button-submit, .rich-container input[type="reset"], .rich-input-reset, .rich-container input[type="submit"], .rich-input-submit, .rich-container input[type="button"], .rich-input-button {
- border-color:'#{richSkin.panelBorderColor}';
- font-size:'#{richSkin.generalSizeFont}';
- font-family:'#{richSkin.generalFamilyFont}';
- color:'#{richSkin.headerTextColor}';
- background-color:'#{richSkin.headerBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
-}
-.rich-container *|button[disabled]{
- color:'#{richSkin.tabDisabledTextColor}';
- background-color:'#{richSkin.tableFooterBackgroundColor}';
- border-color:'#{richSkin.tableFooterBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonDisabledBackgroundImage']})";
-}
-.rich-button-disabled, .rich-container button[type="button"][disabled], .rich-button-button-disabled, .rich-container button[type="reset"][disabled], .rich-button-reset-disabled, .rich-container button[type="submit"][disabled], .rich-button-submit-disabled, .rich-container input[type="reset"][disabled], .rich-input-reset-disabled, .rich-container input[type="submit"][disabled], .rich-input-submit-disabled, .rich-container input[type="button"][disabled], .rich-input-button-disabled{
- color:'#{richSkin.tabDisabledTextColor}';
- background-color:'#{richSkin.tableFooterBackgroundColor}';
- border-color:'#{richSkin.tableFooterBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonDisabledBackgroundImage']})";
-}
-
-
- .rich-container *|textarea {
- border-width: 1px;
- border-style : inset;
- background-repeat : no-repeat;
- background-position : 1px 1px;
- }
-
- .rich-textarea,
- .rich-container textarea[type="textarea"], .rich-textarea-textarea,
- .rich-container input[type="text"], .rich-input-text,
- .rich-container input[type="password"], .rich-input-password,
- .rich-container select, .rich-select {
- border-width: 1px;
- border-style : inset;
- background-repeat : no-repeat;
- background-position : 1px 1px;
- }
-
- .rich-container *|textarea{
- border-color:'#{richSkin.panelBorderColor}';
- font-size:'#{richSkin.generalSizeFont}';
- font-family:'#{richSkin.generalFamilyFont}';
- color:'#{richSkin.controlTextColor}';
- background-color:'#{richSkin.controlBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']})";
-}
-.rich-textarea, .rich-container textarea[type="textarea"], .rich-textarea-textarea, .rich-container input[type="text"], .rich-input-text, .rich-container input[type="password"], .rich-input-password, .rich-container select, .rich-select{
- border-color:'#{richSkin.panelBorderColor}';
- font-size:'#{richSkin.generalSizeFont}';
- font-family:'#{richSkin.generalFamilyFont}';
- color:'#{richSkin.controlTextColor}';
- background-color:'#{richSkin.controlBackgroundColor}';
- background-image:"url(#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']})";
-}
-.rich-container *|textarea[disabled], .rich-container *|select[disabled]{
- color:'#{richSkin.panelBorderColor}';
-}
-.rich-textarea-disabled, .rich-container textarea[type="textarea"][disabled], .rich-textarea-textarea-disabled, .rich-container input[type="text"][disabled], .rich-input-text-disabled, .rich-container input[type="password"][disabled], .rich-input-password-disabled, .rich-container select[disabled], .rich-select-disabled{
- color:'#{richSkin.panelBorderColor}';
-}
\ No newline at end of file
Copied: root/core/trunk/impl/src/main/resources/META-INF/resources/skinning.ecss (from rev 17172, root/core/trunk/impl/src/main/resources/META-INF/resources/basic.ecss)
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/skinning.ecss (rev 0)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/skinning.ecss 2010-05-21 13:05:57 UTC (rev 17173)
@@ -0,0 +1,75 @@
+/* basic skinning styles */
+
+input, select, textarea, button, keygen, isindex, legend, a {
+ font-size : '#{richSkin.generalSizeFont}';
+ font-family : '#{richSkin.generalFamilyFont}';
+ color : '#{richSkin.controlTextColor}';
+}
+fieldset {
+ border-width: 1px;
+ border-style: solid;
+ padding: 10px;
+ border-color : '#{richSkin.panelBorderColor}';
+}
+hr {
+ border-width: 1px;
+ border-style: solid;
+ border-color : '#{richSkin.panelBorderColor}';
+}
+a {
+ color : '#{richSkin.generalLinkColor}';
+}
+a:hover {
+ color : '#{richSkin.hoverLinkColor}';
+}
+a:visited {
+ color : '#{richSkin.visitedLinkColor}';
+}
+
+/* extended skinning styles */
+
+input, select, textarea, button, keygen, isindex {
+ border-width: 1px;
+ border-color: '#{richSkin.panelBorderColor}';
+ color: '#{richSkin.controlTextColor}';
+}
+
+button, input[type="reset"], input[type="submit"], input[type="button"] {
+ border-width: 1px;
+ border-color: '#{richSkin.panelBorderColor}';
+
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ color: '#{richSkin.headerTextColor}';
+
+ background-repeat: repeat-x;
+ background-position: top left;
+ background-color: '#{richSkin.headerBackgroundColor}';
+ background-image: "url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
+}
+
+button[disabled], input[type="reset"][disabled], input[type="submit"][disabled], input[type="button"][disabled] {
+ color: '#{richSkin.tabDisabledTextColor}';
+ border-color: '#{richSkin.tableFooterBackgroundColor}';
+ background-color: '#{richSkin.tableFooterBackgroundColor}';
+ background-image: "url(#{resource['org.richfaces.renderkit.html.images.ButtonDisabledBackgroundImage']})";
+}
+
+textarea, input[type="text"], input[type="password"], select {
+ border-width: 1px;
+ border-style: inset;
+ border-color: '#{richSkin.panelBorderColor}';
+
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ color: '#{richSkin.controlTextColor}';
+
+ background-repeat: no-repeat;
+ background-position: 1px 1px;
+ background-color: '#{richSkin.controlBackgroundColor}';
+ background-image: "url(#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']})";
+}
+
+textarea[disabled], input[type="text"][disabled], input[type="password"][disabled], select[disabled] {
+ color: '#{richSkin.panelBorderColor}';
+}
\ No newline at end of file
Copied: root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_both.ecss (from rev 17171, root/core/trunk/impl/src/main/resources/META-INF/resources/basic_both.ecss)
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_both.ecss (rev 0)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_both.ecss 2010-05-21 13:05:57 UTC (rev 17173)
@@ -0,0 +1,2 @@
+@import url("#{resource['skinning.ecss']}");
+@import url("#{resource['skinning_classes.ecss']}");
\ No newline at end of file
Copied: root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss (from rev 17172, root/core/trunk/impl/src/main/resources/META-INF/resources/basic_classes.ecss)
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss (rev 0)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/skinning_classes.ecss 2010-05-21 13:05:57 UTC (rev 17173)
@@ -0,0 +1,425 @@
+/* basic skinning styles */
+
+.rich-container input, .rich-input, .rich-container select, .rich-select,
+.rich-container textarea, .rich-textarea, .rich-container button, .rich-button,
+.rich-container keygen, .rich-keygen,.rich-container isindex, .rich-isindex,
+.rich-container legend, .rich-legend,.rich-container a, .rich-link,
+.rich-container fieldset, .rich-fieldset,.rich-field, .rich-field-edit, .rich-field-error,
+.rich-button, .rich-button-disabled, .rich-button-over, .rich-button-press {
+ font-size : '#{richSkin.generalSizeFont}';
+ font-family : '#{richSkin.generalFamilyFont}';
+ color : '#{richSkin.controlTextColor}';
+}
+
+.rich-container fieldset, .rich-fieldset {
+ border-width: 1px;
+ border-style: solid;
+ padding: 10px;
+}
+
+.rich-container hr, .rich-hr {
+ border-width: 1px;
+ border-style: solid;
+}
+
+.rich-container legend, .rich-legend {
+ font-weight : bold;
+}
+
+.rich-container form, .rich-form {
+ padding : 0px;
+ margin : 0px;
+}
+
+.rich-container fieldset, .rich-fieldset{
+ border-color : '#{richSkin.panelBorderColor}';
+}
+
+.rich-container hr, .rich-hr{
+ border-color : '#{richSkin.panelBorderColor}';
+}
+
+.rich-container a, .rich-link{
+ color: '#{richSkin.generalLinkColor}';
+}
+
+.rich-container a:hover, .rich-link:hover{
+ color : '#{richSkin.hoverLinkColor}';
+}
+
+.rich-container a:visited, .rich-link:visited{
+ color : '#{richSkin.visitedLinkColor}';
+}
+
+.rich-field, .rich-field-edit, .rich-field-error{
+ border-width: 1px;
+ border-style: inset;
+ border-color: '#{richSkin.panelBorderColor}';
+}
+
+.rich-field{
+ background-color : '#{richSkin.controlBackgroundColor}';
+ background-image : "url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
+ background-repeat : no-repeat;
+ background-position : 1px 1px;
+}
+
+.rich-field-edit{
+ background-color : '#{richSkin.editBackgroundColor}';
+}
+
+.rich-field-error{
+ background-color : '#{richSkin.warningBackgroundColor}';
+ background-image : "url(#{resource['org.richfaces.renderkit.html.images.InputErrorIcon']})";
+ background-repeat : no-repeat;
+ background-position : center left;
+ padding-left : 7px;
+}
+
+.rich-button, .rich-button-disabled, .rich-button-over, .rich-button-press{
+ border-width : 1px;
+ border-style : solid;
+ border-color : '#{richSkin.panelBorderColor}';
+ background-color : '#{richSkin.trimColor}';
+ padding : 2px 10px 2px 10px;
+ text-align : center;
+ cursor : pointer;
+ background-repeat : repeat-x;
+ background-position : top left;
+}
+
+.rich-button{
+ background-image : "url(#{resource['org.richfaces.renderkit.html.images.StandardButtonBgImage']})";
+}
+
+.rich-button-disabled{
+ background-image : "url(#{resource['org.richfaces.renderkit.html.images.StandardButtonBgImage']})";
+}
+
+.rich-button-over{
+ background-image : "url(#{resource['org.richfaces.renderkit.html.images.StandardButtonBgImage']})";
+}
+
+.rich-button-press{
+ background-image : "url(#{resource['org.richfaces.renderkit.html.images.StandardButtonPressedBgImage']})";
+ background-position : bottom left;
+}
+
+ /*border color styles*/
+
+.rich-box-border-color-control-select{
+ border-color : '#{richSkin.selectControlColor}';
+}
+
+.rich-box-border-color-subborder{
+ border-color : '#{richSkin.subBorderColor}';
+}
+
+.rich-box-border-color-header{
+ border-color : '#{richSkin.headerBackgroundColor}';
+}
+
+.rich-box-border-color-general{
+ border-color : '#{richSkin.generalBackgroundColor}';
+}
+
+.rich-box-border-color-additional{
+ border-color : '#{richSkin.additionalBackgroundColor}';
+}
+
+.rich-box-border-color-panel{
+ border-color : '#{richSkin.panelBorderColor}';
+}
+
+.rich-box-border-color-tip{
+ border-color : '#{richSkin.tipBorderColor}';
+}
+
+.rich-box-border-color-table{
+ border-color : '#{richSkin.tableBorderColor}';
+}
+
+.rich-box-border-control-select, .rich-box-border-subborder, .rich-box-border-header,
+ .rich-box-border-general, .rich-box-border-additional, .rich-box-border-panel, .rich-box-border-tip, .rich-box-border-table{
+ border-style : solid;
+ border-width : 1px;
+}
+
+.rich-box-border-control-select{
+ border-color : '#{richSkin.selectControlColor}';
+}
+
+.rich-box-border-subborder{
+ border-color : '#{richSkin.subBorderColor}';
+}
+
+.rich-box-border-header{
+ border-color : '#{richSkin.headerBackgroundColor}';
+}
+
+.rich-box-border-general{
+ border-color : '#{richSkin.generalBackgroundColor}';
+}
+
+.rich-box-border-additional{
+ border-color : '#{richSkin.additionalBackgroundColor}';
+}
+
+.rich-box-border-panel{
+ border-color : '#{richSkin.panelBorderColor}';
+}
+
+.rich-box-border-tip{
+ border-color : '#{richSkin.tipBorderColor}';
+}
+
+.rich-box-border-table{
+ border-color : '#{richSkin.tableBorderColor}';
+}
+
+ /*background color styles*/
+
+.rich-box-bgcolor-header{
+ background-color : '#{richSkin.headerBackgroundColor}';
+}
+
+.rich-box-bgcolor-general{
+ background-color : '#{richSkin.generalBackgroundColor}';
+}
+
+.rich-box-bgcolor-additional{
+ background-color : '#{richSkin.additionalBackgroundColor}';
+}
+
+.rich-box-bgcolor-panel{
+ background-color : '#{richSkin.panelBorderColor}';
+}
+
+.rich-box-bgcolor-tab{
+ background-color : '#{richSkin.tabBackgroundColor}';
+}
+
+.rich-box-bgcolor-trim{
+ background-color : '#{richSkin.trimColor}';
+}
+
+.rich-box-bgcolor-tip{
+ background-color : '#{richSkin.tipBackgroundColor}';
+}
+
+.rich-box-bgcolor-table{
+ background-color : '#{richSkin.tableBackgroundColor}';
+}
+
+.rich-box-bgcolor-table-footer{
+ background-color : '#{richSkin.tableFooterBackgroundColor}';
+}
+
+.rich-box-bgcolor-table-subfooter{
+ background-color : '#{richSkin.tableSubfooterBackgroundColor}';
+}
+
+.rich-box-bgcolor-editor{
+ background-color : '#{richSkin.editorBackgroundColor}';
+}
+
+.rich-box-bgcolor-edit{
+ background-color : '#{richSkin.editBackgroundColor}';
+}
+
+ /*text color styles*/
+
+.rich-text-color-header{
+ color : '#{richSkin.headerTextColor}';
+}
+
+.rich-text-color-general{
+ color : '#{richSkin.generalTextColor}';
+}
+
+.rich-text-color-tab-disabled{
+ color : '#{richSkin.tabDisabledTextColor}';
+}
+
+.rich-text-color-select{
+ color : '#{richSkin.selectControlColor}';
+}
+
+.rich-text-color-link-general{
+ color : '#{richSkin.generalLinkColor}';
+}
+
+.rich-text-color-link-hover{
+ color : '#{richSkin.hoverLinkColor}';
+}
+
+.rich-text-color-link-visited{
+ color : '#{richSkin.visitedLinkColor}';
+}
+
+ /*font size styles*/
+
+.rich-font-size-general{
+ font-size : '#{richSkin.generalSizeFont}';
+}
+
+.rich-font-size-header{
+ font-size : '#{richSkin.headerSizeFont}';
+}
+
+ /*font family styles*/
+
+.rich-font-family-general{
+ font-family : '#{richSkin.generalFamilyFont}';
+}
+
+.rich-font-family-header{
+ font-family : '#{richSkin.headerFamilyFont}';
+}
+
+ /* text styles */
+
+.rich-text-general{
+ font-size : '#{richSkin.generalSizeFont}';
+ font-family : '#{richSkin.generalFamilyFont}';
+ color : '#{richSkin.generalTextColor}';
+}
+
+.rich-text-header{
+ font-size : '#{richSkin.generalSizeFont}';
+ font-family : '#{richSkin.headerFamilyFont}';
+ color : '#{richSkin.headerTextColor}';
+}
+
+.rich-text-tab-disabled{
+ font-size : '#{richSkin.generalSizeFont}';
+ font-family : '#{richSkin.generalFamilyFont}';
+ color : '#{richSkin.tabDisabledTextColor}';
+}
+
+.rich-text-control-select{
+ font-size : '#{richSkin.generalSizeFont}';
+ font-family : '#{richSkin.headerFamilyFont};
+ color : '#{richSkin.selectControlColor}';
+}
+
+ /*gradient styles*/
+
+.rich-gradient-header-inverse{
+ background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.HeaderInverseGradientImage']})";
+ background-repeat : repeat-x;
+}
+
+.rich-gradient-header{
+ background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.HeaderGradientImage']})";
+ background-repeat : repeat-x;
+}
+
+.rich-gradient-tab{
+ background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.TabGradientImage']})";
+ background-repeat : repeat-x;
+}
+
+.rich-gradient-tab-inverse{
+ background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.TabInverseGradientImage']})";
+ background-repeat : repeat-x;
+}
+
+.rich-gradient-input{
+ background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.InputGradientImage']})";
+ background-repeat : repeat-x;
+}
+
+.rich-gradient-menu-inverse{
+ background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.MenuInverseGradientImage']})";
+ background-repeat : repeat-x;
+}
+
+.rich-gradient-menu{
+ background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.MenuGradientImage']})";
+ background-repeat : repeat-x;
+}
+
+.rich-gradient-button-inverse{
+ background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.ButtonInverseGradientImage']})";
+ background-repeat : repeat-x;
+}
+
+.rich-gradient-button{
+ background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.ButtonGradientImage']})";
+ background-repeat : repeat-x;
+}
+
+/* extended skinning styles */
+
+.rich-container input, .rich-input,
+.rich-container select, .rich-select,
+.rich-container textarea, .rich-textarea,
+.rich-container button, .rich-button,
+.rich-container keygen, .rich-keygen,
+.rich-container isindex, .rich-isindex {
+ border-width:1px;
+ border-color:'#{richSkin.panelBorderColor}';
+ color:'#{richSkin.controlTextColor}';
+}
+
+.rich-container button, .rich-button,
+.rich-button-button,
+.rich-button-reset,
+.rich-button-submit,
+.rich-container input[type="reset"], .rich-input-reset,
+.rich-container input[type="submit"], .rich-input-submit,
+.rich-container input[type="button"], .rich-input-button {
+ border-width: 1px;
+ border-color:'#{richSkin.panelBorderColor}';
+
+ background-repeat : repeat-x;
+ background-position : top left;
+ background-color:'#{richSkin.headerBackgroundColor}';
+ background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
+
+ font-size:'#{richSkin.generalSizeFont}';
+ font-family:'#{richSkin.generalFamilyFont}';
+ color:'#{richSkin.headerTextColor}';
+}
+
+.rich-container button[disabled], .rich-button-disabled,
+.rich-button-button-disabled,
+.rich-button-reset-disabled,
+.rich-button-submit-disabled,
+.rich-container input[type="reset"][disabled], .rich-input-reset-disabled,
+.rich-container input[type="submit"][disabled], .rich-input-submit-disabled,
+.rich-container input[type="button"][disabled], .rich-input-button-disabled {
+ color:'#{richSkin.tabDisabledTextColor}';
+ background-color:'#{richSkin.tableFooterBackgroundColor}';
+ border-color:'#{richSkin.tableFooterBackgroundColor}';
+ background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonDisabledBackgroundImage']})";
+}
+
+
+.rich-container textarea, .rich-textarea,
+.rich-textarea-textarea,
+.rich-container input[type="text"], .rich-input-text,
+.rich-container input[type="password"], .rich-input-password,
+.rich-container select, .rich-select {
+ border-width: 1px;
+ border-style : inset;
+ border-color:'#{richSkin.panelBorderColor}';
+
+ background-repeat : no-repeat;
+ background-position : 1px 1px;
+ background-color:'#{richSkin.controlBackgroundColor}';
+ background-image:"url(#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']})";
+
+ font-size:'#{richSkin.generalSizeFont}';
+ font-family:'#{richSkin.generalFamilyFont}';
+ color:'#{richSkin.controlTextColor}';
+}
+
+.rich-container textarea[disabled], .rich-textarea-disabled,
+.rich-textarea-textarea-disabled,
+.rich-container input[type="text"][disabled], .rich-input-text-disabled,
+.rich-container input[type="password"][disabled], .rich-input-password-disabled,
+.rich-container select[disabled], .rich-select-disabled {
+ color:'#{richSkin.panelBorderColor}';
+}
\ No newline at end of file
14 years, 1 month
JBoss Rich Faces SVN: r17172 - in root/core/trunk: impl/src/main/java/org/ajax4jsf/context and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-21 08:58:49 -0400 (Fri, 21 May 2010)
New Revision: 17172
Added:
root/core/trunk/impl/src/main/java/org/richfaces/context/SkinningResourcesPhaseListener.java
root/core/trunk/impl/src/main/java/org/richfaces/el/
root/core/trunk/impl/src/main/java/org/richfaces/el/BaseReadOnlyValueExpression.java
root/core/trunk/impl/src/main/resources/META-INF/skinning-resources-listener.faces-config.xml
Removed:
root/core/trunk/impl/src/main/java/org/richfaces/context/ContextProvider.java
root/core/trunk/impl/src/main/java/org/richfaces/context/SingletonsContext.java
Modified:
root/core/trunk/api/src/main/java/org/richfaces/application/ServiceTracker.java
root/core/trunk/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
root/core/trunk/impl/src/main/java/org/richfaces/context/PreRenderViewListener.java
root/core/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java
root/core/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java
root/core/trunk/impl/src/main/resources/META-INF/resources/basic.ecss
root/core/trunk/impl/src/main/resources/META-INF/resources/basic_classes.ecss
Log:
https://jira.jboss.org/browse/RF-8664
Modified: root/core/trunk/api/src/main/java/org/richfaces/application/ServiceTracker.java
===================================================================
--- root/core/trunk/api/src/main/java/org/richfaces/application/ServiceTracker.java 2010-05-20 23:27:53 UTC (rev 17171)
+++ root/core/trunk/api/src/main/java/org/richfaces/application/ServiceTracker.java 2010-05-21 12:58:49 UTC (rev 17172)
@@ -23,8 +23,11 @@
import java.util.Collection;
import java.util.Collections;
+import java.util.Date;
import java.util.HashMap;
import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
import javax.faces.context.FacesContext;
@@ -55,6 +58,10 @@
private volatile Map<Class<?>, Object> servicesMap = new HashMap<Class<?>, Object>();
+ private final Date startTime = new Date();
+
+ private final ConcurrentMap<Object, Object> concurrentStorage = new ConcurrentHashMap<Object, Object>();
+
private ServiceTracker() {
//utility class private constructor
}
@@ -215,6 +222,27 @@
serviceTracker.lockModification();
}
+ /**
+ * Returns {@link ServiceTracker} instantiation time. Corresponds to application initialization time.
+ *
+ * @param context
+ * @return instantiation time
+ */
+ public static Date getStartTime(FacesContext context) {
+ return getServiceTracker(context).startTime;
+ }
+
+ /**
+ * Returns {@link ConcurrentMap} stored in {@link ServiceTracker}. This map is intended
+ * to be used as fast application-scoped storage.
+ *
+ * @param context
+ * @return
+ */
+ public static ConcurrentMap<Object, Object> getConcurrentStorage(FacesContext context) {
+ return getServiceTracker(context).concurrentStorage;
+ }
+
private static ServiceTracker getServiceTrackerFromApplicationMap(FacesContext facesContext) {
Object appContext = facesContext.getExternalContext().getContext();
Modified: root/core/trunk/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java 2010-05-20 23:27:53 UTC (rev 17171)
+++ root/core/trunk/impl/src/main/java/org/ajax4jsf/context/ContextInitParameters.java 2010-05-21 12:58:49 UTC (rev 17172)
@@ -21,10 +21,18 @@
package org.ajax4jsf.context;
+import java.util.concurrent.ConcurrentMap;
+
+import javax.el.ExpressionFactory;
+import javax.el.ValueExpression;
import javax.faces.FacesException;
+import javax.faces.application.Application;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
+import org.ajax4jsf.util.ELUtils;
+import org.richfaces.application.ServiceTracker;
+
/**
* This class hold all methods for get application init parameters. Created for
* single access point to all parameters - simplest for a documentation.
@@ -39,10 +47,21 @@
* If is it equals "true" , framework should proparate exception to client-side.
*/
public static final String HANDLE_VIEW_EXPIRED_ON_CLIENT = "org.ajax4jsf.handleViewExpiredOnClient";
- public static final String[] STD_CONTROLS_SKINNING_PARAM = {"org.richfaces.CONTROL_SKINNING"};
- public static final String[] STD_CONTROLS_SKINNING_CLASSES_PARAM = {"org.richfaces.CONTROL_SKINNING_CLASSES"};
- public static final String[] CONTROL_SKINNING_LEVEL = {"org.richfaces.CONTROL_SKINNING_LEVEL"};
+ public static final String STD_CONTROLS_SKINNING_PARAM = "org.richfaces.CONTROL_SKINNING";
+ public static final String STD_CONTROLS_SKINNING_CLASSES_PARAM = "org.richfaces.CONTROL_SKINNING_CLASSES";
public static final String[] GLOBAL_QUEUE_ENABLED = {"org.richfaces.queue.enabled"};
+
+ private static final String ENABLE = "enable";
+
+ private static final String INIT_PARAM_PREFIX = ContextInitParameters.class.getSimpleName() + ":";
+ private static final Object NULL = new Object() {
+
+ public String toString() {
+ return ContextInitParameters.class.getSimpleName() + ": null Object";
+ };
+
+ };
+
/**
*
*/
@@ -74,23 +93,14 @@
}
/**
- * Defines what the skinning level used
- *
- * @param context
- * @return value of CONTROL_SKINNING_LEVEL parameter if present
- */
- public static String getSkinningLevel(FacesContext context) {
- return getInitParameter(context, CONTROL_SKINNING_LEVEL);
- }
-
- /**
* Method for determining STD_CONTROLS_SKINNING_PARAM parameter
*
* @param context
* @return value of STD_CONTROLS_SKINNING_PARAM parameter if present.
*/
- public static String getStandartControlSkinningParameter(FacesContext context) {
- return getInitParameter(context, STD_CONTROLS_SKINNING_PARAM);
+ public static boolean isStandardControlSkinningEnabled(FacesContext context) {
+ String paramValue = evaluateInitParameter(context, STD_CONTROLS_SKINNING_PARAM);
+ return paramValue == null /* by default it's on */ || ENABLE.equals(paramValue);
}
/**
@@ -99,8 +109,8 @@
* @param context
* @return value of STD_CONTROLS_SKINNING_CLASSES_PARAM parameter if present.
*/
- public static String getStandartControlSkinningClassesParameter(FacesContext context) {
- return getInitParameter(context, STD_CONTROLS_SKINNING_CLASSES_PARAM);
+ public static boolean isStandardControlSkinningClassesEnabled(FacesContext context) {
+ return ENABLE.equals(evaluateInitParameter(context, STD_CONTROLS_SKINNING_CLASSES_PARAM));
}
static int getInteger(FacesContext context, String[] paramNames, int defaulValue) {
@@ -152,4 +162,52 @@
return value;
}
-}
+
+ private static ConcurrentMap<Object, Object> getExpressionsMap(FacesContext context) {
+ ConcurrentMap<Object, Object> concurrentStorage = ServiceTracker.getConcurrentStorage(context);
+ return concurrentStorage;
+ }
+
+ private static String evaluateInitParameter(FacesContext context, String parameterName) {
+ ConcurrentMap<Object, Object> expressionsMap = getExpressionsMap(context);
+ String parameterKey = INIT_PARAM_PREFIX + parameterName;
+
+ Object parameterValue = expressionsMap.get(parameterKey);
+ if (parameterValue == null) {
+ String initParameter = context.getExternalContext().getInitParameter(parameterName);
+ if (initParameter != null) {
+
+ if (ELUtils.isValueReference(initParameter)) {
+ Application application = context.getApplication();
+ ExpressionFactory expressionFactory = application.getExpressionFactory();
+
+ parameterValue = expressionFactory.createValueExpression(context.getELContext(),
+ initParameter,
+ String.class);
+ } else {
+ parameterValue = initParameter;
+ }
+
+ } else {
+ parameterValue = NULL;
+ }
+
+ expressionsMap.put(parameterKey, parameterValue);
+ }
+
+ return evaluateInitParameterExpression(context, parameterValue);
+ }
+
+ private static String evaluateInitParameterExpression(FacesContext context, Object parameterValue) {
+ if (parameterValue == NULL || parameterValue == null) {
+ return null;
+ } else if (parameterValue instanceof ValueExpression) {
+ ValueExpression expression = (ValueExpression) parameterValue;
+
+ return (String) expression.getValue(context.getELContext());
+ } else {
+ return parameterValue.toString();
+ }
+ }
+
+}
\ No newline at end of file
Deleted: root/core/trunk/impl/src/main/java/org/richfaces/context/ContextProvider.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/context/ContextProvider.java 2010-05-20 23:27:53 UTC (rev 17171)
+++ root/core/trunk/impl/src/main/java/org/richfaces/context/ContextProvider.java 2010-05-21 12:58:49 UTC (rev 17172)
@@ -1,62 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.context;
-
-import javax.faces.context.FacesContext;
-import java.util.Map;
-
-/**
- * @author akolonitsky
- * @since Oct 13, 2009
- */
-public abstract class ContextProvider {
- protected final String singletonContextAttributeName;
-
- protected ContextProvider(String attributeSuffixName) {
- this.singletonContextAttributeName = SingletonsContext.class.getName() + ':' + attributeSuffixName;
- }
-
- protected static AttributesContext createContext() {
- return new AttributesContext();
- }
-
- protected abstract Map<? super String, Object> getContextMap(FacesContext facesContext);
-
- protected AttributesContext createAndStoreContext(FacesContext context) {
- AttributesContext instance = createContext();
-
- getContextMap(context).put(singletonContextAttributeName, instance);
-
- return instance;
- }
-
- public AttributesContext get(FacesContext context) {
- Map<? super String, Object> contextMap = getContextMap(context);
- AttributesContext instance = (AttributesContext) contextMap.get(singletonContextAttributeName);
-
- if (instance == null) {
- instance = createAndStoreContext(context);
- }
-
- return instance;
- }
-}
Modified: root/core/trunk/impl/src/main/java/org/richfaces/context/PreRenderViewListener.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/context/PreRenderViewListener.java 2010-05-20 23:27:53 UTC (rev 17171)
+++ root/core/trunk/impl/src/main/java/org/richfaces/context/PreRenderViewListener.java 2010-05-21 12:58:49 UTC (rev 17172)
@@ -25,10 +25,6 @@
import java.util.List;
import java.util.Map;
-import org.ajax4jsf.component.QueueRegistry;
-import org.ajax4jsf.context.ContextInitParameters;
-import org.ajax4jsf.javascript.ScriptUtils;
-
import javax.faces.component.UIComponent;
import javax.faces.component.UIOutput;
import javax.faces.context.FacesContext;
@@ -37,7 +33,8 @@
import javax.faces.event.SystemEvent;
import javax.faces.event.SystemEventListener;
-import org.richfaces.resource.CompiledCSSResource;
+import org.ajax4jsf.component.QueueRegistry;
+import org.ajax4jsf.javascript.ScriptUtils;
/**
* This class used for determining what standard resources should be encoded(queue, skinning etc.). Implements SystemEventListener
@@ -62,30 +59,10 @@
private static final String VALUE_ATTRIBBUTE = "value";
- private static final String BASIC = "basic";
-
- private static final String EXTENDED = "extended";
-
- private static final String ENABLE = "enable";
-
- private static final String CLASSES_ECSS = "_classes.ecss";
-
- private static final String ECSS = ".ecss";
-
- private static final String BOTH_ECSS = "_both.ecss";
-
private static final String HEAD = "head";
private static final String NAME_ATTRIBBUTE = "name";
- private static final String STYLESHEET_RENDERER = "javax.faces.resource.Stylesheet";
-
- private boolean useStdControlsSkinning;
-
- private boolean useStdControlsSkinningClasses;
-
- private boolean extendedSkinningAllowed;
-
/*
* (non-Javadoc)
*
@@ -103,58 +80,10 @@
public void processEvent(SystemEvent event) throws AbortProcessingException {
if (event instanceof PreRenderViewEvent) {
- encodeSkinningResources();
encodeQueueResource();
}
}
- private void setUseStdControlsSkinning(boolean stdControlsSkinning) {
- this.useStdControlsSkinning = stdControlsSkinning;
- }
-
- private void setUseStdControlsSkinningClasses(boolean stdControlsSkinningClasses) {
- this.useStdControlsSkinningClasses = stdControlsSkinningClasses;
- }
-
- private void setExtendedSkinningAllowed(boolean extendedSkinningAllowed) {
- this.extendedSkinningAllowed = extendedSkinningAllowed;
- }
-
- private void initializeSkinningParameters(FacesContext context) {
- boolean extendedSkinningAllowed = true;
- String skinningLevel = ContextInitParameters.getSkinningLevel(context);
- if (skinningLevel != null && skinningLevel.length() > 0) {
- if (BASIC.equals(skinningLevel)) {
- extendedSkinningAllowed = false;
- } else if (!EXTENDED.equals(skinningLevel)) {
- throw new IllegalArgumentException("Value: " + skinningLevel + " of "
- + ContextInitParameters.CONTROL_SKINNING_LEVEL[0] + " init parameter is invalid! Only " + EXTENDED
- + ", " + BASIC + " can be used");
- }
- }
-
- this.setExtendedSkinningAllowed(extendedSkinningAllowed);
-
- boolean useStdControlsSkinning = false;
-
- String stdControlsSkinning = ContextInitParameters.getStandartControlSkinningParameter(context);
- if (stdControlsSkinning != null) {
- useStdControlsSkinning = ENABLE.equals(stdControlsSkinning);
- }
-
- this.setUseStdControlsSkinning(useStdControlsSkinning);
-
- boolean useStdControlsSkinningClasses = true;
-
- String stdControlsSkinningClasses = ContextInitParameters.getStandartControlSkinningClassesParameter(context);
- if (stdControlsSkinningClasses != null) {
- useStdControlsSkinningClasses = ENABLE.equals(stdControlsSkinningClasses);
- }
-
- this.setUseStdControlsSkinningClasses(useStdControlsSkinningClasses);
-
- }
-
private void encodeQueueResource() {
FacesContext context = FacesContext.getCurrentInstance();
if (QueueRegistry.getInstance(context).hasQueuesToEncode()) {
@@ -230,54 +159,6 @@
return firstElementAdded;
}
- private void encodeSkinningResources() {
- initializeSkinningParameters(FacesContext.getCurrentInstance());
- String resourceSuffix = findResourceSuffix();
-
- if (resourceSuffix != null) {
- encodeSkinningResource(BASIC, resourceSuffix);
-
- if (extendedSkinningAllowed) {
- encodeSkinningResource(EXTENDED, resourceSuffix);
- }
- }
- }
-
- private void encodeSkinningResource(String resourcePrefix, String resourceSuffix) {
- String basicPath = resourcePrefix.concat(resourceSuffix);
- String fullPath = basicPath.concat(CompiledCSSResource.getHash(basicPath));
- addSkinningResourceToView(basicPath, fullPath);
- }
-
- private String findResourceSuffix() {
- String resourceSuffix = null;
-
- if (useStdControlsSkinning) {
- if (useStdControlsSkinningClasses) {
- resourceSuffix = BOTH_ECSS;
- } else {
- resourceSuffix = ECSS;
- }
- } else {
- if (useStdControlsSkinningClasses) {
- resourceSuffix = CLASSES_ECSS;
- } else {
- // no resources
- }
- }
- return resourceSuffix;
- }
-
- private void addSkinningResourceToView(String basePath, String fullPath) {
- FacesContext context = FacesContext.getCurrentInstance();
- removeComponentResource(context, basePath);
- HashMap<String, Object> hashMap = new HashMap<String, Object>();
- hashMap.put(MARKER_ATTRIBBUTE, basePath);
- hashMap.put(NAME_ATTRIBBUTE, fullPath);
- addComponentResource(context, hashMap, STYLESHEET_RENDERER);
-
- }
-
private void addComponentResource(FacesContext context, Map<String, Object> params, String rendererType){
UIOutput output = new UIOutput();
if(rendererType != null){
Deleted: root/core/trunk/impl/src/main/java/org/richfaces/context/SingletonsContext.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/context/SingletonsContext.java 2010-05-20 23:27:53 UTC (rev 17171)
+++ root/core/trunk/impl/src/main/java/org/richfaces/context/SingletonsContext.java 2010-05-21 12:58:49 UTC (rev 17172)
@@ -1,47 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.context;
-
-import javax.faces.context.FacesContext;
-import java.util.Map;
-
-/**
- * @author Nick Belaevski
- * @since 4.0
- */
-public final class SingletonsContext {
- public static final ContextProvider APPLICATION = new ContextProvider("Application") {
- @Override
- protected Map<String, Object> getContextMap(FacesContext facesContext) {
- return facesContext.getExternalContext().getApplicationMap();
- }
- };
- public static final ContextProvider FACES_CONTEXT = new ContextProvider("FacesContext") {
- @Override
- protected Map<? super String, Object> getContextMap(FacesContext facesContext) {
- return facesContext.getAttributes();
- }
- };
-
- private SingletonsContext() {
- }
-}
Added: root/core/trunk/impl/src/main/java/org/richfaces/context/SkinningResourcesPhaseListener.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/context/SkinningResourcesPhaseListener.java (rev 0)
+++ root/core/trunk/impl/src/main/java/org/richfaces/context/SkinningResourcesPhaseListener.java 2010-05-21 12:58:49 UTC (rev 17172)
@@ -0,0 +1,151 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.context;
+
+import java.util.Map;
+
+import javax.el.ELContext;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIOutput;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+
+import org.ajax4jsf.context.ContextInitParameters;
+import org.richfaces.el.BaseReadOnlyValueExpression;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class SkinningResourcesPhaseListener implements PhaseListener {
+
+ private static final long serialVersionUID = 7430448731396547419L;
+
+ private static final String RESOURCES_PROCESSED_MARKER = SkinningResourcesPhaseListener.class.getName();
+
+ private static final String CLASSES_ECSS = "_classes.ecss";
+
+ private static final String ECSS = ".ecss";
+
+ private static final String BOTH_ECSS = "_both.ecss";
+
+ private static final String BASIC_CONTROLS;
+
+ private static final String BASIC_BOTH;
+
+ private static final String BASIC_CLASSES;
+
+ private static final String STYLESHEET_RENDERER = "javax.faces.resource.Stylesheet";
+
+ static {
+ String basicName = "basic";
+
+ BASIC_CONTROLS = basicName + ECSS;
+ BASIC_BOTH = basicName + BOTH_ECSS;
+ BASIC_CLASSES = basicName + CLASSES_ECSS;
+
+ }
+
+ private static final class BasicResourceName extends BaseReadOnlyValueExpression {
+
+ private static final long serialVersionUID = 7520575496522682120L;
+
+ public BasicResourceName() {
+ super(String.class);
+ }
+
+ @Override
+ public Object getValue(ELContext context) {
+ FacesContext facesContext = getFacesContext(context);
+
+ boolean controls = ContextInitParameters.isStandardControlSkinningEnabled(facesContext);
+ boolean classes = ContextInitParameters.isStandardControlSkinningClassesEnabled(facesContext);
+
+ if (controls && classes) {
+ return BASIC_BOTH;
+ }
+
+ if (classes) {
+ return BASIC_CLASSES;
+ }
+
+ return BASIC_CONTROLS;
+ }
+
+ }
+
+ private static final class BasicResourceRendered extends BaseReadOnlyValueExpression {
+
+ private static final long serialVersionUID = -1579256471133808739L;
+
+ public BasicResourceRendered() {
+ super(Boolean.TYPE);
+ }
+
+ @Override
+ public Object getValue(ELContext context) {
+ FacesContext facesContext = getFacesContext(context);
+
+ return ContextInitParameters.isStandardControlSkinningEnabled(facesContext) ||
+ ContextInitParameters.isStandardControlSkinningClassesEnabled(facesContext);
+ }
+
+ }
+
+ private UIComponent createComponentResource(FacesContext context) {
+ UIComponent resourceComponent = context.getApplication().createComponent(UIOutput.COMPONENT_TYPE);
+ resourceComponent.setRendererType(STYLESHEET_RENDERER);
+ return resourceComponent;
+ }
+
+ public void afterPhase(PhaseEvent event) {
+ //not used
+ }
+
+ public void beforePhase(PhaseEvent event) {
+ //it's important for skinning resources to come *before* any users/components stylesheet,
+ //that's why they are added via phase listener
+
+ FacesContext context = event.getFacesContext();
+ UIViewRoot viewRoot = context.getViewRoot();
+
+ assert viewRoot != null;
+
+ Map<String, Object> attributes = viewRoot.getAttributes();
+ if (!Boolean.TRUE.equals(attributes.get(RESOURCES_PROCESSED_MARKER))) {
+ attributes.put(RESOURCES_PROCESSED_MARKER, Boolean.TRUE);
+
+ UIComponent basic = createComponentResource(context);
+ basic.setValueExpression("name", new BasicResourceName());
+ basic.setValueExpression("rendered", new BasicResourceRendered());
+
+ viewRoot.addComponentResource(context, basic);
+ }
+ }
+
+ public PhaseId getPhaseId() {
+ return PhaseId.RENDER_RESPONSE;
+ }
+}
Added: root/core/trunk/impl/src/main/java/org/richfaces/el/BaseReadOnlyValueExpression.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/el/BaseReadOnlyValueExpression.java (rev 0)
+++ root/core/trunk/impl/src/main/java/org/richfaces/el/BaseReadOnlyValueExpression.java 2010-05-21 12:58:49 UTC (rev 17172)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.el;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public abstract class BaseReadOnlyValueExpression extends ValueExpression {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -1094028009026806965L;
+
+ private Class<?> type;
+
+ public BaseReadOnlyValueExpression(Class<?> type) {
+ super();
+ this.type = type;
+ }
+
+ @Override
+ public Class<?> getExpectedType() {
+ return type;
+ }
+
+ @Override
+ public Class<?> getType(ELContext context) {
+ return type;
+ }
+
+ @Override
+ public abstract Object getValue(ELContext context);
+
+ @Override
+ public boolean isReadOnly(ELContext context) {
+ return true;
+ }
+
+ @Override
+ public void setValue(ELContext context, Object value) {
+ throw new UnsupportedOperationException("setValue(ELContext, Object)");
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return this == obj;
+ }
+
+ @Override
+ public String getExpressionString() {
+ return null;
+ }
+
+ @Override
+ public int hashCode() {
+ return System.identityHashCode(this);
+ }
+
+ @Override
+ public boolean isLiteralText() {
+ return false;
+ }
+
+ protected FacesContext getFacesContext(ELContext elContext) {
+ return (FacesContext) elContext.getContext(FacesContext.class);
+ }
+}
Modified: root/core/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java 2010-05-20 23:27:53 UTC (rev 17171)
+++ root/core/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java 2010-05-21 12:58:49 UTC (rev 17172)
@@ -41,7 +41,7 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.resource.InternetResource;
-import org.richfaces.context.SingletonsContext;
+import org.richfaces.application.ServiceTracker;
import org.richfaces.log.RichfacesLogger;
import org.richfaces.util.Util;
import org.slf4j.Logger;
@@ -94,8 +94,7 @@
// TODO - originally lastModified was set during resource creation.
// as resources can be managed beans this approach does not seem good
if (lastModified == null) {
- lastModified = (Date) SingletonsContext.APPLICATION.get(context).getAttribute(
- ResourceHandlerImpl.HANDLER_START_TIME_ATTRIBUTE);
+ lastModified = ServiceTracker.getStartTime(context);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(
Modified: root/core/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java 2010-05-20 23:27:53 UTC (rev 17171)
+++ root/core/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java 2010-05-21 12:58:49 UTC (rev 17172)
@@ -45,8 +45,6 @@
import org.ajax4jsf.cache.CacheManager;
import org.ajax4jsf.resource.Java2Dresource;
import org.richfaces.application.ServiceTracker;
-import org.richfaces.context.AttributesContext;
-import org.richfaces.context.SingletonsContext;
import org.richfaces.log.RichfacesLogger;
import org.richfaces.util.Util;
import org.richfaces.util.RequestStateManager.BooleanRequestStateVariable;
@@ -93,7 +91,6 @@
FacesContext facesContext = FacesContext.getCurrentInstance();
initializeCache(facesContext);
- markStartTime(facesContext);
}
private void initializeCache(FacesContext facesContext) {
@@ -102,12 +99,6 @@
cache = CacheManager.getInstance().getNewCache(RESOURCE_CACHE_NAME, envMap);
}
- private static void markStartTime(FacesContext facesContext) {
- AttributesContext applicationContext = SingletonsContext.APPLICATION.get(facesContext);
-
- applicationContext.setAttribute(HANDLER_START_TIME_ATTRIBUTE, new Date());
- }
-
protected static void setResourceCodec(ResourceCodec codec) {
FacesContext facesContext = FacesContext.getCurrentInstance();
Modified: root/core/trunk/impl/src/main/resources/META-INF/resources/basic.ecss
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/basic.ecss 2010-05-20 23:27:53 UTC (rev 17171)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/basic.ecss 2010-05-21 12:58:49 UTC (rev 17172)
@@ -1,3 +1,5 @@
+/* basic skinning styles */
+
input, select, textarea, button, keygen, isindex, legend, a {
font-size : '#{richSkin.generalSizeFont}';
font-family : '#{richSkin.generalFamilyFont}';
@@ -22,4 +24,52 @@
}
a:visited {
color : '#{richSkin.visitedLinkColor}';
+}
+
+/* extended skinning styles */
+
+input, select, textarea, button, keygen, isindex {
+ border-width: 1px;
+ border-color: '#{richSkin.panelBorderColor}';
+ color: '#{richSkin.controlTextColor}';
+}
+
+button, input[type="reset"], input[type="submit"], input[type="button"] {
+ border-width: 1px;
+ border-color: '#{richSkin.panelBorderColor}';
+
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ color: '#{richSkin.headerTextColor}';
+
+ background-repeat: repeat-x;
+ background-position: top left;
+ background-color: '#{richSkin.headerBackgroundColor}';
+ background-image: "url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
+}
+
+button[disabled], input[type="reset"][disabled], input[type="submit"][disabled], input[type="button"][disabled] {
+ color: '#{richSkin.tabDisabledTextColor}';
+ border-color: '#{richSkin.tableFooterBackgroundColor}';
+ background-color: '#{richSkin.tableFooterBackgroundColor}';
+ background-image: "url(#{resource['org.richfaces.renderkit.html.images.ButtonDisabledBackgroundImage']})";
+}
+
+textarea, input[type="text"], input[type="password"], select {
+ border-width: 1px;
+ border-style: inset;
+ border-color: '#{richSkin.panelBorderColor}';
+
+ font-size: '#{richSkin.generalSizeFont}';
+ font-family: '#{richSkin.generalFamilyFont}';
+ color: '#{richSkin.controlTextColor}';
+
+ background-repeat: no-repeat;
+ background-position: 1px 1px;
+ background-color: '#{richSkin.controlBackgroundColor}';
+ background-image: "url(#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']})";
+}
+
+textarea[disabled], input[type="text"][disabled], input[type="password"][disabled], select[disabled] {
+ color: '#{richSkin.panelBorderColor}';
}
\ No newline at end of file
Modified: root/core/trunk/impl/src/main/resources/META-INF/resources/basic_classes.ecss
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/basic_classes.ecss 2010-05-20 23:27:53 UTC (rev 17171)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/basic_classes.ecss 2010-05-21 12:58:49 UTC (rev 17172)
@@ -1,3 +1,5 @@
+/* basic skinning styles */
+
.rich-container input, .rich-input, .rich-container select, .rich-select,
.rich-container textarea, .rich-textarea, .rich-container button, .rich-button,
.rich-container keygen, .rich-keygen,.rich-container isindex, .rich-isindex,
@@ -346,4 +348,78 @@
.rich-gradient-button{
background-image : "url(#{resource['org.richfaces.renderkit.html.gradientimages.ButtonGradientImage']})";
background-repeat : repeat-x;
+}
+
+/* extended skinning styles */
+
+.rich-container input, .rich-input,
+.rich-container select, .rich-select,
+.rich-container textarea, .rich-textarea,
+.rich-container button, .rich-button,
+.rich-container keygen, .rich-keygen,
+.rich-container isindex, .rich-isindex {
+ border-width:1px;
+ border-color:'#{richSkin.panelBorderColor}';
+ color:'#{richSkin.controlTextColor}';
+}
+
+.rich-container button, .rich-button,
+.rich-button-button,
+.rich-button-reset,
+.rich-button-submit,
+.rich-container input[type="reset"], .rich-input-reset,
+.rich-container input[type="submit"], .rich-input-submit,
+.rich-container input[type="button"], .rich-input-button {
+ border-width: 1px;
+ border-color:'#{richSkin.panelBorderColor}';
+
+ background-repeat : repeat-x;
+ background-position : top left;
+ background-color:'#{richSkin.headerBackgroundColor}';
+ background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
+
+ font-size:'#{richSkin.generalSizeFont}';
+ font-family:'#{richSkin.generalFamilyFont}';
+ color:'#{richSkin.headerTextColor}';
+}
+
+.rich-container button[disabled], .rich-button-disabled,
+.rich-button-button-disabled,
+.rich-button-reset-disabled,
+.rich-button-submit-disabled,
+.rich-container input[type="reset"][disabled], .rich-input-reset-disabled,
+.rich-container input[type="submit"][disabled], .rich-input-submit-disabled,
+.rich-container input[type="button"][disabled], .rich-input-button-disabled {
+ color:'#{richSkin.tabDisabledTextColor}';
+ background-color:'#{richSkin.tableFooterBackgroundColor}';
+ border-color:'#{richSkin.tableFooterBackgroundColor}';
+ background-image:"url(#{resource['org.richfaces.renderkit.html.images.ButtonDisabledBackgroundImage']})";
+}
+
+
+.rich-container textarea, .rich-textarea,
+.rich-textarea-textarea,
+.rich-container input[type="text"], .rich-input-text,
+.rich-container input[type="password"], .rich-input-password,
+.rich-container select, .rich-select {
+ border-width: 1px;
+ border-style : inset;
+ border-color:'#{richSkin.panelBorderColor}';
+
+ background-repeat : no-repeat;
+ background-position : 1px 1px;
+ background-color:'#{richSkin.controlBackgroundColor}';
+ background-image:"url(#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']})";
+
+ font-size:'#{richSkin.generalSizeFont}';
+ font-family:'#{richSkin.generalFamilyFont}';
+ color:'#{richSkin.controlTextColor}';
+}
+
+.rich-container textarea[disabled], .rich-textarea-disabled,
+.rich-textarea-textarea-disabled,
+.rich-container input[type="text"][disabled], .rich-input-text-disabled,
+.rich-container input[type="password"][disabled], .rich-input-password-disabled,
+.rich-container select[disabled], .rich-select-disabled {
+ color:'#{richSkin.panelBorderColor}';
}
\ No newline at end of file
Added: root/core/trunk/impl/src/main/resources/META-INF/skinning-resources-listener.faces-config.xml
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/skinning-resources-listener.faces-config.xml (rev 0)
+++ root/core/trunk/impl/src/main/resources/META-INF/skinning-resources-listener.faces-config.xml 2010-05-21 12:58:49 UTC (rev 17172)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee" version="2.0">
+ <name>richfaces</name>
+ <lifecycle>
+ <phase-listener>org.richfaces.context.SkinningResourcesPhaseListener</phase-listener>
+ </lifecycle>
+</faces-config>
\ No newline at end of file
14 years, 1 month
JBoss Rich Faces SVN: r17171 - in root/cdk/trunk/plugins/generator/src: main/java/org/richfaces/cdk/generate/taglib and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-05-20 19:27:53 -0400 (Thu, 20 May 2010)
New Revision: 17171
Modified:
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagHandlerGeneratorVisitor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagHandlerWriter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibWriter.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BehaviorModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BehaviorRenderer.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ConverterModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EmptyVisitor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FacetModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FunctionModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ListenerModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelCollection.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/PropertyBase.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RenderKitModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RendererModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ValidatorModel.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Visitable.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Visitor.java
root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererTemplateParser.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ModelBean.java
root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/TaglibGeneratorVisitorTest.java
Log:
RESOLVED - issue RF-8669: CDK: template renderers are not registered in generated faces-config.xml if enforcer is used
https://jira.jboss.org/browse/RF-8669
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagHandlerGeneratorVisitor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagHandlerGeneratorVisitor.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagHandlerGeneratorVisitor.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -36,7 +36,7 @@
* @author akolonitsky
* @since Feb 22, 2010
*/
-public class TagHandlerGeneratorVisitor extends EmptyVisitor {
+public class TagHandlerGeneratorVisitor extends EmptyVisitor<Boolean,Boolean> {
private final TagHandlerClassGenerator tagGenerator;
@@ -45,20 +45,28 @@
this.tagGenerator = tagGenerator;
}
- public void visitComponent(ComponentModel model) {
+ @Override
+ public Boolean visitComponent(ComponentModel model,Boolean data) {
generateTagHandler(model);
+ return null;
}
- public void visitConverter(ConverterModel model) {
+ @Override
+ public Boolean visitConverter(ConverterModel model,Boolean data) {
generateTagHandler(model);
+ return null;
}
- public void visitValidator(ValidatorModel model) {
+ @Override
+ public Boolean visitValidator(ValidatorModel model,Boolean data) {
generateTagHandler(model);
+ return null;
}
- public void visitBehavior(BehaviorModel model) {
+ @Override
+ public Boolean visitBehavior(BehaviorModel model,Boolean data) {
generateTagHandler(model);
+ return null;
}
private void generateTagHandler(ModelElementBase model) {
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagHandlerWriter.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagHandlerWriter.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/java/taghandler/TagHandlerWriter.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -22,8 +22,6 @@
package org.richfaces.cdk.generate.java.taghandler;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.CdkWriter;
import org.richfaces.cdk.FileManager;
@@ -31,6 +29,8 @@
import org.richfaces.cdk.Outputs;
import org.richfaces.cdk.model.ComponentLibrary;
+import com.google.inject.Inject;
+
/**
* @author akolonitsky
* @since Feb 22, 2010
@@ -45,12 +45,11 @@
private FileManager output;
@Inject
- private Injector injector;
+ private TagHandlerGeneratorVisitor tagHandlerGeneratorVisitor;
@Override
public void render() throws CdkException {
- TagHandlerGeneratorVisitor tagHandlerGeneratorVisitor = injector.getInstance(TagHandlerGeneratorVisitor.class);
- library.accept(tagHandlerGeneratorVisitor);
+ library.accept(tagHandlerGeneratorVisitor,null);
}
public ComponentLibrary getLibrary() {
@@ -68,12 +67,4 @@
public void setOutput(FileManager output) {
this.output = output;
}
-
- public Injector getInjector() {
- return injector;
- }
-
- public void setInjector(Injector injector) {
- this.injector = injector;
- }
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibGeneratorVisitor.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -34,23 +34,17 @@
import org.richfaces.cdk.model.DescriptionGroup;
import org.richfaces.cdk.model.EmptyVisitor;
import org.richfaces.cdk.model.FunctionModel;
-import org.richfaces.cdk.model.ListenerModel;
-import org.richfaces.cdk.model.ModelElement;
import org.richfaces.cdk.model.PropertyBase;
-import org.richfaces.cdk.model.RenderKitModel;
-import org.richfaces.cdk.model.RendererModel;
import org.richfaces.cdk.model.TagModel;
import org.richfaces.cdk.model.ValidatorModel;
import org.richfaces.cdk.model.RendererModel.Type;
import org.richfaces.cdk.util.Strings;
-import java.util.List;
-
/**
* @author akolonitsky
* @since Feb 3, 2010
*/
-public class TaglibGeneratorVisitor extends EmptyVisitor {
+public class TaglibGeneratorVisitor extends EmptyVisitor<Boolean,ComponentLibrary> {
private static final String COMPONENT = "component";
private static final String COMPONENT_TYPE = "component-type";
private static final String RENDERER_TYPE = "renderer-type";
@@ -60,7 +54,6 @@
private Element faceletTaglib;
- private ComponentLibrary componentLibrary;
public TaglibGeneratorVisitor() {
@@ -74,8 +67,8 @@
this.document = document;
}
- public void visitComponentLibrary(ComponentLibrary model) {
- this.componentLibrary = model;
+ @Override
+ public Boolean visitComponentLibrary(ComponentLibrary model,ComponentLibrary componentLibrary) {
faceletTaglib = document.addElement("facelet-taglib", "http://java.sun.com/xml/ns/javaee");
faceletTaglib.addAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
@@ -85,10 +78,11 @@
faceletTaglib.addAttribute("id", componentLibrary.getTaglib().getShortName());
faceletTaglib.addElement("namespace").addText(componentLibrary.getTaglib().getUri());
+ return null;
}
@Override
- public void visitComponent(ComponentModel model) {
+ public Boolean visitComponent(ComponentModel model,ComponentLibrary componentLibrary) {
for (TagModel tagModel : model.getTags()) {
if (TagType.Facelets != tagModel.getType()
&& TagType.All != tagModel.getType()) {
@@ -109,6 +103,7 @@
addTagHandler(component, tagModel);
appendAttributs(tag, model);
}
+ return null;
}
/**
@@ -128,8 +123,8 @@
-
- public void visitConverter(ConverterModel model) {
+ @Override
+ public Boolean visitConverter(ConverterModel model,ComponentLibrary componentLibrary) {
for (TagModel tagModel : model.getTags()) {
if (TagType.Facelets.equals(tagModel.getType())) {
Element tag = createTag(tagModel.getName());
@@ -139,6 +134,7 @@
appendAttributs(tag, model);
}
}
+ return null;
}
/**
@@ -157,7 +153,7 @@
* <pre>
*
* */
- public void visitValidator(ValidatorModel model) {
+ public Boolean visitValidator(ValidatorModel model,ComponentLibrary componentLibrary) {
for (TagModel tagModel : model.getTags()) {
if (TagType.Facelets.equals(tagModel.getType())) {
Element tag = createTag(tagModel.getName());
@@ -167,6 +163,7 @@
appendAttributs(tag, model);
}
}
+ return null;
}
@@ -212,7 +209,8 @@
return tag;
}
- public void visitBehavior(BehaviorModel model) {
+ @Override
+ public Boolean visitBehavior(BehaviorModel model,ComponentLibrary componentLibrary) {
for (TagModel tagModel : model.getTags()) {
if (TagType.Facelets.equals(tagModel.getType())) {
Element tag = createTag(tagModel.getName());
@@ -222,46 +220,12 @@
appendAttributs(tag, model);
}
}
- }
-
- public void visitRenderKit(RenderKitModel model) {
- for (RendererModel renderer : model.getRenderers()) {
- visitRender(renderer);
- }
- }
-
- public void visitRender(RendererModel model) {
- if (true) {
- return; // TODO remove when renderer annotation will be implemented
- }
-
- Element component = findComponent(model.getFamily());
- if (component == null) {
- return;
- }
-
- component.addElement(RENDERER_TYPE, model.getType().getType());
- }
-
- private Element findComponent(String family) {
- // TODO rewrite method by XPath
- List<Element> tags = faceletTaglib.elements("tag");
- for (Element tag : tags) {
- Element component = tag.element(COMPONENT);
- if (component != null) {
- // TODO find by family instead type
- Element type = component.element(COMPONENT_TYPE);
- if (type != null && type.getTextTrim().equals(family)) {
- return component;
- }
- }
- }
-
return null;
}
+
@Override
- public void visitFunction(FunctionModel model) {
+ public Boolean visitFunction(FunctionModel model,ComponentLibrary componentLibrary) {
if(TagType.Facelets.equals(model.getType())||TagType.All.equals(model.getType())){
Element functionElement = faceletTaglib.addElement("function");
addDescription(functionElement, model);
@@ -269,6 +233,7 @@
functionElement.addElement("function-class").addText(model.getFunctionClass().toString());
functionElement.addElement("function-signature").addText(model.getSignature());
}
+ return false;
}
/**
@@ -294,11 +259,5 @@
}
}
- public void visitListener(ListenerModel model) {
- // TODO
- }
-
- public void visit(ModelElement model) {
- // TODO do default implementation for new classes
- }
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibWriter.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibWriter.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/generate/taglib/TaglibWriter.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -56,7 +56,7 @@
@Override
public void render() throws CdkException {
TaglibGeneratorVisitor visitor = new TaglibGeneratorVisitor();
- library.accept(visitor);
+ library.accept(visitor,library);
Document document = visitor.getDocument();
if (document.getRootElement().elements().isEmpty()) {
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BehaviorModel.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BehaviorModel.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BehaviorModel.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -41,8 +41,8 @@
setId(behaviorId);
}
- public void accept(Visitor visitor) {
- visitor.visitBehavior(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ return visitor.visitBehavior(this,data);
}
@Override
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BehaviorRenderer.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BehaviorRenderer.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/BehaviorRenderer.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -117,8 +117,8 @@
}
@Override
- public void accept(Visitor visitor) {
- visitor.visitBehaviorRenderer(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ return visitor.visitBehaviorRenderer(this,data);
}
@Override
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentLibrary.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -103,17 +103,18 @@
public ComponentLibrary() {
}
- public void accept(Visitor visitor) {
- visitor.visitComponentLibrary(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ R result = visitor.visitComponentLibrary(this,data);
- renderKits.accept(visitor);
- components.accept(visitor);
- converters.accept(visitor);
- validators.accept(visitor);
- listeners.accept(visitor);
- events.accept(visitor);
- behaviors.accept(visitor);
- functions.accept(visitor);
+ result = renderKits.accept(result,visitor,data);
+ result = components.accept(result,visitor,data);
+ result = converters.accept(result,visitor,data);
+ result = validators.accept(result,visitor,data);
+ result = listeners.accept(result,visitor,data);
+ result = events.accept(result,visitor,data);
+ result = behaviors.accept(result,visitor,data);
+ result = functions.accept(result,visitor,data);
+ return result;
}
/**
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentModel.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentModel.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ComponentModel.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -46,8 +46,8 @@
}
- public void accept(Visitor visitor) {
- visitor.visitComponent(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ return visitor.visitComponent(this,data);
// TODO ??? see at render kit
// for (RendererModel rendererType : renderers) {
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ConverterModel.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ConverterModel.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ConverterModel.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -51,8 +51,8 @@
this.converterForClass = converterForClass;
}
- public void accept(Visitor visitor) {
- visitor.visitConverter(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ return visitor.visitConverter(this,data);
}
@Override
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EmptyVisitor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EmptyVisitor.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EmptyVisitor.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -28,62 +28,64 @@
* @author akolonitsky
* @since Feb 22, 2010
*/
-public abstract class EmptyVisitor implements Visitor{
- public void visitComponentLibrary(ComponentLibrary model) {
- // Do nothing.
+public abstract class EmptyVisitor<R,D> implements Visitor<R,D>{
+
+ public R visitComponentLibrary(ComponentLibrary model, D param) {
+ return null;
}
- public void visitComponent(ComponentModel model) {
- // Do nothing.
+ public R visitComponent(ComponentModel model, D param) {
+ return null;
}
- public void visitConverter(ConverterModel model) {
- // Do nothing.
+ public R visitConverter(ConverterModel model, D param) {
+ return null;
}
- public void visitValidator(ValidatorModel model) {
- // Do nothing.
+ public R visitValidator(ValidatorModel model, D param) {
+ return null;
}
- public void visitBehavior(BehaviorModel model) {
- // Do nothing.
+ public R visitBehavior(BehaviorModel model, D param) {
+ return null;
}
- public void visitFacet(FacetModel model) {
- // Do nothing.
+ public R visitFacet(FacetModel model, D param) {
+ return null;
}
- public void visitEvent(EventModel model) {
- // Do nothing.
+ public R visitEvent(EventModel model, D param) {
+ return null;
}
- public void visitBehaviorRenderer(BehaviorRenderer model) {
- // Do nothing.
+ public R visitBehaviorRenderer(BehaviorRenderer model, D param) {
+ return null;
}
- public void visitProperty(PropertyBase model) {
- // Do nothing.
+ public R visitProperty(PropertyBase model, D param) {
+ return null;
}
- public void visitRenderKit(RenderKitModel model) {
- // Do nothing.
+ public R visitRenderKit(RenderKitModel model, D param) {
+ return null;
}
- public void visitRender(RendererModel model) {
- // Do nothing.
+ public R visitRender(RendererModel model, D param) {
+ return null;
}
- public void visitListener(ListenerModel model) {
- // Do nothing.
+ public R visitListener(ListenerModel model, D param) {
+ return null;
}
@Override
- public void visitFunction(FunctionModel model) {
+ public R visitFunction(FunctionModel model, D param) {
// Do nothing
+ return null;
}
@SuppressWarnings("unchecked")
- public void visit(ModelElement model) {
- // Do nothing.
+ public R visit(ModelElement model, D param) {
+ return null;
}
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventModel.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventModel.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/EventModel.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -130,8 +130,8 @@
ComponentLibrary.merge(this, other);
}
- public void accept(Visitor visitor) {
- visitor.visitEvent(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ return visitor.visitEvent(this,data);
}
@Override
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FacetModel.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FacetModel.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FacetModel.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -62,8 +62,8 @@
ComponentLibrary.merge(this, other);
}
- public void accept(Visitor visitor) {
- visitor.visitFacet(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ return visitor.visitFacet(this,data);
}
@Override
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FunctionModel.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FunctionModel.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/FunctionModel.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -151,8 +151,8 @@
}
@Override
- public void accept(Visitor visitor) {
- visitor.visitFunction(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ return visitor.visitFunction(this,data);
}
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ListenerModel.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ListenerModel.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ListenerModel.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -45,8 +45,8 @@
public ListenerModel() {
}
- public void accept(Visitor visitor) {
- visitor.visitListener(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ return visitor.visitListener(this,data);
}
/*
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelCollection.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelCollection.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ModelCollection.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -196,10 +196,18 @@
return elements.toArray(a);
}
- public void accept(Visitor visitor) {
+ public <R,D> R accept(R result, Visitor<R,D> visitor, D data) {
+ return null==result?accept(visitor, data):result;
+ }
+
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
for (ModelElement element : elements) {
- element.accept(visitor);
+ R result = element.accept(visitor,data);
+ if(null != result){
+ return result;
+ }
}
+ return null;
}
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/PropertyBase.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/PropertyBase.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/PropertyBase.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -299,8 +299,8 @@
setGenerate(generate || other.isGenerate());
}
- public void accept(Visitor visitor) {
- visitor.visitProperty(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ return visitor.visitProperty(this,data);
}
@Override
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RenderKitModel.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RenderKitModel.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RenderKitModel.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -98,11 +98,12 @@
return behaviorRenderers;
}
- public void accept(Visitor visitor) {
- visitor.visitRenderKit(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ R result = visitor.visitRenderKit(this,data);
- renderers.accept(visitor);
- behaviorRenderers.accept(visitor);
+ result = renderers.accept(result,visitor,data);
+ result = behaviorRenderers.accept(result,visitor,data);
+ return result;
}
@Override
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RendererModel.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RendererModel.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/RendererModel.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -119,8 +119,8 @@
this.templatePath = templatePath;
}
- public void accept(Visitor visitor) {
- visitor.visitRender(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ return visitor.visitRender(this,data);
}
@Override
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagModel.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagModel.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/TagModel.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -145,8 +145,8 @@
}
@Override
- public void accept(Visitor visitor) {
- visitor.visit(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ return visitor.visit(this,data);
}
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ValidatorModel.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ValidatorModel.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/ValidatorModel.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -38,8 +38,8 @@
setId(validatorId);
}
- public void accept(Visitor visitor) {
- visitor.visitValidator(this);
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
+ return visitor.visitValidator(this,data);
}
@Override
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Visitable.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Visitable.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Visitable.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -1,6 +1,12 @@
package org.richfaces.cdk.model;
-public interface Visitable<V> {
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public interface Visitable {
- public void accept(Visitor visitor);
+ public <R,D> R accept(Visitor<R,D> visitor, D data);
+
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Visitor.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Visitor.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/model/Visitor.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -23,35 +23,40 @@
package org.richfaces.cdk.model;
/**
+ * <p class="changed_added_4_0"></p>
* @author akolonitsky
* @since Jan 23, 2010
+ *
+ * @param <R> type of result returned by visitXXX method.
+ * @param <D> type of parameter for visit methods.
*/
-public interface Visitor {
- void visitComponentLibrary(ComponentLibrary model);
+public interface Visitor<R,D> {
+
+ R visitComponentLibrary(ComponentLibrary model, D param);
- void visitComponent(ComponentModel model);
+ R visitComponent(ComponentModel model, D param);
- void visitConverter(ConverterModel model);
+ R visitConverter(ConverterModel model, D param);
- void visitValidator(ValidatorModel model);
+ R visitValidator(ValidatorModel model, D param);
- void visitBehavior(BehaviorModel model);
+ R visitBehavior(BehaviorModel model, D param);
- void visitFacet(FacetModel model);
+ R visitFacet(FacetModel model, D param);
- void visitEvent(EventModel model);
+ R visitEvent(EventModel model, D param);
- void visitBehaviorRenderer(BehaviorRenderer model);
+ R visitBehaviorRenderer(BehaviorRenderer model, D param);
- void visitProperty(PropertyBase model);
+ R visitProperty(PropertyBase model, D param);
- void visitRenderKit(RenderKitModel model);
+ R visitRenderKit(RenderKitModel model, D param);
- void visitRender(RendererModel model);
+ R visitRender(RendererModel model, D param);
- void visitListener(ListenerModel model);
+ R visitListener(ListenerModel model, D param);
- void visitFunction(FunctionModel model);
+ R visitFunction(FunctionModel model, D param);
- void visit(ModelElement model);
+ R visit(ModelElement model, D param);
}
Modified: root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererTemplateParser.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererTemplateParser.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/main/java/org/richfaces/cdk/templatecompiler/RendererTemplateParser.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -36,6 +36,7 @@
import org.richfaces.cdk.Sources;
import org.richfaces.cdk.model.ClassName;
import org.richfaces.cdk.model.ComponentLibrary;
+import org.richfaces.cdk.model.EmptyVisitor;
import org.richfaces.cdk.model.EventName;
import org.richfaces.cdk.model.PropertyModel;
import org.richfaces.cdk.model.PropertyBase;
@@ -165,22 +166,29 @@
public void build(File file, RendererModel rendererModel) {
log.debug("RendererTemplateParser.build");
- log.debug(" - file = " + file.getAbsolutePath());
+ final String absolutePath = file.getAbsolutePath();
+ log.debug(" - file = " + absolutePath);
log.debug(" - renderer = " + rendererModel);
- if (PROCESSED_TEMPLATES.containsKey(file.getAbsolutePath())) {
+ RendererModel existedModel = library.accept(new EmptyVisitor<RendererModel,String>() {
+ @Override
+ public RendererModel visitRender(RendererModel model,String absolutePath) {
+ Template template = model.getTemplate();
+ if(null != template && absolutePath.equals(template.getTemplatePath())){
+ return model;
+ } else {
+ return null;
+ }
+ }
+ },absolutePath);
+ if (null != existedModel) {
log.debug(" - Template was already processed.");
return;
}
Template template = parseTemplate(file);
- PROCESSED_TEMPLATES.put(file.getAbsolutePath(), template);
- // TODO rewrite it
- final String defaultTemplate = "src\\main\\templates";
- String path = file.getPath();
- String templateRelativePath = path.substring(path.indexOf(defaultTemplate) + defaultTemplate.length());
- template.setTemplatePath(templateRelativePath);
+ template.setTemplatePath(absolutePath);
mergeTemplateIntoModel(template, rendererModel);
}
@@ -190,6 +198,8 @@
if (renderer == null) {
renderer = new RendererModel();
+ RenderKitModel renderKit = library.addRenderKit(compositeInterface.getRenderKitId());
+ renderKit.getRenderers().add(renderer);
}
renderer.setTemplate(template);
setRendererType(template, compositeInterface, renderer);
@@ -197,8 +207,6 @@
setRendererClass(compositeInterface, renderer);
setRendererBaseClass(compositeInterface, renderer);
- RenderKitModel renderKit = library.addRenderKit(compositeInterface.getRenderKitId());
- renderKit.getRenderers().add(renderer);
Boolean rendersChildren = compositeInterface.getRendersChildren();
if (rendersChildren != null) {
@@ -294,10 +302,6 @@
renderer.setType(new RendererModel.Type(type));
}
- protected Template parseTemplate(String templateLocation) throws CdkException {
- return jaxbBinding.unmarshal(templateLocation, "http://richfaces.org/cdk/cdk-template.xsd", Template.class);
- }
-
protected Template parseTemplate(File file) throws CdkException {
return jaxbBinding.unmarshal(file, "http://richfaces.org/cdk/cdk-template.xsd", Template.class);
}
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ModelBean.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ModelBean.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/model/ModelBean.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -166,10 +166,10 @@
ComponentLibrary.merge(this, other);
}
- public void accept(Visitor visitor) {
+ public <R,D> R accept(Visitor<R,D> visitor, D data) {
vizited = true;
- visitor.visit(this);
+ return visitor.visit(this,data);
}
@Override
Modified: root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/TaglibGeneratorVisitorTest.java
===================================================================
--- root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/TaglibGeneratorVisitorTest.java 2010-05-20 19:17:03 UTC (rev 17170)
+++ root/cdk/trunk/plugins/generator/src/test/java/org/richfaces/cdk/xmlconfig/TaglibGeneratorVisitorTest.java 2010-05-20 23:27:53 UTC (rev 17171)
@@ -61,7 +61,7 @@
taglib.setUri("http://foo.bar/a4j");
library.setTaglib(taglib);
TaglibGeneratorVisitor visitor = new TaglibGeneratorVisitor();
- library.accept(visitor);
+ library.accept(visitor,library);
// visitor.generate();
// TODO validate result
14 years, 1 month
JBoss Rich Faces SVN: r17170 - in root/ui/core/trunk/api/src/main/java/org: richfaces/view/facelets/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-20 15:17:03 -0400 (Thu, 20 May 2010)
New Revision: 17170
Modified:
root/ui/core/trunk/api/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java
root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/tag/BehaviorRule.java
Log:
AjaxBehavior bug fixes:
- arbitrary meta-component IDs weren't accepted
- "execute"/"render" referencing string EL-expression threw exception
Modified: root/ui/core/trunk/api/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2010-05-20 18:05:21 UTC (rev 17169)
+++ root/ui/core/trunk/api/src/main/java/org/ajax4jsf/component/behavior/AjaxBehavior.java 2010-05-20 19:17:03 UTC (rev 17170)
@@ -54,11 +54,11 @@
data, execute, onbeforedomupdate, onbegin, oncomplete, onerror, onevent, queueId, render, similarityGroupingId, status, disabled, limitRender, immediate, behaviorListener
}
- private static final Set<String> ALL = Collections.singleton("@all");
- private static final Set<String> FORM = Collections.singleton("@form");
- private static final Set<String> THIS = Collections.singleton("@this");
- private static final Set<String> REGION = Collections.singleton("@region");
- private static final Set<String> NONE = Collections.singleton("@none");
+ private static final Set<String> ALL_SINGLETON_SET = Collections.singleton(AjaxRendererUtils.ALL);
+ private static final Set<String> FORM_SINGLETON_SET = Collections.singleton(AjaxRendererUtils.FORM);
+ private static final Set<String> THIS_SINGLETON_SET = Collections.singleton(AjaxRendererUtils.THIS);
+ private static final Set<String> REGION_SINGLETON_SET = Collections.singleton(AjaxRendererUtils.REGION);
+ private static final Set<String> NONE_SINGLETON_SET = Collections.singleton(AjaxRendererUtils.NONE);
@Override
public void setLiteralAttribute(String name, Object value) {
@@ -124,23 +124,17 @@
}
if (value.charAt(0) == '@') {
- Set<String> list;
-
if (AjaxRendererUtils.ALL.equals(value)) {
- list = ALL;
+ return ALL_SINGLETON_SET;
} else if (AjaxRendererUtils.FORM.equals(value)) {
- list = FORM;
+ return FORM_SINGLETON_SET;
} else if (AjaxRendererUtils.THIS.equals(value)) {
- list = THIS;
+ return THIS_SINGLETON_SET;
} else if (AjaxRendererUtils.REGION.equals(value)) {
- list = REGION;
+ return REGION_SINGLETON_SET;
} else if (AjaxRendererUtils.NONE.equals(value)) {
- list = NONE;
- } else {
- throw new FacesException(value + " : Invalid id keyword specified for '" + propertyName + "' attribute");
+ return NONE_SINGLETON_SET;
}
-
- return list;
}
return Collections.singleton(value);
}
@@ -153,8 +147,15 @@
getStateHelper().put(PropertyKeys.data, data);
}
+ @SuppressWarnings("unchecked")
public Collection<String> getExecute() {
- return (Collection<String>) getStateHelper().eval(PropertyKeys.execute);
+ Object executeObject = getStateHelper().eval(PropertyKeys.execute);
+
+ if (executeObject instanceof Collection<?>) {
+ return (Collection<String>) executeObject;
+ } else {
+ return AjaxRendererUtils.asSet(executeObject);
+ }
}
public void setExecute(Collection<String> execute) {
@@ -209,8 +210,15 @@
getStateHelper().put(PropertyKeys.queueId, queueId);
}
+ @SuppressWarnings("unchecked")
public Collection<String> getRender() {
- return (Collection<String>) getStateHelper().eval(PropertyKeys.render);
+ Object renderObject = getStateHelper().eval(PropertyKeys.render);
+
+ if (renderObject instanceof Collection<?>) {
+ return (Collection<String>) renderObject;
+ } else {
+ return AjaxRendererUtils.asSet(renderObject);
+ }
}
public void setRender(Collection<String> render) {
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java 2010-05-20 18:05:21 UTC (rev 17169)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/html/AjaxHandler.java 2010-05-20 19:17:03 UTC (rev 17170)
@@ -186,4 +186,5 @@
return eventName;
}
+
}
Modified: root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/tag/BehaviorRule.java
===================================================================
--- root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/tag/BehaviorRule.java 2010-05-20 18:05:21 UTC (rev 17169)
+++ root/ui/core/trunk/api/src/main/java/org/richfaces/view/facelets/tag/BehaviorRule.java 2010-05-20 19:17:03 UTC (rev 17170)
@@ -63,9 +63,9 @@
private final TagAttribute attr;
- private final Class type;
+ private final Class<?> type;
- public ValueExpressionMetadata(String name, Class type, TagAttribute attr) {
+ public ValueExpressionMetadata(String name, Class<?> type, TagAttribute attr) {
this.name = name;
this.attr = attr;
this.type = type;
@@ -82,14 +82,21 @@
if (meta.isTargetInstanceOf(ClientBehavior.class)) {
if (!attribute.isLiteral()) {
- Class type = meta.getPropertyType(name);
- if (type == null) {
+ Class<?> type = meta.getPropertyType(name);
+ //TODO nick -> anton - shouldn't this check be in AjaxBehaviorRule?
+ if ("execute".equals(name) || "render".equals(name)) {
type = Object.class;
+ } else {
+ type = meta.getPropertyType(name);
+ if (type == null) {
+ type = Object.class;
+ }
}
+
return new ValueExpressionMetadata(name, type, attribute);
- } else if (meta != null) {
-
+ } else {
if (meta.getWriteMethod(name) != null) {
+ //TODO nick -> anton - shouldn't this check be in AjaxBehaviorRule?
if ("execute".equals(name) || "render".equals(name)) {
return new LiteralAttributeMetadata(name, attribute.getValue());
}
14 years, 1 month
JBoss Rich Faces SVN: r17169 - in root/core/trunk/impl/src: test/java/org/richfaces/context and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-20 14:05:21 -0400 (Thu, 20 May 2010)
New Revision: 17169
Modified:
root/core/trunk/impl/src/main/java/org/richfaces/context/ExtendedPartialVisitContext.java
root/core/trunk/impl/src/main/java/org/richfaces/context/IdParser.java
root/core/trunk/impl/src/test/java/org/richfaces/context/IdParserTest.java
Log:
https://jira.jboss.org/browse/RF-7856
Modified: root/core/trunk/impl/src/main/java/org/richfaces/context/ExtendedPartialVisitContext.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/context/ExtendedPartialVisitContext.java 2010-05-20 16:47:12 UTC (rev 17168)
+++ root/core/trunk/impl/src/main/java/org/richfaces/context/ExtendedPartialVisitContext.java 2010-05-20 18:05:21 UTC (rev 17169)
@@ -326,7 +326,10 @@
//TODO replace with constant
sb.append(':');
}
- sb.append(metadataComponentId != null ? metadataComponentId : componentId);
+ sb.append(componentId);
+ if (metadataComponentId != null) {
+ sb.append(metadataComponentId);
+ }
List<IdTreeNode> idTreeChildNodes = idTreeNode.getChildNodes();
if (idTreeChildNodes != null) {
Modified: root/core/trunk/impl/src/main/java/org/richfaces/context/IdParser.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/context/IdParser.java 2010-05-20 16:47:12 UTC (rev 17168)
+++ root/core/trunk/impl/src/main/java/org/richfaces/context/IdParser.java 2010-05-20 18:05:21 UTC (rev 17169)
@@ -81,6 +81,7 @@
if (c == subComponentSeparator) {
if (componentId == null) {
componentId = id.substring(idx, i);
+ idx = i;
}
} else if (c == namingContainerSeparator) {
String idSegment = id.substring(idx, i);
Modified: root/core/trunk/impl/src/test/java/org/richfaces/context/IdParserTest.java
===================================================================
--- root/core/trunk/impl/src/test/java/org/richfaces/context/IdParserTest.java 2010-05-20 16:47:12 UTC (rev 17168)
+++ root/core/trunk/impl/src/test/java/org/richfaces/context/IdParserTest.java 2010-05-20 18:05:21 UTC (rev 17169)
@@ -95,7 +95,7 @@
idParser.setId("table@head");
assertTrue(idParser.findNext());
- assertEquals("table@head", idParser.getMetadataComponentId());
+ assertEquals("@head", idParser.getMetadataComponentId());
assertEquals("table", idParser.getComponentId());
assertFalse(idParser.findNext());
@@ -118,7 +118,7 @@
assertNull(idParser.getMetadataComponentId());
assertTrue(idParser.findNext());
- assertEquals("nestedTable@body", idParser.getMetadataComponentId());
+ assertEquals("@body", idParser.getMetadataComponentId());
assertEquals("nestedTable", idParser.getComponentId());
assertFalse(idParser.findNext());
@@ -126,7 +126,7 @@
idParser.setId("myBigTable@header");
assertTrue(idParser.findNext());
- assertEquals("myBigTable@header", idParser.getMetadataComponentId());
+ assertEquals("@header", idParser.getMetadataComponentId());
assertEquals("myBigTable", idParser.getComponentId());
assertFalse(idParser.findNext());
@@ -142,7 +142,7 @@
assertNull(idParser.getMetadataComponentId());
assertTrue(idParser.findNext());
- assertEquals("node@status", idParser.getMetadataComponentId());
+ assertEquals("@status", idParser.getMetadataComponentId());
assertEquals("node", idParser.getComponentId());
assertTrue(idParser.findNext());
@@ -154,7 +154,7 @@
assertNull(idParser.getMetadataComponentId());
assertTrue(idParser.findNext());
- assertEquals("tab@label", idParser.getMetadataComponentId());
+ assertEquals("@label", idParser.getMetadataComponentId());
assertEquals("tab", idParser.getComponentId());
assertFalse(idParser.findNext());
@@ -171,7 +171,7 @@
assertNull(idParser.getMetadataComponentId());
assertTrue(idParser.findNext());
- assertEquals("table@head@x-head", idParser.getMetadataComponentId());
+ assertEquals("@head@x-head", idParser.getMetadataComponentId());
assertEquals("table", idParser.getComponentId());
assertTrue(idParser.findNext());
14 years, 1 month
JBoss Rich Faces SVN: r17168 - root/core/trunk/impl/src/main/java/org/richfaces/resource.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-20 12:47:12 -0400 (Thu, 20 May 2010)
New Revision: 17168
Modified:
root/core/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java
Log:
https://jira.jboss.org/jira/browse/RF-8665
Modified: root/core/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java 2010-05-20 16:44:55 UTC (rev 17167)
+++ root/core/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java 2010-05-20 16:47:12 UTC (rev 17168)
@@ -459,6 +459,8 @@
resourceName));
}
}
+ } catch (ClassNotFoundException e) {
+ //do nothing
} catch (Exception e) {
logResourceProblem(FacesContext.getCurrentInstance(), e, "Error creating resource {0}", resourceName);
} catch (LinkageError e) {
14 years, 1 month
JBoss Rich Faces SVN: r17167 - root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-05-20 12:44:55 -0400 (Thu, 20 May 2010)
New Revision: 17167
Modified:
root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UIExtendedDataTable.java
Log:
RF-8660
Modified: root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UIExtendedDataTable.java
===================================================================
--- root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2010-05-20 16:21:07 UTC (rev 17166)
+++ root/ui-sandbox/tables/trunk/ui/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2010-05-20 16:44:55 UTC (rev 17167)
@@ -139,7 +139,10 @@
int rows = getClientRows();
if (rows > 0) {
- rows = Math.min(rows, getRows());
+ int r = getRows();
+ if (r > 0 && r < rows) {
+ rows = r;
+ }
} else {
rows = getRows();
}
14 years, 1 month