JBoss Rich Faces SVN: r8201 - in trunk/framework/test: src/test/java/org/richfaces/skin and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-25 15:39:22 -0400 (Fri, 25 Apr 2008)
New Revision: 8201
Added:
trunk/framework/test/src/test/resources/META-INF/skins/dynabase1.skin.properties
trunk/framework/test/src/test/resources/META-INF/skins/dynabase2.skin.properties
trunk/framework/test/src/test/resources/META-INF/skins/dynatest.skin.properties
trunk/framework/test/src/test/resources/META-INF/skins/dynatest_base.skin.properties
trunk/framework/test/src/test/resources/META-INF/skins/style_base.skin.properties
Modified:
trunk/framework/test/pom.xml
trunk/framework/test/src/test/java/org/richfaces/skin/SkinTestCase.java
trunk/framework/test/src/test/resources/META-INF/skins/style.skin.properties
Log:
Skins implementation refeactored again, several issues fixed, tests added
Modified: trunk/framework/test/pom.xml
===================================================================
--- trunk/framework/test/pom.xml 2008-04-25 19:11:42 UTC (rev 8200)
+++ trunk/framework/test/pom.xml 2008-04-25 19:39:22 UTC (rev 8201)
@@ -70,19 +70,4 @@
<version>1.6R7</version>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/SkinTestCase.java</exclude>
- </excludes>
- </configuration>
- </plugin>
-
- </plugins>
-
- </build>
</project>
\ No newline at end of file
Modified: trunk/framework/test/src/test/java/org/richfaces/skin/SkinTestCase.java
===================================================================
--- trunk/framework/test/src/test/java/org/richfaces/skin/SkinTestCase.java 2008-04-25 19:11:42 UTC (rev 8200)
+++ trunk/framework/test/src/test/java/org/richfaces/skin/SkinTestCase.java 2008-04-25 19:39:22 UTC (rev 8201)
@@ -26,301 +26,215 @@
import java.util.Properties;
import javax.faces.FacesException;
-import javax.faces.FactoryFinder;
-import javax.faces.application.Application;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-import junit.framework.TestCase;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.easymock.MockControl;
-import org.easymock.classextension.MockClassControl;
-
/**
* Test for Skin/skin factory methods.
* @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
* @version $Revision: 1.1.2.1 $ $Date: 2007/01/10 14:28:13 $
*
*/
-public class SkinTestCase extends TestCase {
- private MockControl contextControl;
- private FacesContext mockContext;
+public class SkinTestCase extends AbstractAjax4JsfTestCase {
- private MockControl externalContextControl;
- private ExternalContext mockExternalContext;
-
- private TestApplicationFactory appFactory;
-
- private MockControl bindingControl;
- private ValueBinding mockBinding;
- private MockControl bindingSkinControl;
- private ValueBinding mockSkinBinding;
+ public SkinTestCase(String name) {
+ super(name);
+ }
- public SkinTestCase(String name) {
- super(name);
- }
+ public void setUp() throws Exception {
+ super.setUp();
+ }
- protected void setUp() throws Exception {
- contextControl = MockClassControl.createControl(FacesContext.class);
- mockContext = (FacesContext) contextControl.getMock();
- externalContextControl = MockClassControl.createControl(ExternalContext.class);
- mockExternalContext = (ExternalContext) externalContextControl.getMock();
- bindingControl = MockClassControl.createNiceControl(ValueBinding.class);
- mockBinding = (ValueBinding) bindingControl.getMock();
- bindingSkinControl = MockClassControl.createNiceControl(ValueBinding.class);
- mockSkinBinding = (ValueBinding) bindingSkinControl.getMock();
- FactoryFinder.releaseFactories();
- FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY, TestApplicationFactory.class.getName());
- appFactory = (TestApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
- super.setUp();
- }
+ public void tearDown() throws Exception {
+ SkinFactory.reset();
+ super.tearDown();
+ }
- protected void tearDown() throws Exception {
- FactoryFinder.releaseFactories();
- SkinFactory.reset();
- super.tearDown();
- }
+ /*
+ * Test method for 'org.richfaces.skin.SkinFactory.getInstance()'
+ */
+ public void testGetInstance() {
+ SkinFactory factory = SkinFactory.getInstance();
+ SkinFactory factory1 = SkinFactory.getInstance();
+ assertSame(factory,factory1);
+ }
- /*
- * Test method for 'org.richfaces.skin.SkinFactory.getInstance()'
- */
- public void testGetInstance() {
- SkinFactory factory = SkinFactory.getInstance();
- SkinFactory factory1 = SkinFactory.getInstance();
- assertSame(factory,factory1);
+ private void addParameters(Object[][] strings) {
+ Map<Object,Object> baseMap = new HashMap<Object, Object>();
+ for (Object[] objects : strings) {
+ baseMap.put(objects[0], objects[1]);
}
- /*
- * Test method for 'org.richfaces.skin.SkinFactory.getSkin(FacesContext)'
- */
- public void testGetSkin() {
- SkinFactory factory = SkinFactory.getInstance();
- // setup context mock
- mockContext.getExternalContext();
- contextControl.setReturnValue(mockExternalContext);
- contextControl.replay();
- // setup External context mock
- mockExternalContext.getInitParameter(SkinFactory.SKIN_PARAMETER);
- externalContextControl.setReturnValue("test");
- externalContextControl.replay();
- // setup Application mock
- Application app = appFactory.getApplication();
- app.createValueBinding("#{test.bean}");
- appFactory.getApplicationControl().setReturnValue(mockBinding);
- appFactory.getApplicationControl().replay();
- // setup Value binding mock.
- mockBinding.getValue(mockContext);
- bindingControl.setReturnValue("test.value");
- mockBinding.getValue(mockContext);
- bindingControl.setReturnValue("test.value1");
- bindingControl.setDefaultReturnValue("test.value");
- bindingControl.replay();
- // test call
- Skin skin = factory.getSkin(mockContext);
- // calls control
- contextControl.verify();
- externalContextControl.verify();
- appFactory.getApplicationControl().verify();
- assertNotNull("Null skin!",skin);
- // test properties
- assertEquals("string",skin.getParameter(mockContext,"string.property"));
- assertEquals("base.string",skin.getParameter(mockContext,"base.property"));
- assertEquals("test.value",skin.getParameter(mockContext,"bind.property"));
-// assertEquals("HTML_BASIC",skin.getRenderKitId(mockContext));
- }
+ externalContext.getRequestMap().put("test", baseMap);
+ }
- /*
- * Test method for 'org.richfaces.skin.SkinFactory.getSkin(FacesContext)'
- */
- public void testSkinReferences() {
- SkinFactory factory = SkinFactory.getInstance();
- // setup context mock
- mockContext.getExternalContext();
- contextControl.setReturnValue(mockExternalContext);
- contextControl.replay();
- // setup External context mock
- mockExternalContext.getInitParameter(SkinFactory.SKIN_PARAMETER);
- externalContextControl.setReturnValue("test");
- externalContextControl.replay();
- // setup Application mock
- Application app = appFactory.getApplication();
- app.createValueBinding("#{test.bean}");
- appFactory.getApplicationControl().setReturnValue(mockBinding);
- appFactory.getApplicationControl().replay();
- // setup Value binding mock.
- mockBinding.getValue(mockContext);
- bindingControl.setReturnValue("test.value");
- mockBinding.getValue(mockContext);
- bindingControl.setReturnValue("test.value1");
- bindingControl.setDefaultReturnValue("test.value");
- bindingControl.replay();
- // test call
- Skin skin = factory.getSkin(mockContext);
- // calls control
- contextControl.verify();
- externalContextControl.verify();
- appFactory.getApplicationControl().verify();
- assertNotNull("Null skin!",skin);
- assertEquals("default",skin.getParameter(mockContext,"c"));
- assertEquals("yyy",skin.getParameter(mockContext,"y"));
- }
+ /*
+ * Test method for 'org.richfaces.skin.SkinFactory.getSkin(FacesContext)'
+ */
+ public void testGetSkin() {
+ servletContext.addInitParameter(SkinFactory.SKIN_PARAMETER, "test");
- /*
- * Test method for 'org.richfaces.skin.SkinFactory.getSkin(FacesContext)'
- */
- public void testCyclicSkinReferences() {
- SkinFactory factory = SkinFactory.getInstance();
- // setup context mock
- mockContext.getExternalContext();
- contextControl.setReturnValue(mockExternalContext);
- contextControl.replay();
- // setup External context mock
- mockExternalContext.getInitParameter(SkinFactory.SKIN_PARAMETER);
- externalContextControl.setReturnValue("cyclic");
- externalContextControl.replay();
- // test call
- try {
- Skin skin = factory.getSkin(mockContext);
- } catch(FacesException e){
- return;
- }
- assertTrue(false);
- }
+ addParameters(new Object[][]{new Object[] {"bean", "test.value"}});
- /*
- * Test method for 'org.richfaces.skin.SkinFactory.getSkin(FacesContext)'
- */
- public void testBadSkinReferences() {
- SkinFactory factory = SkinFactory.getInstance();
- // setup context mock
- mockContext.getExternalContext();
- contextControl.setReturnValue(mockExternalContext);
- contextControl.replay();
- // setup External context mock
- mockExternalContext.getInitParameter(SkinFactory.SKIN_PARAMETER);
- externalContextControl.setReturnValue("noref");
- externalContextControl.replay();
- // test call
- try {
- Skin skin = factory.getSkin(mockContext);
- } catch(FacesException e){
- return;
- }
- assertTrue(false);
- }
- /*
- * Test method for 'org.richfaces.skin.SkinFactory.getSkin(FacesContext)'
- */
- public void testGetBindedSkin() {
- SkinFactory factory = SkinFactory.getInstance();
- // setup context mock
- mockContext.getExternalContext();
- contextControl.setReturnValue(mockExternalContext);
- mockContext.getApplication();
- contextControl.setReturnValue(appFactory.getApplication());
- contextControl.replay();
- // setup External context mock
- mockExternalContext.getInitParameter(SkinFactory.SKIN_PARAMETER);
- externalContextControl.setReturnValue("#{test.skin}");
- externalContextControl.replay();
- // setup Application mock
- Application app = appFactory.getApplication();
- app.createValueBinding("#{test.skin}");
- appFactory.getApplicationControl().setReturnValue(mockSkinBinding);
- app.createValueBinding("#{test.bean}");
- appFactory.getApplicationControl().setReturnValue(mockBinding);
- appFactory.getApplicationControl().replay();
- // setup Value binding mock.
- mockBinding.getValue(mockContext);
- bindingControl.setReturnValue("binded.test.value");
- bindingControl.replay();
- // skin EL binding.
- mockSkinBinding.getValue(mockContext);
- bindingSkinControl.setDefaultReturnValue("bindedtest");
- bindingSkinControl.replay();
- // test call
- Skin skin = factory.getSkin(mockContext);
- assertNotNull("Null skin!",skin);
- // test properties
- assertEquals("bindedstring",skin.getParameter(mockContext,"string.property"));
-// assertEquals("base.string",skin.getParameter(mockContext,"base.property"));
- assertEquals("binded.test.value",skin.getParameter(mockContext,"bind.property"));
- assertEquals("TEST",skin.getRenderKitId(mockContext));
+ SkinFactory factory = SkinFactory.getInstance();
+ // test call
+ Skin skin = factory.getSkin(facesContext);
+ assertNotNull("Null skin!",skin);
+ // test properties
+ assertEquals("string",skin.getParameter(facesContext, "string.property"));
+ assertEquals("base.string",skin.getParameter(facesContext, "base.property"));
+ assertEquals("test.value",skin.getParameter(facesContext, "bind.property"));
+ // assertEquals("HTML_BASIC",skin.getRenderKitId(mockContext));
+ }
-
- // calls control
-// contextControl.verify();
-// externalContextControl.verify();
-// appFactory.getApplicationControl().verify();
-// bindingControl.verify();
-// bindingSkinControl.verify();
-}
-
- public void testSkinHash() {
- SkinFactory factory = SkinFactory.getInstance();
- // setup context mock
- mockContext.getExternalContext();
- contextControl.setDefaultReturnValue(mockExternalContext);
- mockContext.getApplication();
- contextControl.setReturnValue(appFactory.getApplication());
- contextControl.replay();
- // setup External context mock
- mockExternalContext.getInitParameter(SkinFactory.SKIN_PARAMETER);
- externalContextControl.setReturnValue("#{test.skin}");
- Map params = new HashMap();
- mockExternalContext.getRequestMap();
- externalContextControl.setDefaultReturnValue(params);
- externalContextControl.replay();
- // setup Application mock
- Application app = appFactory.getApplication();
- app.createValueBinding("#{test.skin}");
- appFactory.getApplicationControl().setReturnValue(mockSkinBinding);
- app.createValueBinding("#{test.bean}");
- appFactory.getApplicationControl().setReturnValue(mockBinding);
- appFactory.getApplicationControl().replay();
- // setup Value binding mock.
- mockBinding.getValue(mockContext);
- bindingControl.setDefaultReturnValue("binded.test.value");
- bindingControl.replay();
- // skin EL binding.
- mockSkinBinding.getValue(mockContext);
- bindingSkinControl.setDefaultReturnValue("bindedtest");
- bindingSkinControl.replay();
- // test call
- Skin skin = factory.getSkin(mockContext);
- assertNotNull("Null skin!",skin);
- // test properties
- int hash = skin.hashCode(mockContext);
- assertTrue(params.containsKey(BasicSkinImpl.REQUEST_HASH_CODES_MAP_PARAMETER));
- assertEquals(hash,skin.hashCode(mockContext));
- params.clear();
- assertEquals(hash,skin.hashCode(mockContext));
- // setup Value binding mock for different value - hash must differ.
- params.clear();
- bindingControl.reset();
- mockBinding.getValue(mockContext);
- bindingControl.setDefaultReturnValue("other.test.value");
- bindingControl.replay();
- assertFalse( hash==skin.hashCode(mockContext) );
+ /*
+ * Test method for 'org.richfaces.skin.SkinFactory.getSkin(FacesContext)'
+ */
+ public void testSkinReferences() {
+ SkinFactory factory = SkinFactory.getInstance();
+ servletContext.addInitParameter(SkinFactory.SKIN_PARAMETER, "test");
+ // test call
+ Skin skin = factory.getSkin(facesContext);
+ assertNotNull("Null skin!",skin);
+ assertEquals("default",skin.getParameter(facesContext, "c"));
+ assertEquals("yyy",skin.getParameter(facesContext, "y"));
+ }
+
+ /*
+ * Test method for 'org.richfaces.skin.SkinFactory.getSkin(FacesContext)'
+ */
+ public void testSkinReferences1() {
+ SkinFactory factory = SkinFactory.getInstance();
+ servletContext.addInitParameter(SkinFactory.SKIN_PARAMETER, "style");
+ servletContext.addInitParameter(SkinFactory.BASE_SKIN_PARAMETER, "style_base");
+
+ // test call
+ Skin skin = factory.getSkin(facesContext);
+ assertNotNull("Null skin!",skin);
+ assertEquals("#F5F0E7",skin.getParameter(facesContext, "intermediateTextColor"));
+ assertEquals("10px",skin.getParameter(facesContext, "intermediateTextSize"));
+ assertEquals("#F5F0E7",skin.getParameter(facesContext, "generalTextColor"));
+
+ assertEquals("white.textcolor",skin.getParameter(facesContext, "additionalTextColor"));
+ }
+
+ public void testBaseSkin() {
+ SkinFactory factory = SkinFactory.getInstance();
+ servletContext.addInitParameter(SkinFactory.SKIN_PARAMETER, "dynatest");
+ servletContext.addInitParameter(SkinFactory.BASE_SKIN_PARAMETER, "dynatest_base");
+ addParameters(new Object[][]{new Object[] {"bean", "dynabase1"}});
+
+ Skin skin = factory.getSkin(facesContext);
+ assertEquals("default", skin.getParameter(facesContext, "default"));
+ assertEquals("itself", skin.getParameter(facesContext, "selfValue"));
+ assertEquals("#AAA", skin.getParameter(facesContext, "customFormColor"));
+
+ Map map = (Map) externalContext.getRequestMap().get("test");
+ map.put("bean", "dynabase2");
+
+ assertEquals("xxx", skin.getParameter(facesContext, "default"));
+ assertEquals("itself", skin.getParameter(facesContext, "selfValue"));
+ assertEquals("#AAA", skin.getParameter(facesContext, "customFormColor"));
+ }
+
+ /*
+ * Test method for 'org.richfaces.skin.SkinFactory.getSkin(FacesContext)'
+ */
+ public void testCyclicSkinReferences() {
+ SkinFactory factory = SkinFactory.getInstance();
+ servletContext.addInitParameter(SkinFactory.SKIN_PARAMETER, "cyclic");
+
+ try {
+ Skin skin = factory.getSkin(facesContext);
+ skin.getParameter(facesContext, "x");
+ fail();
+ } catch(FacesException e){
+ //it's ok
}
- /*
- * Test method for 'org.richfaces.skin.SkinFactory.getDefaultProperties()'
- */
- public void testGetDefaultProperties() {
- SkinFactoryImpl factory = (SkinFactoryImpl) SkinFactory.getInstance();
- Properties defaultProps = factory.getDefaultSkinProperties();
-// assertEquals("HTML_BASIC",defaultProps.getProperty("render.kit"));
- // Second default config
- assertEquals("default",defaultProps.getProperty("a"));
- }
+ }
- /*
- * Test method for 'org.richfaces.skin.SkinFactory.getSkinName(FacesContext)'
- */
- public void testGetSkinName() {
+ /*
+ * Test method for 'org.richfaces.skin.SkinFactory.getSkin(FacesContext)'
+ */
+ public void testBadSkinReferences() {
+ SkinFactory factory = SkinFactory.getInstance();
+ servletContext.addInitParameter(SkinFactory.SKIN_PARAMETER, "noref");
+ // test call
+ try {
+ Skin skin = factory.getSkin(facesContext);
+ skin.getParameter(facesContext, "x");
+ fail();
+ } catch(FacesException e){
+ //it's ok
}
+ }
+ /*
+ * Test method for 'org.richfaces.skin.SkinFactory.getSkin(FacesContext)'
+ */
+ public void testGetBindedSkin() {
+ SkinFactory factory = SkinFactory.getInstance();
+ servletContext.addInitParameter(SkinFactory.SKIN_PARAMETER, "#{test.skin}");
+ addParameters(new Object[][] {
+ new Object[] {"skin", "bindedtest"},
+ new Object[] {"bean", "binded.test.value"}
+ });
+
+ // test call
+ Skin skin = factory.getSkin(facesContext);
+ assertNotNull("Null skin!",skin);
+ // test properties
+ assertEquals("bindedstring",skin.getParameter(facesContext, "string.property"));
+ // assertEquals("base.string",skin.getParameter(mockContext,"base.property"));
+ assertEquals("binded.test.value",skin.getParameter(facesContext, "bind.property"));
+ assertEquals("TEST",skin.getRenderKitId(facesContext));
+ }
+
+ public void testSkinHash() {
+ SkinFactory factory = SkinFactory.getInstance();
+ servletContext.addInitParameter(SkinFactory.SKIN_PARAMETER, "#{test.skin}");
+
+ addParameters(new Object[][] {
+ new Object[] {"skin", "bindedtest"},
+ new Object[] {"bean", "binded.test.value"}
+ });
+
+ Skin skin = factory.getSkin(facesContext);
+ Map<String, Object> requestMap = facesContext.getExternalContext().getRequestMap();
+
+ // test properties
+ int hash = skin.hashCode(facesContext);
+ assertTrue(requestMap.containsKey(BasicSkinImpl.REQUEST_HASH_CODES_MAP_PARAMETER));
+ assertEquals(hash,skin.hashCode(facesContext));
+ requestMap.remove(BasicSkinImpl.REQUEST_HASH_CODES_MAP_PARAMETER);
+ assertEquals(hash,skin.hashCode(facesContext));
+ // setup Value binding mock for different value - hash must differ.
+ requestMap.remove(BasicSkinImpl.REQUEST_HASH_CODES_MAP_PARAMETER);
+
+ Map map = (Map) requestMap.get("test");
+ map.put("bean", "other.test.value");
+
+ assertFalse( hash==skin.hashCode(facesContext) );
+
+ }
+ /*
+ * Test method for 'org.richfaces.skin.SkinFactory.getDefaultProperties()'
+ */
+ public void testGetDefaultProperties() {
+ SkinFactoryImpl factory = (SkinFactoryImpl) SkinFactory.getInstance();
+ Properties defaultProps = factory.getDefaultSkinProperties();
+ // assertEquals("HTML_BASIC",defaultProps.getProperty("render.kit"));
+ // Second default config
+ assertEquals("default",defaultProps.getProperty("a"));
+ }
+
+ /*
+ * Test method for 'org.richfaces.skin.SkinFactory.getSkinName(FacesContext)'
+ */
+ public void testGetSkinName() {
+
+ }
+
}
Added: trunk/framework/test/src/test/resources/META-INF/skins/dynabase1.skin.properties
===================================================================
--- trunk/framework/test/src/test/resources/META-INF/skins/dynabase1.skin.properties (rev 0)
+++ trunk/framework/test/src/test/resources/META-INF/skins/dynabase1.skin.properties 2008-04-25 19:39:22 UTC (rev 8201)
@@ -0,0 +1,2 @@
+default=&a
+selfBase=&selfValue
\ No newline at end of file
Added: trunk/framework/test/src/test/resources/META-INF/skins/dynabase2.skin.properties
===================================================================
--- trunk/framework/test/src/test/resources/META-INF/skins/dynabase2.skin.properties (rev 0)
+++ trunk/framework/test/src/test/resources/META-INF/skins/dynabase2.skin.properties 2008-04-25 19:39:22 UTC (rev 8201)
@@ -0,0 +1,2 @@
+default=&x
+selfBase=&selfValue
\ No newline at end of file
Added: trunk/framework/test/src/test/resources/META-INF/skins/dynatest.skin.properties
===================================================================
--- trunk/framework/test/src/test/resources/META-INF/skins/dynatest.skin.properties (rev 0)
+++ trunk/framework/test/src/test/resources/META-INF/skins/dynatest.skin.properties 2008-04-25 19:39:22 UTC (rev 8201)
@@ -0,0 +1,5 @@
+baseSkin=#{test.bean}
+
+self=&selfBase
+
+selfValue=itself
\ No newline at end of file
Added: trunk/framework/test/src/test/resources/META-INF/skins/dynatest_base.skin.properties
===================================================================
--- trunk/framework/test/src/test/resources/META-INF/skins/dynatest_base.skin.properties (rev 0)
+++ trunk/framework/test/src/test/resources/META-INF/skins/dynatest_base.skin.properties 2008-04-25 19:39:22 UTC (rev 8201)
@@ -0,0 +1 @@
+customFormColor=#AAA
Modified: trunk/framework/test/src/test/resources/META-INF/skins/style.skin.properties
===================================================================
--- trunk/framework/test/src/test/resources/META-INF/skins/style.skin.properties 2008-04-25 19:11:42 UTC (rev 8200)
+++ trunk/framework/test/src/test/resources/META-INF/skins/style.skin.properties 2008-04-25 19:39:22 UTC (rev 8201)
@@ -1,3 +1,8 @@
generalStyleSheet=resource\://skin/style.xcss
intermediateTextColor=&customFormColor
-generalTextColor=&intermediateTextColor
\ No newline at end of file
+intermediateTextSize=&intermediateTextSizeBase
+
+generalTextColor=&intermediateTextColor
+
+additionalTextColor=&additionalBaseTextColor
+textColor=white.textcolor
Added: trunk/framework/test/src/test/resources/META-INF/skins/style_base.skin.properties
===================================================================
--- trunk/framework/test/src/test/resources/META-INF/skins/style_base.skin.properties (rev 0)
+++ trunk/framework/test/src/test/resources/META-INF/skins/style_base.skin.properties 2008-04-25 19:39:22 UTC (rev 8201)
@@ -0,0 +1,4 @@
+intermediateTextColor=green.intermediate
+intermediateTextSizeBase=10px
+additionalBaseTextColor=&textColor
+defaultBaseTextColor=&customFormColor
\ No newline at end of file
16 years, 8 months
JBoss Rich Faces SVN: r8200 - in trunk/ui/separator/src: main/java/org/richfaces/component and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-04-25 15:11:42 -0400 (Fri, 25 Apr 2008)
New Revision: 8200
Added:
trunk/ui/separator/src/main/resources/org/richfaces/renderkit/html/css/separator.xcss
Modified:
trunk/ui/separator/src/main/config/component/separator.xml
trunk/ui/separator/src/main/java/org/richfaces/component/UISeparator.java
trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/SeparatorRendererBase.java
trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java
trunk/ui/separator/src/main/templates/separator.jspx
trunk/ui/separator/src/test/java/org/richfaces/component/SeparatorComponentTest.java
trunk/ui/separator/src/test/java/org/richfaces/renderkit/html/SeparatorRendererTest.java
Log:
http://jira.jboss.com/jira/browse/RF-3250
Modified: trunk/ui/separator/src/main/config/component/separator.xml
===================================================================
--- trunk/ui/separator/src/main/config/component/separator.xml 2008-04-25 16:53:51 UTC (rev 8199)
+++ trunk/ui/separator/src/main/config/component/separator.xml 2008-04-25 19:11:42 UTC (rev 8200)
@@ -39,14 +39,12 @@
<classname>java.lang.String</classname>
<description>The separator width that can be defined in pixels or in percents. The default value is 100%
</description>
- <defaultvalue>""</defaultvalue>
</property>
<property>
<name>height</name>
<classname>java.lang.String</classname>
<description>The separator height. Default value is 6 pixels
</description>
- <defaultvalue>"6px"</defaultvalue>
</property>
<property>
<name>lineType</name>
Modified: trunk/ui/separator/src/main/java/org/richfaces/component/UISeparator.java
===================================================================
--- trunk/ui/separator/src/main/java/org/richfaces/component/UISeparator.java 2008-04-25 16:53:51 UTC (rev 8199)
+++ trunk/ui/separator/src/main/java/org/richfaces/component/UISeparator.java 2008-04-25 19:11:42 UTC (rev 8200)
@@ -28,15 +28,6 @@
*
*/
public abstract class UISeparator extends UIComponentBase {
-
- public static final String DEFAULT_HEIGHT = "6px";
- public static final String DEFAULT_WIDTH = "";
- public static final String LINE_TYPE_BEVEL = "beveled";
- public static final String LINE_TYPE_DOUBLE = "double";
- public static final String LINE_TYPE_DOTTED = "dotted";
- public static final String LINE_TYPE_DASHED = "dashed";
- public static final String LINE_TYPE_SOLID = "solid";
-
public abstract String getLineType();
public abstract void setLineType(String lineType);
Modified: trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/SeparatorRendererBase.java
===================================================================
--- trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/SeparatorRendererBase.java 2008-04-25 16:53:51 UTC (rev 8199)
+++ trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/SeparatorRendererBase.java 2008-04-25 19:11:42 UTC (rev 8200)
@@ -28,32 +28,46 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import org.ajax4jsf.renderkit.RendererBase;
+import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
+import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.util.HtmlDimensions;
import org.ajax4jsf.util.style.CSSFormat;
import org.richfaces.component.UISeparator;
import org.richfaces.renderkit.html.images.BevelSeparatorImage;
import org.richfaces.renderkit.html.images.SimpleSeparatorImage;
-public class SeparatorRendererBase extends RendererBase {
+public class SeparatorRendererBase extends HeaderResourcesRendererBase {
+ public static final String IMAGE_CLASS_BEVEL = "rich-separator-image-bevel";
+ public static final String IMAGE_CLASS_SIMPLE = "rich-separator-image-simple";
+
+ public static final int DEFAULT_HEIGHT = 6;
+
+ public static final String LINE_TYPE_NONE = "none";
+ public static final String LINE_TYPE_BEVEL = "beveled";
+ public static final String LINE_TYPE_DOUBLE = "double";
+ public static final String LINE_TYPE_DOTTED = "dotted";
+ public static final String LINE_TYPE_DASHED = "dashed";
+ public static final String LINE_TYPE_SOLID = "solid";
+
+
- private static final String[] SUPPORTED_TYPES = {
- UISeparator.LINE_TYPE_BEVEL,
- UISeparator.LINE_TYPE_DASHED,
- UISeparator.LINE_TYPE_DOTTED,
- UISeparator.LINE_TYPE_DOUBLE,
- UISeparator.LINE_TYPE_SOLID
+ public static final String[] SUPPORTED_TYPES = {
+ LINE_TYPE_BEVEL,
+ LINE_TYPE_DASHED,
+ LINE_TYPE_DOTTED,
+ LINE_TYPE_DOUBLE,
+ LINE_TYPE_SOLID
};
- private String getCSSDimension(UIComponent component, String attributeName, String defaultValue) {
+ private String getCSSDimension(UIComponent component, String attributeName) {
Object hO = component.getAttributes().get(attributeName);
String height;
if (hO == null) {
- height = defaultValue;
+ return null;
} else if (hO instanceof String) {
height = (String) hO;
if (height.trim().length() == 0) {
- height = defaultValue;
+ return null;
}
} else {
height = hO.toString();
@@ -83,23 +97,29 @@
public String backgroundImage(FacesContext context, UIComponent component) throws IOException {
UISeparator separator = (UISeparator) component;
String lineType = separator.getLineType();
+ if (lineType == null || lineType.trim().length() == 0 || LINE_TYPE_NONE.equals(lineType)) {
+ return "none";
+ }
if (! isSupportedLineType(lineType)) {
- lineType = UISeparator.LINE_TYPE_BEVEL;
+ lineType = LINE_TYPE_BEVEL;
}
- String height = getHeight(context, component);
- if (height.trim().endsWith("%"))
- throw new FacesException("It is not allowed to set height of separator in percent (component " + component.getId() + ")!");
- int h = HtmlDimensions.decode(height).intValue();
+
+ int h = DEFAULT_HEIGHT;
+ String height = getCSSDimension(component, HTML.height_ATTRIBUTE);
+ if (null != height) {
+ if (height.trim().endsWith("%")) {
+ throw new FacesException("It is not allowed to set height of separator in percent (component " + component.getId() + ")!");
+ }
+ h = HtmlDimensions.decode(height).intValue();
+ }
- if (lineType == null || lineType.trim().length() == 0) {
- lineType = UISeparator.LINE_TYPE_BEVEL;
- }
//XXX by nick - fantonov - equalsIgnoreCase here?
- if (lineType.equalsIgnoreCase(UISeparator.LINE_TYPE_BEVEL) && h < 3) {
- lineType = UISeparator.LINE_TYPE_SOLID;
+ if (lineType.equalsIgnoreCase(LINE_TYPE_BEVEL) && h < 3) {
+ lineType = LINE_TYPE_SOLID;
}
+
String uri = null;
- if (lineType.equalsIgnoreCase(UISeparator.LINE_TYPE_BEVEL)) {
+ if (lineType.equalsIgnoreCase(LINE_TYPE_BEVEL)) {
uri = getResource(BevelSeparatorImage.class.getName()).getUri(context, component);
} else {
uri = getResource(SimpleSeparatorImage.class.getName()).getUri(context, component);
@@ -112,11 +132,20 @@
return uri;
}
- public String getHeight(FacesContext context, UIComponent component) {
- return getCSSDimension(component, "height", UISeparator.DEFAULT_HEIGHT);
- }
-
- public String getWidth(FacesContext context, UIComponent component) {
- return getCSSDimension(component, "width", UISeparator.DEFAULT_WIDTH);
- }
+ public String getStyle(FacesContext context, UIComponent component) throws IOException{
+ StringBuffer buff = new StringBuffer();
+
+ String height = getCSSDimension(component, HTML.height_ATTRIBUTE);
+ if (null != height) {
+ buff.append("height: " + height + "; ");
+ }
+ String width = getCSSDimension(component, HTML.width_ATTRIBUTE);
+ if (null != width) {
+ buff.append("width: " + width + "; ");
+ }
+ buff.append("background-image: " + backgroundImage(context, component));
+ buff.append(component.getAttributes().get(HTML.style_ATTRIBUTE));
+
+ return buff.toString();
+ }
}
Modified: trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java
===================================================================
--- trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java 2008-04-25 16:53:51 UTC (rev 8199)
+++ trunk/ui/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java 2008-04-25 19:11:42 UTC (rev 8200)
@@ -39,6 +39,7 @@
import org.ajax4jsf.util.HtmlDimensions;
import org.ajax4jsf.util.Zipper2;
import org.richfaces.component.UISeparator;
+import org.richfaces.renderkit.html.SeparatorRendererBase;
import org.richfaces.skin.Skin;
import org.richfaces.skin.SkinFactory;
@@ -124,7 +125,7 @@
byte[] ret = new byte[6];
String tmp = (String) ((UIComponent) data).getAttributes().get("height");
- int height = HtmlDimensions.decode(tmp == null ? "6" : tmp).intValue();
+ int height = (tmp == null || "".equals(tmp)) ? SeparatorRendererBase.DEFAULT_HEIGHT : HtmlDimensions.decode(tmp).intValue();
Zipper2 zipper2 = new Zipper2(ret).addShort((short) height);
String skinParameter = "headerBackgroundColor";
@@ -138,12 +139,12 @@
//XXX by nick - fantonov - ((UISeparator)data).getLineType() ?
tmp = (String) ((UISeparator) data).getLineType();
int lineType = LINE_TYPE_SOLID;
- if (tmp.equalsIgnoreCase(UISeparator.LINE_TYPE_DOTTED)) {
+ if (tmp.equalsIgnoreCase(SeparatorRendererBase.LINE_TYPE_DOTTED)) {
lineType = LINE_TYPE_DOTTED;
- } else if (tmp.equalsIgnoreCase(UISeparator.LINE_TYPE_DASHED)) {
+ } else if (tmp.equalsIgnoreCase(SeparatorRendererBase.LINE_TYPE_DASHED)) {
lineType = LINE_TYPE_DASHED;
} else
- if (tmp.equalsIgnoreCase(UISeparator.LINE_TYPE_DOUBLE) && height > 2)
+ if (tmp.equalsIgnoreCase(SeparatorRendererBase.LINE_TYPE_DOUBLE) && height > 2)
{
lineType = LINE_TYPE_DOUBLE;
}
Added: trunk/ui/separator/src/main/resources/org/richfaces/renderkit/html/css/separator.xcss
===================================================================
--- trunk/ui/separator/src/main/resources/org/richfaces/renderkit/html/css/separator.xcss (rev 0)
+++ trunk/ui/separator/src/main/resources/org/richfaces/renderkit/html/css/separator.xcss 2008-04-25 19:11:42 UTC (rev 8200)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:template
+ xmlns:f="http://jsf.exadel.com/template"
+ xmlns:u="http://jsf.exadel.com/template/util"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+ <u:selector name=".rich-separator">
+ <u:style name="height" value="6px" />
+ <u:style name="background-repeat" value="repeat-x" />
+ <u:style name="background-position" value="center" />
+ </u:selector>
+
+</f:template>
Modified: trunk/ui/separator/src/main/templates/separator.jspx
===================================================================
--- trunk/ui/separator/src/main/templates/separator.jspx 2008-04-25 16:53:51 UTC (rev 8199)
+++ trunk/ui/separator/src/main/templates/separator.jspx 2008-04-25 19:11:42 UTC (rev 8200)
@@ -9,12 +9,11 @@
baseclass="org.richfaces.renderkit.html.SeparatorRendererBase"
component="org.richfaces.component.UISeparator"
>
- <f:clientid var="clientId"/>
+ <f:clientid var="clientId"/>
+ <h:styles>css/separator.xcss</h:styles>
<div id="#{clientId}" style="font-size: 0px;"
x:passThruWithExclusions="id,width,height,style,class,align,styleClass">
- <div style="width: #{this:getWidth(context, component)}; height: #{this:getHeight(context, component)};
- background-image: #{this:backgroundImage(context, component)}; background-repeat: repeat-x;
- background-position:center; #{component.attributes['style']}"
+ <div style="#{this:getStyle(context, component)};"
class="rich-separator #{component.attributes['styleClass']}"/>
</div>
</f:root>
Modified: trunk/ui/separator/src/test/java/org/richfaces/component/SeparatorComponentTest.java
===================================================================
--- trunk/ui/separator/src/test/java/org/richfaces/component/SeparatorComponentTest.java 2008-04-25 16:53:51 UTC (rev 8199)
+++ trunk/ui/separator/src/test/java/org/richfaces/component/SeparatorComponentTest.java 2008-04-25 19:11:42 UTC (rev 8200)
@@ -32,6 +32,7 @@
import org.ajax4jsf.resource.ResourceBuilderImpl;
import org.ajax4jsf.resource.image.ImageInfo;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.renderkit.html.SeparatorRendererBase;
import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
@@ -42,14 +43,6 @@
*/
public class SeparatorComponentTest extends AbstractAjax4JsfTestCase {
- private static final String[] SUPPORTED_TYPES = {
- UISeparator.LINE_TYPE_BEVEL,
- UISeparator.LINE_TYPE_DASHED,
- UISeparator.LINE_TYPE_DOTTED,
- UISeparator.LINE_TYPE_DOUBLE,
- UISeparator.LINE_TYPE_SOLID
- };
-
private UISeparator ui;
private UIComponent form;
private UIOutput out1;
@@ -123,7 +116,7 @@
public void testRenderImage() throws Exception {
InternetResourceBuilder builder = ResourceBuilderImpl.getInstance();
- ui.setLineType(UISeparator.LINE_TYPE_BEVEL);
+ ui.setLineType(SeparatorRendererBase.LINE_TYPE_BEVEL);
renderView();
InternetResource resource = builder.getResource("org.richfaces.renderkit.html.images.BevelSeparatorImage");
assertNotNull(resource);
@@ -136,7 +129,7 @@
assertTrue(info.check());
assertEquals(ImageInfo.FORMAT_GIF, info.getFormat());
- ui.setLineType(UISeparator.LINE_TYPE_SOLID);
+ ui.setLineType(SeparatorRendererBase.LINE_TYPE_SOLID);
renderView();
resource = builder.getResource("org.richfaces.renderkit.html.images.SimpleSeparatorImage");
assertNotNull(resource);
@@ -150,7 +143,7 @@
assertEquals(ImageInfo.FORMAT_GIF, info.getFormat());
- ui.setLineType(UISeparator.LINE_TYPE_DOTTED);
+ ui.setLineType(SeparatorRendererBase.LINE_TYPE_DOTTED);
renderView();
resource = builder.getResource("org.richfaces.renderkit.html.images.SimpleSeparatorImage");
assertNotNull(resource);
@@ -163,7 +156,7 @@
assertTrue(info.check());
assertEquals(ImageInfo.FORMAT_GIF, info.getFormat());
- ui.setLineType(UISeparator.LINE_TYPE_DASHED);
+ ui.setLineType(SeparatorRendererBase.LINE_TYPE_DASHED);
renderView();
resource = builder.getResource("org.richfaces.renderkit.html.images.SimpleSeparatorImage");
assertNotNull(resource);
@@ -176,7 +169,7 @@
assertTrue(info.check());
assertEquals(ImageInfo.FORMAT_GIF, info.getFormat());
- ui.setLineType(UISeparator.LINE_TYPE_DOUBLE);
+ ui.setLineType(SeparatorRendererBase.LINE_TYPE_DOUBLE);
renderView();
resource = builder.getResource("org.richfaces.renderkit.html.images.SimpleSeparatorImage");
assertNotNull(resource);
Modified: trunk/ui/separator/src/test/java/org/richfaces/renderkit/html/SeparatorRendererTest.java
===================================================================
--- trunk/ui/separator/src/test/java/org/richfaces/renderkit/html/SeparatorRendererTest.java 2008-04-25 16:53:51 UTC (rev 8199)
+++ trunk/ui/separator/src/test/java/org/richfaces/renderkit/html/SeparatorRendererTest.java 2008-04-25 19:11:42 UTC (rev 8200)
@@ -29,14 +29,6 @@
*/
public class SeparatorRendererTest extends AbstractAjax4JsfTestCase {
- private static final String[] SUPPORTED_TYPES = {
- UISeparator.LINE_TYPE_BEVEL,
- UISeparator.LINE_TYPE_DASHED,
- UISeparator.LINE_TYPE_DOTTED,
- UISeparator.LINE_TYPE_DOUBLE,
- UISeparator.LINE_TYPE_SOLID
- };
-
private SeparatorRendererBase renderer;
private UISeparator ui;
@@ -70,8 +62,8 @@
}
public void testSupportedTypes() throws Exception {
- for (int i = 0; i < SUPPORTED_TYPES.length; i++) {
- assertEquals(true, renderer.isSupportedLineType(SUPPORTED_TYPES[i]));
+ for (int i = 0; i < SeparatorRendererBase.SUPPORTED_TYPES.length; i++) {
+ assertEquals(true, renderer.isSupportedLineType(SeparatorRendererBase.SUPPORTED_TYPES[i]));
}
boolean notSupported = renderer.isSupportedLineType("UNDEFINED");
@@ -79,20 +71,20 @@
}
public void testBackgroundImage() throws Exception {
- assertEquals(UISeparator.LINE_TYPE_BEVEL, ui.getLineType());
+ assertEquals(SeparatorRendererBase.LINE_TYPE_BEVEL, ui.getLineType());
ui.setLineType("UNDEFINED");
String uri = renderer.backgroundImage(facesContext, ui);
assertTrue(uri.contains("org.richfaces.renderkit.html.images.BevelSeparatorImage"));
- ui.setLineType(UISeparator.LINE_TYPE_BEVEL);
+ ui.setLineType(SeparatorRendererBase.LINE_TYPE_BEVEL);
uri = renderer.backgroundImage(facesContext, ui);
assertTrue(uri.contains("org.richfaces.renderkit.html.images.BevelSeparatorImage"));
- ui.setLineType(UISeparator.LINE_TYPE_DOTTED);
+ ui.setLineType(SeparatorRendererBase.LINE_TYPE_DOTTED);
uri = renderer.backgroundImage(facesContext, ui);
assertTrue(uri.contains("org.richfaces.renderkit.html.images.SimpleSeparatorImage"));
- ui.setLineType(UISeparator.LINE_TYPE_BEVEL);
+ ui.setLineType(SeparatorRendererBase.LINE_TYPE_BEVEL);
ui.setHeight("10%");
try {
uri = renderer.backgroundImage(facesContext, ui);
@@ -100,7 +92,7 @@
} catch(Exception ex) {
}
- ui.setLineType(UISeparator.LINE_TYPE_BEVEL);
+ ui.setLineType(SeparatorRendererBase.LINE_TYPE_BEVEL);
ui.setHeight("2");
assertTrue(uri.contains("org.richfaces.renderkit.html.images.SimpleSeparatorImage"));
}
16 years, 8 months
JBoss Rich Faces SVN: r8199 - trunk/framework/impl/src/main/java/org/richfaces/skin.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-25 12:53:51 -0400 (Fri, 25 Apr 2008)
New Revision: 8199
Modified:
trunk/framework/impl/src/main/java/org/richfaces/skin/AbstractChainableSkinImpl.java
trunk/framework/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java
Log:
Skins implementation refeactored
Modified: trunk/framework/impl/src/main/java/org/richfaces/skin/AbstractChainableSkinImpl.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/skin/AbstractChainableSkinImpl.java 2008-04-25 16:31:12 UTC (rev 8198)
+++ trunk/framework/impl/src/main/java/org/richfaces/skin/AbstractChainableSkinImpl.java 2008-04-25 16:53:51 UTC (rev 8199)
@@ -61,9 +61,57 @@
return skin;
}
+
+ protected Object localResolveSkinParameter(FacesContext context, String name) {
+ return super.resolveSkinParameter(context, name);
+ }
+
+ protected boolean localContainsProperty(FacesContext context, String name) {
+ return super.containsProperty(name);
+ }
- protected Object resolveSkinParameter(FacesContext context, String name, int[] singleInt) {
- Object object = super.resolveSkinParameter(context, name);
+ private static abstract class Operation {
+ public Object doChainedCall(FacesContext context, AbstractChainableSkinImpl impl, String name, int[] singleInt) {
+ return impl.executeOperation(context, this, name, singleInt);
+ }
+
+ public abstract Object doLocalCall(FacesContext context, AbstractChainableSkinImpl impl, String name);
+
+ public abstract Object doExternalCall(FacesContext context, Skin impl, String name);
+ }
+
+ private static final Operation RESOLVE = new Operation() {
+
+ public Object doExternalCall(FacesContext context, Skin impl, String name) {
+ //TODO add warning because substitution can work incorrect and cyclic references
+ //won't be caught
+ return impl.getParameter(context, name);
+ }
+
+ public Object doLocalCall(FacesContext context, AbstractChainableSkinImpl impl, String name) {
+ return impl.localResolveSkinParameter(context, name);
+ }
+
+ };
+
+ private static final Operation CONTAINS = new Operation() {
+
+ private Object wrapBoolean(boolean value) {
+ return value ? Boolean.TRUE : null;
+ }
+
+ public Object doExternalCall(FacesContext context, Skin impl, String name) {
+ return wrapBoolean(impl.containsProperty(name));
+ }
+
+ public Object doLocalCall(FacesContext context, AbstractChainableSkinImpl impl, String name) {
+ return wrapBoolean(impl.localContainsProperty(context, name));
+ }
+
+ };
+
+ protected Object executeOperation(FacesContext context, Operation operation, String name, int[] singleInt) {
+ Object object = operation.doLocalCall(context, this, name);
if (object == null) {
Skin baseSkin = getBaseSkin(context);
if (baseSkin != null) {
@@ -75,9 +123,9 @@
Messages.SKIN_CYCLIC_REFERENCE, name));
}
- object = skinImpl.resolveSkinParameter(context, name, singleInt);
+ object = operation.doChainedCall(context, skinImpl, name, singleInt);
} else {
- object = baseSkin.getParameter(context, name);
+ object = operation.doExternalCall(context, baseSkin, name);
}
}
}
@@ -85,38 +133,23 @@
return object;
}
+ protected Object resolveSkinParameter(FacesContext context, String name, int[] singleInt) {
+ return executeOperation(context, RESOLVE, name, singleInt);
+ }
+
protected boolean containsProperty(FacesContext context, String name, int[] singleInt) {
- boolean contains = super.containsProperty(name);
- if (!contains) {
- Skin baseSkin = getBaseSkin(context);
- if (baseSkin != null) {
- if (baseSkin instanceof AbstractChainableSkinImpl) {
- AbstractChainableSkinImpl skinImpl = (AbstractChainableSkinImpl) baseSkin;
-
- if (singleInt[0]++ > 1000) {
- throw new FacesException(Messages.getMessage(
- Messages.SKIN_CYCLIC_REFERENCE, name));
- }
-
- contains = skinImpl.containsProperty(context, name, singleInt);
- } else {
- contains = baseSkin.containsProperty(name);
- }
- }
- }
-
- return contains;
+ return Boolean.TRUE.equals(executeOperation(context, CONTAINS, name, singleInt));
}
protected Object resolveSkinParameter(FacesContext context, String name) {
int[] singleInt = new int[] {0};
- Object resolvedParameter = getValueReference(context, resolveSkinParameter(context, name, singleInt));
+ Object resolvedParameter = resolveSkinParameter(context, name, singleInt);
while (resolvedParameter instanceof String) {
String string = (String) resolvedParameter;
if (string.length() > 0 && string.charAt(0) == '&') {
singleInt[0]++;
- resolvedParameter = getValueReference(context, resolveSkinParameter(context, string.substring(1), singleInt));
+ resolvedParameter = resolveSkinParameter(context, string.substring(1), singleInt);
if (resolvedParameter == null) {
throw new FacesException(Messages.getMessage(
Messages.SKIN_ILLEGAL_REFERENCE, name));
Modified: trunk/framework/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java 2008-04-25 16:31:12 UTC (rev 8198)
+++ trunk/framework/impl/src/main/java/org/richfaces/skin/SkinFactoryImpl.java 2008-04-25 16:53:51 UTC (rev 8199)
@@ -33,13 +33,13 @@
import javax.el.ELContext;
import javax.el.ExpressionFactory;
+import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.FactoryFinder;
import javax.faces.application.Application;
import javax.faces.application.ApplicationFactory;
import javax.faces.context.FacesContext;
import javax.faces.el.ReferenceSyntaxException;
-import javax.faces.el.ValueBinding;
import org.ajax4jsf.Messages;
import org.ajax4jsf.resource.util.URLToStreamHelper;
@@ -94,9 +94,9 @@
private Properties defaultSkinProperties = null;
private String skinName = null;
- private ValueBinding skinBinding = null;
+ private ValueExpression skinBinding = null;
private String baseSkinName = null;
- private ValueBinding baseSkinBinding = null;
+ private ValueExpression baseSkinBinding = null;
private static final Log log = LogFactory.getLog(SkinFactoryImpl.class);
private static final String A4J_BASE_SKIN_PARAMETER = "org.ajax4jsf.BASE_SKIN";
@@ -198,7 +198,7 @@
*/
protected Object getSkinOrName(FacesContext context, boolean useBase) {
// Detect skin name
- ValueBinding binding;
+ ValueExpression binding;
String skin;
synchronized (this) {
@@ -232,8 +232,9 @@
}
if (ELUtils.isValueReference(currentSkinName)) {
// For EL expression as skin name
- binding = context.getApplication().createValueBinding(
- currentSkinName);
+ binding = context.getApplication().getExpressionFactory().
+ createValueExpression(context.getELContext(),
+ currentSkinName, Object.class);
} else {
skin = currentSkinName;
}
@@ -250,7 +251,7 @@
// }
}
if (binding != null) {
- return binding.getValue(context);
+ return binding.getValue(context.getELContext());
} else {
return skin;
}
16 years, 8 months
JBoss Rich Faces SVN: r8198 - in trunk/framework/impl/src/main/java/org/richfaces/renderkit/html: images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-04-25 12:31:12 -0400 (Fri, 25 Apr 2008)
New Revision: 8198
Modified:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java
trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/images/BaseControlBackgroundImage.java
Log:
http://jira.jboss.com/jira/browse/RF-3227
Modified: trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java 2008-04-25 16:03:44 UTC (rev 8197)
+++ trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java 2008-04-25 16:31:12 UTC (rev 8198)
@@ -150,7 +150,7 @@
BiColor firstLayer = type.getFirstLayerColors(biColor);
BiColor secondLayer = type.getSecondLayerColors(biColor);
- Dimension dim = getDimensions(resourceContext);
+ Dimension dim = getDimensions(null, dataToStore);
if (horizontal) {
//x -> y, y -> x
@@ -158,21 +158,28 @@
dim.setSize(dim.height, dim.width);
}
+ int localGradientHeight = this.gradientHeight;
+ if (localGradientHeight < 0) {
+ localGradientHeight = dim.height;
+ }
+
Rectangle2D rect = new Rectangle2D.Float(
0,
0,
dim.width,
dim.height);
- drawGradient(g2d, rect, firstLayer, gradientHeight);
+ drawGradient(g2d, rect, firstLayer, localGradientHeight);
+ int smallGradientHeight = localGradientHeight / 2;
+
rect = new Rectangle2D.Float(
0,
0,
dim.width,
- gradientHeight / 2);
+ smallGradientHeight);
- drawGradient(g2d, rect, secondLayer, gradientHeight / 2);
+ drawGradient(g2d, rect, secondLayer, smallGradientHeight);
}
}
}
Modified: trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/images/BaseControlBackgroundImage.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/images/BaseControlBackgroundImage.java 2008-04-25 16:03:44 UTC (rev 8197)
+++ trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/images/BaseControlBackgroundImage.java 2008-04-25 16:31:12 UTC (rev 8198)
@@ -43,7 +43,7 @@
private static final Dimension DIMENSION = new Dimension(1, 1);
public BaseControlBackgroundImage(String baseColor, String gradientColor, int width) {
- super(width, 1, baseColor, gradientColor);
+ super(width, -1, baseColor, gradientColor);
}
public Dimension getDimensions(FacesContext facesContext, Object data) {
@@ -89,7 +89,9 @@
@Override
protected void saveData(FacesContext context, org.richfaces.renderkit.html.BaseGradient.Data data, Object parameterData) {
super.saveData(context, data, parameterData);
- ((Data) data).setHeight(getHeight(context));
+ Data d = ((Data) data);
+ d.setGradientType(GradientType.PLAIN);
+ d.setHeight(getHeight(context));
}
protected void restoreData(org.richfaces.renderkit.html.BaseGradient.Data data, Zipper2 zipper2) {
16 years, 8 months
JBoss Rich Faces SVN: r8197 - Reports/3.2.1 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-04-25 12:03:44 -0400 (Fri, 25 Apr 2008)
New Revision: 8197
Added:
trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR1mvitenkov.xls
Modified:
trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR1tkuprevich.xls
Log:
Added: trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR1mvitenkov.xls
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR1mvitenkov.xls
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR1tkuprevich.xls
===================================================================
(Binary files differ)
16 years, 8 months
JBoss Rich Faces SVN: r8196 - trunk/ui/tree/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-04-25 12:02:43 -0400 (Fri, 25 Apr 2008)
New Revision: 8196
Modified:
trunk/ui/tree/src/main/config/component/treeNode.xml
Log:
http://jira.jboss.com/jira/browse/RF-2220
http://jira.jboss.com/jira/browse/RF-730
Corrected language and added default values
Modified: trunk/ui/tree/src/main/config/component/treeNode.xml
===================================================================
--- trunk/ui/tree/src/main/config/component/treeNode.xml 2008-04-25 16:02:31 UTC (rev 8195)
+++ trunk/ui/tree/src/main/config/component/treeNode.xml 2008-04-25 16:02:43 UTC (rev 8196)
@@ -53,43 +53,43 @@
<property>
<name>ajaxSubmitSelection</name>
<classname>java.lang.String</classname>
- <description>An algorithm of AJAX request submission. "inherit", "true", "false" values are possible</description>
+ <description>An algorithm of AJAX request submission. Possible values are "inherit", "true", "false". Default value is "inherit".</description>
<defaultvalue>"inherit"</defaultvalue>
</property>
<property>
<name>ondrop</name>
<classname>java.lang.String</classname>
- <description>It's an event that is called when something is dropped on a drop zone</description>
+ <description>It's an event that is called when something is dropped on a drop zone. Default value is "getDefaultOndrop()".</description>
<defaultvalue>getDefaultOndrop()</defaultvalue>
</property>
<property>
<name>ondropend</name>
<classname>java.lang.String</classname>
- <description>A JavaScript handler for event fired on a drop even the drop for a given type is not available</description>
+ <description>A JavaScript handler for event fired on a drop even the drop for a given type is not available. Default value is "getDefaultOndropend()".</description>
<defaultvalue>getDefaultOndropend()</defaultvalue>
</property>
<property>
<name>ondragstart</name>
<classname>java.lang.String</classname>
- <description>A JavaScript event handler called before drag object</description>
+ <description>A JavaScript event handler called before drag object. Default value is "getDefaultOndragstart()".</description>
<defaultvalue>getDefaultOndragstart()</defaultvalue>
</property>
<property>
<name>ondragend</name>
<classname>java.lang.String</classname>
- <description>A JavaScript event handler called after a drag operation</description>
+ <description>A JavaScript event handler called after a drag operation. Default value is "getDefaultOndragend()".</description>
<defaultvalue>getDefaultOndragend()</defaultvalue>
</property>
<property>
<name>ondragenter</name>
<classname>java.lang.String</classname>
- <description>A JavaScript event handler called on enter draggable object to zone</description>
+ <description>A JavaScript event handler called on enter draggable object to zone. Default value is "getDefaultOndragexit()".</description>
<defaultvalue>getDefaultOndragenter()</defaultvalue>
</property>
<property>
<name>ondragexit</name>
<classname>java.lang.String</classname>
- <description>A JavaScript event handler called after a drag object leaves zone</description>
+ <description>A JavaScript event handler called after a drag object leaves zone. Default value is "getDefaultOndragexit()".</description>
<defaultvalue>getDefaultOndragexit()</defaultvalue>
</property>
@@ -183,7 +183,7 @@
<name>dragValue</name>
<classname>java.lang.Object</classname>
<description>
- Data to be sent to the drop zone after a drop event
+ Data to be sent to the drop zone after a drop event. Default value is "getUITree().getDragValue()".
</description>
<defaultvalue>getUITree().getDragValue()</defaultvalue>
</property>
@@ -192,7 +192,7 @@
<name>dropValue</name>
<classname>java.lang.Object</classname>
<description>
- Data to be processed after a drop event
+ Data to be processed after a drop event. Default value is "getUITree().getDropValue()".
</description>
<defaultvalue>getUITree().getDropValue()</defaultvalue>
</property>
@@ -200,7 +200,7 @@
<property>
<name>timeout</name>
<classname>int</classname>
- <description>timeout in ms.</description>
+ <description>Gets timeout in ms. Default value is "getDefaultTimeout()". </description>
<defaultvalue>getDefaultTimeout()</defaultvalue>
</property>
<property>
@@ -209,12 +209,13 @@
<description>
Id['s] (in format of call UIComponent.findComponent()) of components,
rendered in case of AjaxRequest caused by this component.
- Can be single id, comma-separated list of Id's, or EL Expression with array or Collection
+ Can be single id, comma-separated list of Id's, or EL Expression with array or Collection. Default value is "getDefaultReRender()".
</description>
<defaultvalue>getDefaultReRender()</defaultvalue>
</property>
&html_events;
+
<listener>
<name>dropListener</name>
<listenerclass>
16 years, 8 months
JBoss Rich Faces SVN: r8195 - trunk/ui/inputnumber-spinner/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-04-25 12:02:31 -0400 (Fri, 25 Apr 2008)
New Revision: 8195
Modified:
trunk/ui/inputnumber-spinner/src/main/config/component/inputNumberSpinner.xml
Log:
http://jira.jboss.com/jira/browse/RF-2220
http://jira.jboss.com/jira/browse/RF-730
Corrected language and added default values
Modified: trunk/ui/inputnumber-spinner/src/main/config/component/inputNumberSpinner.xml
===================================================================
--- trunk/ui/inputnumber-spinner/src/main/config/component/inputNumberSpinner.xml 2008-04-25 16:02:20 UTC (rev 8194)
+++ trunk/ui/inputnumber-spinner/src/main/config/component/inputNumberSpinner.xml 2008-04-25 16:02:31 UTC (rev 8195)
@@ -59,39 +59,39 @@
<property>
<name>minValue</name>
<classname>java.lang.String</classname>
- <description>Minimum value</description>
+ <description>Minimum value. Default value is "0". </description>
<defaultvalue><![CDATA["0"]]></defaultvalue>
</property>
<property>
<name>maxValue</name>
<classname>java.lang.String</classname>
- <description>Maximum value</description>
+ <description>Maximum value. . Default value is "100". </description>
<defaultvalue><![CDATA["100"]]></defaultvalue>
</property>
<property>
<name>step</name>
<classname>java.lang.String</classname>
- <description>Parameter that determines the step between nearest values while using controls</description>
+ <description>Parameter that determines the step between nearest values while using controls. Default value is "1"</description>
<defaultvalue><![CDATA["1"]]></defaultvalue>
</property>
<property>
<name>cycled</name>
<classname>boolean</classname>
- <description>If "true" after the current value reaches the border value it is reversed to another border value
- after next increasing/decreasing. In other case possibilities of next increasing (or decreasing) will be locked
+ <description>If "true" after the current value reaches the border value it is reversed to another border value
+ after next increasing/decreasing. In other case possibilities of next increasing (or decreasing) will be locked. Default value is " true ".
</description>
<defaultvalue>true</defaultvalue>
</property>
<property>
<name>enableManualInput</name>
<classname>boolean</classname>
- <description>if "false" your's input to the text field using keyboard will be locked</description>
+ <description>if "false" your's input to the text field using keyboard will be locked. Default value is "true"</description>
<defaultvalue>true</defaultvalue>
</property>
<property>
<name>disabled</name>
<classname>boolean</classname>
- <description>Determines if the component disabled/enabled</description>
+ <description>Determines if the component disabled/enabled. Default value is "false".</description>
<defaultvalue>false</defaultvalue>
</property>
<property>
@@ -126,7 +126,7 @@
<property>
<name>inputSize</name>
<classname>int</classname>
- <description>Attribute specifies the initial length of input in characters. Default value is 10</description>
+ <description>Attribute specifies the initial length of input in characters. Default value is "10".</description>
<defaultvalue>10</defaultvalue>
</property>
<property>
@@ -185,72 +185,72 @@
&ui_input_attributes;
&html_events;
&ui_component_attributes;
- &html_style_attributes;
-
- <property>
- <name>oninputclick</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer button is clicked</description>
- </property>
- <property>
- <name>oninputdblclick</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer button is double-clicked</description>
- </property>
- <property>
- <name>oninputkeydown</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a key is pressed down</description>
- </property>
- <property>
- <name>oninputkeypress</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a key is pressed and released</description>
- </property>
- <property>
- <name>oninputkeyup</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a key is released</description>
- </property>
- <property>
- <name>oninputmousedown</name>
- <classname>java.lang.String</classname>
- <description>HTML: script expression; a pointer button is pressed down</description>
- </property>
- <property>
- <name>oninputmousemove</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved within</description>
- </property>
- <property>
- <name>oninputmouseout</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved away</description>
- </property>
- <property>
- <name>oninputmouseover</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved onto</description>
- </property>
- <property>
- <name>oninputmouseup</name>
- <classname>java.lang.String</classname>
- <description>HTML: script expression; a pointer button is released</description>
- </property>
-
- <property elonly="true" hidden="true" existintag="false" exist="false" >
- <name>onkeydown</name>
- <classname>java.lang.String</classname>
- </property>
- <property elonly="true" hidden="true" existintag="false" exist="false" >
- <name>onkeypress</name>
- <classname>java.lang.String</classname>
- </property>
- <property elonly="true" hidden="true" existintag="false" exist="false" >
- <name>onkeyup</name>
- <classname>java.lang.String</classname>
- </property>
+ &html_style_attributes;
+ <property>
+ <name>oninputclick</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer button is clicked</description>
+ </property>
+ <property>
+ <name>oninputdblclick</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer button is double-clicked</description>
+ </property>
+ <property>
+ <name>oninputkeydown</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a key is pressed down</description>
+ </property>
+ <property>
+ <name>oninputkeypress</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a key is pressed and released</description>
+ </property>
+ <property>
+ <name>oninputkeyup</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a key is released</description>
+ </property>
+ <property>
+ <name>oninputmousedown</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: script expression; a pointer button is pressed down</description>
+ </property>
+ <property>
+ <name>oninputmousemove</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer is moved within</description>
+ </property>
+ <property>
+ <name>oninputmouseout</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer is moved away</description>
+ </property>
+ <property>
+ <name>oninputmouseover</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer is moved onto</description>
+ </property>
+ <property>
+ <name>oninputmouseup</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: script expression; a pointer button is released</description>
+ </property>
+
+ <property elonly="true" hidden="true" existintag="false" exist="false" >
+ <name>onkeydown</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property elonly="true" hidden="true" existintag="false" exist="false" >
+ <name>onkeypress</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property elonly="true" hidden="true" existintag="false" exist="false" >
+ <name>onkeyup</name>
+ <classname>java.lang.String</classname>
+ </property>
+
<property hidden="true" >
<name>maxlength</name>
<classname>int</classname>
@@ -275,11 +275,11 @@
<property hidden="true">
<name>valid</name>
<classname>boolean</classname>
- </property>
- <property>
- <name>label</name>
- <classname>java.lang.String</classname>
- <description>A localized user presentable name for this component.</description>
</property>
+ <property>
+ <name>label</name>
+ <classname>java.lang.String</classname>
+ <description>A localized user presentable name for this component.</description>
+ </property>
</component>
</components>
16 years, 8 months
JBoss Rich Faces SVN: r8194 - trunk/ui/inputnumber-slider/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-04-25 12:02:20 -0400 (Fri, 25 Apr 2008)
New Revision: 8194
Modified:
trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
Log:
http://jira.jboss.com/jira/browse/RF-2220
http://jira.jboss.com/jira/browse/RF-730
Corrected language and added default values
Modified: trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
===================================================================
--- trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2008-04-25 16:02:11 UTC (rev 8193)
+++ trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2008-04-25 16:02:20 UTC (rev 8194)
@@ -52,25 +52,25 @@
<property>
<name> minValue </name>
<classname>java.lang.String</classname>
- <description> Attribute to set a "start" value </description>
+ <description> Attribute to set the "start" value. Default value is "0". </description>
<defaultvalue><![CDATA["0"]]></defaultvalue>
</property>
<property>
<name> maxValue </name>
<classname>java.lang.String</classname>
- <description>Attribute to set an "end" value </description>
+ <description>Attribute to set an "end" value. Default value is "100" </description>
<defaultvalue><![CDATA["100"]]></defaultvalue>
</property>
<property>
<name> step </name>
<classname>java.lang.String</classname>
- <description>Parameter that determines a step between the nearest values while using a handle</description>
+ <description>Parameter that determines a step between the nearest values while using a handle. Default value is "1".</description>
<defaultvalue><![CDATA["1"]]></defaultvalue>
</property>
<property>
<name> width </name>
<classname>java.lang.String</classname>
- <description> The width of a slider control</description>
+ <description> The width of a slider control. Default value is "200px"</description>
<defaultvalue><![CDATA["200px"]]></defaultvalue>
</property>
<property hidden="true">
@@ -81,28 +81,30 @@
<property>
<name> enableManualInput </name>
<classname>boolean</classname>
- <description>False value for this attribute makes a text field "read-only", so the value can be
- changed only from a handle</description>
+ <description>If set to "false" this attribute makes the text field "read-only", so the value can be
+ changed only from a handle. Default value is "true".</description>
<defaultvalue>true</defaultvalue>
</property>
<property>
<name> showInput </name>
<classname>boolean</classname>
- <description>False value for this attribute makes text a field invisible</description>
+ <description>False value for this attribute makes text a field invisible. Default value is "true".</description>
<defaultvalue>true</defaultvalue>
</property>
<property>
<name> showBoundaryValues </name>
<classname>boolean</classname>
- <description>If the min/max values are shown on the right/left borders of a control. Default=true
+ <description>If the min/max values are shown on the right/left borders of a control. . Default value is "true".
</description>
<defaultvalue>true</defaultvalue>
</property>
<property>
<name> showToolTip </name>
<classname>boolean</classname>
- <description>If the current value will be shown in the tooltip when a handle control in a
- "dragged" state.Default=true.
+ <description>
+
+ If "true"the current value is shown in the tooltip when a handle control is in a
+ "dragged" state. Default value is "true".
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -121,13 +123,13 @@
<property>
<name> inputSize </name>
<classname>int</classname>
- <description> Similar to the "Size" attribute of h:inputText</description>
+ <description> Similar to the "Size" attribute of h:inputText. Default value is "3". </description>
<defaultvalue><![CDATA[3]]></defaultvalue>
</property>
<property>
<name> disabled </name>
<classname>boolean</classname>
- <description> Makes a text field and controls non-active. Default is false.
+ <description> Makes a text field and controls non-active. Default value is "false".
</description>
<defaultvalue>false</defaultvalue>
</property>
@@ -239,72 +241,72 @@
&html_input_attributes;
&html_input_events;
&ui_input_attributes;
- &html_events;
-
- <property>
- <name>oninputclick</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer button is clicked</description>
- </property>
- <property>
- <name>oninputdblclick</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer button is double-clicked</description>
- </property>
- <property>
- <name>oninputkeydown</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a key is pressed down</description>
- </property>
- <property>
- <name>oninputkeypress</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a key is pressed and released</description>
- </property>
- <property>
- <name>oninputkeyup</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a key is released</description>
- </property>
- <property>
- <name>oninputmousedown</name>
- <classname>java.lang.String</classname>
- <description>HTML: script expression; a pointer button is pressed down</description>
- </property>
- <property>
- <name>oninputmousemove</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved within</description>
- </property>
- <property>
- <name>oninputmouseout</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved away</description>
- </property>
- <property>
- <name>oninputmouseover</name>
- <classname>java.lang.String</classname>
- <description>HTML: a script expression; a pointer is moved onto</description>
- </property>
- <property>
- <name>oninputmouseup</name>
- <classname>java.lang.String</classname>
- <description>HTML: script expression; a pointer button is released</description>
- </property>
-
- <property elonly="true" hidden="true" existintag="false" exist="false" >
- <name>onkeydown</name>
- <classname>java.lang.String</classname>
- </property>
- <property elonly="true" hidden="true" existintag="false" exist="false" >
- <name>onkeypress</name>
- <classname>java.lang.String</classname>
- </property>
- <property elonly="true" hidden="true" existintag="false" exist="false" >
- <name>onkeyup</name>
- <classname>java.lang.String</classname>
- </property>
+ &html_events;
+ <property>
+ <name>oninputclick</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer button is clicked</description>
+ </property>
+ <property>
+ <name>oninputdblclick</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer button is double-clicked</description>
+ </property>
+ <property>
+ <name>oninputkeydown</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a key is pressed down</description>
+ </property>
+ <property>
+ <name>oninputkeypress</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a key is pressed and released</description>
+ </property>
+ <property>
+ <name>oninputkeyup</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a key is released</description>
+ </property>
+ <property>
+ <name>oninputmousedown</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: script expression; a pointer button is pressed down</description>
+ </property>
+ <property>
+ <name>oninputmousemove</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer is moved within</description>
+ </property>
+ <property>
+ <name>oninputmouseout</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer is moved away</description>
+ </property>
+ <property>
+ <name>oninputmouseover</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: a script expression; a pointer is moved onto</description>
+ </property>
+ <property>
+ <name>oninputmouseup</name>
+ <classname>java.lang.String</classname>
+ <description>HTML: script expression; a pointer button is released</description>
+ </property>
+
+ <property elonly="true" hidden="true" existintag="false" exist="false" >
+ <name>onkeydown</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property elonly="true" hidden="true" existintag="false" exist="false" >
+ <name>onkeypress</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property elonly="true" hidden="true" existintag="false" exist="false" >
+ <name>onkeyup</name>
+ <classname>java.lang.String</classname>
+ </property>
+
<property hidden="true" >
<name>size</name>
<classname>int</classname>
@@ -325,11 +327,11 @@
<property hidden="true">
<name>valid</name>
<classname>boolean</classname>
- </property>
- <property>
- <name>label</name>
- <classname>java.lang.String</classname>
- <description>A localized user presentable name for this component.</description>
</property>
+ <property>
+ <name>label</name>
+ <classname>java.lang.String</classname>
+ <description>A localized user presentable name for this component.</description>
+ </property>
</component>
</components>
16 years, 8 months
JBoss Rich Faces SVN: r8193 - trunk/ui/datascroller/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-04-25 12:02:11 -0400 (Fri, 25 Apr 2008)
New Revision: 8193
Modified:
trunk/ui/datascroller/src/main/config/component/datascroller.xml
Log:
http://jira.jboss.com/jira/browse/RF-2220
http://jira.jboss.com/jira/browse/RF-730
Corrected language and added default values
Modified: trunk/ui/datascroller/src/main/config/component/datascroller.xml
===================================================================
--- trunk/ui/datascroller/src/main/config/component/datascroller.xml 2008-04-25 16:01:59 UTC (rev 8192)
+++ trunk/ui/datascroller/src/main/config/component/datascroller.xml 2008-04-25 16:02:11 UTC (rev 8193)
@@ -138,7 +138,7 @@
<name>maxPages</name>
<classname>int</classname>
<description>
- Maximum quantity of pages
+ Maximum quantity of pages. Default value is "10".
</description>
<defaultvalue>10</defaultvalue>
</property>
@@ -147,7 +147,7 @@
<name>renderIfSinglePage</name>
<classname>boolean</classname>
<description>
- If renderIfSinglePage=true then datascroller is displayed on condition that the data hold on one page
+ If renderIfSinglePage is "true" then datascroller is displayed on condition that the data hold on one page. Default value is "true".
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -163,7 +163,7 @@
<name>fastStep</name>
<classname>int</classname>
<description>
- The attribute indicates pages quantity to switch onto when fast scrolling is used
+ The attribute indicates pages quantity to switch onto when fast scrolling is used. Default value is "0".
</description>
<defaultvalue>0</defaultvalue>
</property>
@@ -184,7 +184,7 @@
<description>
Attribute allows to ignore an Ajax Response produced by a request if the newest 'similar' request is
in a queue already. ignoreDupResponses="true" does not cancel the request while it is processed on the server,
-but just allows to avoid unnecessary updates on the client side if the response isn't actual now
+but just allows to avoid unnecessary updates on the client side if the response isn't actual now. Default value is "true".
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -198,7 +198,7 @@
<property>
<name>ajaxSingle</name>
<classname>boolean</classname>
- <description>If "true", submits ONLY one field/link, instead of all form controls
+ <description>If "true", submits ONLY one field/link, instead of all form controls. Default value is "true".
</description>
<defaultvalue>true</defaultvalue>
</property>
@@ -206,7 +206,9 @@
<name>align</name>
<classname>java.lang.String</classname>
<description>
- left|center|right [CI] Deprecated. This attribute specifies the position of the table with respect to the document. Permitted values: * left: The table is to the left of the document. * center: The table is to the center of the document. * right: The table is to the right of the document
+ This attribute specifies the position of the table with relatively to the document.
+ Possible values are "left","center","right ". Default value is "center".
+
</description>
<defaultvalue>"center"</defaultvalue>
</property>
@@ -214,9 +216,9 @@
<name>boundaryControls</name>
<classname>java.lang.String</classname>
<description>
-Possible values are: "show" - default mode. Controls are visible always.
-"hide" - controls are hidden.
-"auto" - unnecessary controls are hidden
+ The attribute specifies the visibility of boundaryControls.
+ Possible values are: "show" (controls are always visible ). "hide" (controls are hidden.
+ "auto" (unnecessary controls are hidden). Default value is "show".
</description>
<defaultvalue><![CDATA["show"]]></defaultvalue>
</property>
@@ -224,9 +226,9 @@
<name>fastControls</name>
<classname>java.lang.String</classname>
<description>
-Possible values are: "show" - default mode. Controls are visible always.
-"hide" - controls are hidden.
-"auto" - unnecessary controls are hidden
+ The attribute specifies the visibility of fastControls.
+ Possible values are: "show" (controls are always visible ). "hide" (controls are hidden.
+ "auto" (unnecessary controls are hidden). Default value is "show".
</description>
<defaultvalue><![CDATA["show"]]></defaultvalue>
</property>
@@ -235,9 +237,9 @@
<name>stepControls</name>
<classname>java.lang.String</classname>
<description>
-Possible values are: "show" - default mode. Controls are visible always.
-"hide" - controls are hidden.
-"auto" - unnecessary controls are hidden
+ The attribute specifies the visibility of stepControls.
+ Possible values are: "show" (controls are always visible ). "hide" (controls are hidden.
+ "auto" (unnecessary controls are hidden). Default value is "show".
</description>
<defaultvalue><![CDATA["show"]]></defaultvalue>
@@ -250,7 +252,7 @@
<property>
<name>page</name>
<classname>int</classname>
- <description><![CDATA[If page >= 1 then it's a number of page to show]]></description>
+ <description><![CDATA[If page >= 1 then it's a page number to show]]></description>
</property>
<property>
@@ -267,14 +269,14 @@
<property>
<name>onpagechange</name>
- <classname>java.lang.String</classname>
+ <classname>java.lang.String</classname>
<description>JavaScript handler for call after the page is changed</description>
- </property>
-
- <property hidden="true" existintag="false" exist="false" >
- <name>firstRow</name>
- <classname>int</classname>
</property>
+
+ <property hidden="true" existintag="false" exist="false" >
+ <name>firstRow</name>
+ <classname>int</classname>
+ </property>
</component>
&listeners;
16 years, 8 months
JBoss Rich Faces SVN: r8192 - trunk/ui/dataTable/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-04-25 12:01:59 -0400 (Fri, 25 Apr 2008)
New Revision: 8192
Modified:
trunk/ui/dataTable/src/main/config/component/dataGrid.xml
Log:
http://jira.jboss.com/jira/browse/RF-2220
http://jira.jboss.com/jira/browse/RF-730
Corrected language and added default values
Modified: trunk/ui/dataTable/src/main/config/component/dataGrid.xml
===================================================================
--- trunk/ui/dataTable/src/main/config/component/dataGrid.xml 2008-04-25 16:01:52 UTC (rev 8191)
+++ trunk/ui/dataTable/src/main/config/component/dataGrid.xml 2008-04-25 16:01:59 UTC (rev 8192)
@@ -56,25 +56,26 @@
<property>
<name>columns</name>
<classname>int</classname>
- <description>Quantity of columns
+ <description>Number of columns
</description>
</property>
<property>
<name>border</name>
<classname>java.lang.String</classname>
- <description>This attributes specifies the width of the frame around a component</description>
+ <description>This attributes specifies the width of the frame around a component. Default value is "0".</description>
<defaultvalue>"0"</defaultvalue>
</property>
<property>
<name>cellpadding</name>
<classname>java.lang.String</classname>
- <description>This attribute specifies the amount of space between the border of the cell and its contents</description>
+ <description>This attribute specifies the amount of space between the border of the cell and its contents. Default value is "0".</description>
<defaultvalue>"0"</defaultvalue>
</property>
<property>
<name>cellspacing</name>
<classname>java.lang.String</classname>
- <description>This attribute specifies the amount of space between the border of the cell and its contents. The attribute also specifies the amount of space to leave between cells
+ <description>This attribute specifies the amount of space between the border of the cell and its contents.
+ The attribute also specifies the amount of space to leave between cells. Default value is "0".
</description>
<defaultvalue>"0"</defaultvalue>
</property>
16 years, 8 months