JBoss Rich Faces SVN: r6388 - trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-28 05:14:59 -0500 (Thu, 28 Feb 2008)
New Revision: 6388
Modified:
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
Log:
override setWidth method from combolist. fix IE6
Modified: trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-02-28 10:14:20 UTC (rev 6387)
+++ trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-02-28 10:14:59 UTC (rev 6388)
@@ -50,5 +50,14 @@
return;
}
return item;
+ },
+
+ setWidth : function(width) {
+ var positionElem = this.listParent.childNodes[1];
+ var correction = parseInt(width) - Richfaces.getBorderWidth(positionElem.firstChild, "lr") - Richfaces.getPaddingWidth(positionElem.firstChild, "lr") + "px";
+ this.list.style.width = correction;
+ if (this.iframe) {
+ this.iframe.style.width = correction;
+ }
}
});
16 years, 10 months
JBoss Rich Faces SVN: r6387 - trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-28 05:14:20 -0500 (Thu, 28 Feb 2008)
New Revision: 6387
Modified:
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
fix IE6 remove ',' in the end of file
Modified: trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-27 16:58:24 UTC (rev 6386)
+++ trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-28 10:14:20 UTC (rev 6387)
@@ -113,5 +113,5 @@
return this.inplaceInput.childNodes[6];
},
- setStrutWidth : function() {},
+ setStrutWidth : function() {}
});
16 years, 10 months
JBoss Rich Faces SVN: r6386 - in trunk/sandbox/samples/sortingFilteringDemo/src/main: webapp/WEB-INF and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2008-02-27 11:58:24 -0500 (Wed, 27 Feb 2008)
New Revision: 6386
Added:
trunk/sandbox/samples/sortingFilteringDemo/src/main/java/org/richfaces/sandbox/Comparators.java
Removed:
trunk/sandbox/samples/sortingFilteringDemo/src/main/java/org/richfaces/sandbox/Bean.java
Modified:
trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/pages/index.jsp
Log:
extended demo with custom comparators
Deleted: trunk/sandbox/samples/sortingFilteringDemo/src/main/java/org/richfaces/sandbox/Bean.java
===================================================================
--- trunk/sandbox/samples/sortingFilteringDemo/src/main/java/org/richfaces/sandbox/Bean.java 2008-02-27 16:42:30 UTC (rev 6385)
+++ trunk/sandbox/samples/sortingFilteringDemo/src/main/java/org/richfaces/sandbox/Bean.java 2008-02-27 16:58:24 UTC (rev 6386)
@@ -1,29 +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.sandbox;
-/**
- * @author $Autor$
- *
- */
-public class Bean {
-
-}
\ No newline at end of file
Copied: trunk/sandbox/samples/sortingFilteringDemo/src/main/java/org/richfaces/sandbox/Comparators.java (from rev 6366, trunk/sandbox/samples/sortingFilteringDemo/src/main/java/org/richfaces/sandbox/Bean.java)
===================================================================
--- trunk/sandbox/samples/sortingFilteringDemo/src/main/java/org/richfaces/sandbox/Comparators.java (rev 0)
+++ trunk/sandbox/samples/sortingFilteringDemo/src/main/java/org/richfaces/sandbox/Comparators.java 2008-02-27 16:58:24 UTC (rev 6386)
@@ -0,0 +1,61 @@
+/**
+ * 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.sandbox;
+
+import java.util.Comparator;
+
+import org.richfaces.demo.datagrid.model.Issue;
+import org.richfaces.demo.datagrid.model.JiraUser;
+
+/**
+ * @author $Autor$
+ *
+ */
+public class Comparators {
+
+ private final Comparator<JiraUser> jiraUserComparator = new Comparator<JiraUser> () {
+ public int compare(JiraUser o1, JiraUser o2) {
+ return o1.getName().compareTo(o2.getName());
+ }
+ };
+
+ private final Comparator<Issue> assigneeComparator = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return jiraUserComparator.compare(o1.getAssignee(), o2.getAssignee());
+ }
+ };
+
+ private final Comparator<Issue> reporterComparator = new Comparator<Issue>(){
+ public int compare(Issue o1, Issue o2) {
+ return jiraUserComparator.compare(o1.getReporter(), o2.getReporter());
+ }
+ };
+
+ public Comparator<Issue> getAssigneeComparator() {
+ return assigneeComparator;
+ }
+
+ public Comparator<Issue> getReporterComparator() {
+ return reporterComparator;
+ }
+
+}
\ No newline at end of file
Modified: trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/WEB-INF/faces-config.xml 2008-02-27 16:42:30 UTC (rev 6385)
+++ trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/WEB-INF/faces-config.xml 2008-02-27 16:58:24 UTC (rev 6386)
@@ -3,8 +3,13 @@
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<managed-bean>
- <managed-bean-name>bean</managed-bean-name>
- <managed-bean-class>org.richfaces.sandbox.Bean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
+ <managed-bean-name>comparators</managed-bean-name>
+ <managed-bean-class>org.richfaces.sandbox.Comparators</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>userComparator</managed-bean-name>
+ <managed-bean-class>org.richfaces.sandbox.UserComparator</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
</faces-config>
Modified: trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/WEB-INF/web.xml 2008-02-27 16:42:30 UTC (rev 6385)
+++ trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/WEB-INF/web.xml 2008-02-27 16:58:24 UTC (rev 6386)
@@ -11,8 +11,12 @@
<param-value>server</param-value>
</context-param>
<context-param>
+ <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
+ <param-value>NEKO</param-value>
+ </context-param>
+ <context-param>
<param-name>org.richfaces.demo.MAX_ISSUES</param-name>
- <param-value>1000</param-value>
+ <param-value>100</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
Modified: trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/pages/index.jsp 2008-02-27 16:42:30 UTC (rev 6385)
+++ trunk/sandbox/samples/sortingFilteringDemo/src/main/webapp/pages/index.jsp 2008-02-27 16:58:24 UTC (rev 6386)
@@ -9,26 +9,26 @@
<body>
<f:view>
<h:form>
- <dt:dataTable value="#{jiraService.channel.issues}" var="issue" rows="10">
- <dt:column filterBy="#{issue.key.value}">
+ <dt:dataTable value="#{jiraService.channel.issues}" var="issue">
+ <dt:column filterBy="#{issue.key.value}" filterValue="CH-" sortBy="#{issue.key}" width="60px">
<f:facet name="header">
<h:outputText value="Key"></h:outputText>
</f:facet>
<h:outputText value="#{issue.key.value}"></h:outputText>
</dt:column>
- <dt:column sortBy="#{issue.summary}">
+ <dt:column sortBy="#{issue.summary}" width="400px">
<f:facet name="header">
<h:outputText value="Summary"></h:outputText>
</f:facet>
<h:outputText value="#{issue.summary}"></h:outputText>
</dt:column>
- <dt:column>
+ <dt:column width="150px" filterBy="#{issue.assignee.name}" comparator="#{comparators.assigneeComparator}">
<f:facet name="header">
<h:outputText value="Assignee"></h:outputText>
</f:facet>
<h:outputText value="#{issue.assignee.name}"></h:outputText>
</dt:column>
- <dt:column filterBy="#{issue.reporter.name}">
+ <dt:column filterBy="#{issue.reporter.name}" width="150px" comparator="#{comparators.reporterComparator}">
<f:facet name="header">
<h:outputText value="Reporter"></h:outputText>
</f:facet>
16 years, 10 months
JBoss Rich Faces SVN: r6385 - in trunk/framework/test/src: test/java/org/richfaces/model and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-02-27 11:42:30 -0500 (Wed, 27 Feb 2008)
New Revision: 6385
Added:
trunk/framework/test/src/test/java/org/richfaces/model/ListSequenceDataModelTest.java
trunk/framework/test/src/test/java/org/richfaces/model/impl/expressive/MethodBindingExpressionTest.java
Modified:
trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockValueExpression.java
trunk/framework/test/src/test/java/org/richfaces/model/ModifiableModelTest.java
Log:
RF-1743
Modified: trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockValueExpression.java
===================================================================
--- trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockValueExpression.java 2008-02-27 16:42:13 UTC (rev 6384)
+++ trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockValueExpression.java 2008-02-27 16:42:30 UTC (rev 6385)
@@ -110,7 +110,6 @@
*/
@Override
public boolean isLiteralText() {
- // TODO Auto-generated method stub
- return true;
+ return false;
}
}
Added: trunk/framework/test/src/test/java/org/richfaces/model/ListSequenceDataModelTest.java
===================================================================
--- trunk/framework/test/src/test/java/org/richfaces/model/ListSequenceDataModelTest.java (rev 0)
+++ trunk/framework/test/src/test/java/org/richfaces/model/ListSequenceDataModelTest.java 2008-02-27 16:42:30 UTC (rev 6385)
@@ -0,0 +1,133 @@
+/**
+ *
+ */
+package org.richfaces.model;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.SequenceRange;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class ListSequenceDataModelTest extends TestCase {
+
+ private List<Integer> list;
+ private ListSequenceDataModel model;
+ private ListSequenceDataModel nullModel;
+
+ /**
+ * @param name
+ */
+ public ListSequenceDataModelTest(String name) {
+ super(name);
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ list = new ArrayList<Integer>();
+ for (int i = 0; i < 10; i++) {
+ list.add(new Integer(i));
+ }
+ model = new ListSequenceDataModel(list);
+ nullModel = new ListSequenceDataModel(null);
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ nullModel = null;
+ model = null;
+ list = null;
+ }
+
+ /**
+ * Test method for {@link org.richfaces.model.ListSequenceDataModel#isRowAvailable()}.
+ */
+ public final void testIsRowAvailable() {
+ assertFalse(nullModel.isRowAvailable());
+ assertTrue(model.isRowAvailable());
+ model.setRowIndex(-1);
+ assertFalse(model.isRowAvailable());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.model.ListSequenceDataModel#getRowCount()}.
+ */
+ public final void testGetRowCount() {
+ assertEquals(model.getRowCount(), list.size());
+ assertEquals(nullModel.getRowCount(), -1);
+ }
+
+ /**
+ * Test method for {@link org.richfaces.model.ListSequenceDataModel#setRowIndex()}
+ * and {@link org.richfaces.model.ListSequenceDataModel#getRowIndex()}.
+ */
+ public final void testRowIndex() {
+ int i = 3;
+ model.setRowIndex(i);
+ assertEquals(model.getRowIndex(), i);
+ }
+
+ /**
+ * Test method for {@link org.richfaces.model.ListSequenceDataModel#setRowKey(java.lang.Object)}
+ * and {@link org.richfaces.model.ListSequenceDataModel#getRowKey(java.lang.Object)}.
+ */
+ public final void testRowKey() {
+ Integer i = 3;
+ model.setRowKey(i);
+ assertEquals(model.getRowKey(), i);
+ model.setRowKey(null);
+ assertNull(model.getRowKey());
+ }
+
+ /**
+ * Test method for {@link org.richfaces.model.ListSequenceDataModel#walk(javax.faces.context.FacesContext, org.ajax4jsf.model.DataVisitor, org.ajax4jsf.model.Range, java.lang.Object)}
+ * and {@link org.richfaces.model.ListSequenceDataModel#getRowData()}.
+ */
+ public final void testWalk() {
+ DataVisitor visitor = new DataVisitor(){
+ public void process(FacesContext context, Object rowKey,
+ Object argument) throws IOException {
+ Object key = model.getRowKey();
+ model.setRowKey(rowKey);
+ assertEquals(model.getRowData(), list.get(((Integer)rowKey).intValue()));
+ model.setRowKey(key);
+ }
+ };
+ try {
+ SequenceRange range = new SequenceRange(0, -1);
+ model.walk(null, visitor, range, null);
+ range = new SequenceRange(0, 5);
+ model.walk(null, visitor, range, null);
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ /**
+ * Test method for {@link org.richfaces.model.ListSequenceDataModel#ListSequenceDataModel(java.util.List)},
+ * {@link org.richfaces.model.ListSequenceDataModel#setWrappedData(java.lang.Object)}
+ * and {@link org.richfaces.model.ListSequenceDataModel#getWrappedData()} .
+ */
+ public final void testListSequenceDataModel() {
+ assertNull(nullModel.getWrappedData());
+ ListSequenceDataModel dataModel = new ListSequenceDataModel(list);
+ assertSame(dataModel.getWrappedData(), model.getWrappedData());
+
+ }
+
+}
Modified: trunk/framework/test/src/test/java/org/richfaces/model/ModifiableModelTest.java
===================================================================
--- trunk/framework/test/src/test/java/org/richfaces/model/ModifiableModelTest.java 2008-02-27 16:42:13 UTC (rev 6384)
+++ trunk/framework/test/src/test/java/org/richfaces/model/ModifiableModelTest.java 2008-02-27 16:42:30 UTC (rev 6385)
@@ -7,22 +7,22 @@
import java.util.LinkedList;
import java.util.List;
+import javax.el.ValueExpression;
import javax.faces.context.FacesContext;
import org.ajax4jsf.model.DataVisitor;
import org.ajax4jsf.model.ExtendedDataModel;
+import org.ajax4jsf.model.SequenceRange;
import org.ajax4jsf.tests.MockDataModel;
import org.ajax4jsf.tests.MockDataModelListener;
-import org.ajax4jsf.tests.MockRange;
-import org.apache.commons.digester.SetRootRule;
+import org.ajax4jsf.tests.MockValueExpression;
+import org.apache.shale.test.base.AbstractJsfTestCase;
-import junit.framework.TestCase;
-
/**
* @author Konstantin Mishin
*
*/
-public class ModifiableModelTest extends TestCase {
+public class ModifiableModelTest extends AbstractJsfTestCase {
private ModifiableModel model;
private ExtendedDataModel originalModel;
@@ -40,10 +40,10 @@
/* (non-Javadoc)
* @see junit.framework.TestCase#setUp()
*/
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
+ var = "var";
originalModel = new MockDataModel();
- var = "var";
filterFields = new LinkedList<FilterField>();
sortFields = new LinkedList<SortField2>();
model = new ModifiableModel(originalModel, var, filterFields, sortFields);
@@ -52,7 +52,7 @@
/* (non-Javadoc)
* @see junit.framework.TestCase#tearDown()
*/
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
model = null;
var = null;
filterFields = null;
@@ -116,17 +116,25 @@
* Test method for {@link org.richfaces.model.ModifiableModel#walk(javax.faces.context.FacesContext, org.ajax4jsf.model.DataVisitor, org.ajax4jsf.model.Range, java.lang.Object)}.
*/
public final void testWalk() {
- MockRange range = new MockRange(5);
+ SequenceRange range = new SequenceRange(0, -1);
+ DataVisitor visitor = new DataVisitor(){
+ public void process(FacesContext context, Object rowKey,
+ Object argument) throws IOException {
+ Object key = model.getRowKey();
+ model.setRowKey(rowKey);
+ Object key2 = originalModel.getRowKey();
+ originalModel.setRowKey(rowKey);
+ assertEquals(model.getRowData(), originalModel.getRowData());
+ model.setRowKey(key);
+ originalModel.setRowKey(key2);
+ }
+ };
try {
- model.walk(null, new DataVisitor(){
- public void process(FacesContext context, Object rowKey,
- Object argument) throws IOException {
- Object key = model.getRowKey();
- model.setRowKey(rowKey);
- assertEquals(model.getRowData(), originalModel.getRowData());
- model.setRowKey(key);
- }
- }, range, null);
+ model.walk(null, visitor, range, null);
+ ValueExpression expression = new MockValueExpression(Boolean.TRUE);
+ filterFields.add(new FilterField(expression));
+ sortFields.add(new SortField2(expression, Ordering.ASCENDING));
+ model.walk(null, visitor, range, null);
} catch (IOException e) {
fail(e.getMessage());
}
Added: trunk/framework/test/src/test/java/org/richfaces/model/impl/expressive/MethodBindingExpressionTest.java
===================================================================
--- trunk/framework/test/src/test/java/org/richfaces/model/impl/expressive/MethodBindingExpressionTest.java (rev 0)
+++ trunk/framework/test/src/test/java/org/richfaces/model/impl/expressive/MethodBindingExpressionTest.java 2008-02-27 16:42:30 UTC (rev 6385)
@@ -0,0 +1,35 @@
+/**
+ *
+ */
+package org.richfaces.model.impl.expressive;
+
+import org.apache.shale.test.base.AbstractJsfTestCase;
+import org.apache.shale.test.el.MockMethodExpression;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class MethodBindingExpressionTest extends AbstractJsfTestCase {
+
+ /**
+ * @param name
+ */
+ public MethodBindingExpressionTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Test method for {@link org.richfaces.model.impl.expressive.MethodBindingExpression#MethodBindingExpression(javax.faces.context.FacesContext, javax.el.MethodExpression)}
+ * and {@link org.richfaces.model.impl.expressive.MethodBindingExpression#evaluate(java.lang.Object)}.
+ */
+ public final void testMethodBindingExpression() {
+ String expression = "expression";
+ MethodBindingExpression methodBindingExpression =
+ new MethodBindingExpression(facesContext,
+ new MockMethodExpression(expression, null, String.class));
+
+ assertEquals(methodBindingExpression.evaluate(null), expression);
+ }
+
+}
16 years, 10 months
JBoss Rich Faces SVN: r6384 - in management/design: userComponentCSS and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: admitriev
Date: 2008-02-27 11:42:13 -0500 (Wed, 27 Feb 2008)
New Revision: 6384
Added:
management/design/userComponentCSS/
management/design/userComponentCSS/markup/
management/design/userComponentCSS/markup/bullet.gif
management/design/userComponentCSS/markup/example.html
management/design/userComponentCSS/markup/header_bg.gif
management/design/userComponentCSS/markup/menu_list_bg.gif
management/design/userComponentCSS/markup/node.gif
management/design/userComponentCSS/markup/style.css
Log:
Added: management/design/userComponentCSS/markup/bullet.gif
===================================================================
(Binary files differ)
Property changes on: management/design/userComponentCSS/markup/bullet.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design/userComponentCSS/markup/example.html
===================================================================
--- management/design/userComponentCSS/markup/example.html (rev 0)
+++ management/design/userComponentCSS/markup/example.html 2008-02-27 16:42:13 UTC (rev 6384)
@@ -0,0 +1,118 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+ <title></title>
+ <link rel="STYLESHEET" type="text/css" href="style.css">
+</head>
+
+<body class="body font">
+
+<div class="menu_exterior">
+ <div class="menu_item">item 1</div>
+ <div class="menu_item">item 2</div>
+ <div class="menu_separator"></div>
+ <div class="menu_item">item 3</div>
+ <div class="menu_item_disabled">item 4</div>
+ <div class="menu_item_select menu_node">item 5</div>
+</div>
+<br><br>
+
+<table class="table_external" width="300">
+ <tr>
+ <td class="table_header">
+ Header
+ </td>
+ <td class="table_header">
+ Header
+ </td>
+ </tr>
+ <tr>
+ <td class="table_subheader">
+ Subheader
+ </td>
+ <td class="table_subheader">
+ Subheader
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Item
+ </td>
+ <td>
+ Item
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Item
+ </td>
+ <td>
+ Item
+ </td>
+ </tr>
+ <tr class="table_hover">
+ <td>
+ Item
+ </td>
+ <td>
+ Item
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Item
+ </td>
+ <td>
+ Item
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Item
+ </td>
+ <td>
+ Item
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Item
+ </td>
+ <td>
+ Item
+ </td>
+ </tr>
+ <tr>
+ <td class="table_subfooter">
+ Subfooter
+ </td>
+ <td class="table_subfooter">
+ Subfooter
+ </td>
+ </tr>
+ <tr>
+ <td class="table_footer">
+ Footer
+ </td>
+ <td class="table_footer">
+ Footer
+ </td>
+ </tr>
+</table>
+
+<br><br>
+<li class="li">List Item</li>
+<br><br>
+
+<div class="panel_exterior">
+ <div class="panel_header">
+ Panel header
+ </div>
+ <div class="panel_interior">
+ Panel content
+ </div>
+</div>
+
+</body>
+</html>
Added: management/design/userComponentCSS/markup/header_bg.gif
===================================================================
(Binary files differ)
Property changes on: management/design/userComponentCSS/markup/header_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design/userComponentCSS/markup/menu_list_bg.gif
===================================================================
(Binary files differ)
Property changes on: management/design/userComponentCSS/markup/menu_list_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design/userComponentCSS/markup/node.gif
===================================================================
(Binary files differ)
Property changes on: management/design/userComponentCSS/markup/node.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design/userComponentCSS/markup/style.css
===================================================================
--- management/design/userComponentCSS/markup/style.css (rev 0)
+++ management/design/userComponentCSS/markup/style.css 2008-02-27 16:42:13 UTC (rev 6384)
@@ -0,0 +1,165 @@
+/*common styles*/
+
+.body{
+ background-color : #FFFFFF;
+ margin : 10px;
+}
+*.font{
+ font-family : Arial;
+ font-size : 11px;
+}
+
+
+
+/*DD menu styles*/
+
+.menu_exterior {
+ border : 1px solid #bfbfc0; /*panelBorderColor*/
+ background : url(menu_list_bg.gif) repeat-y left /*from additionalBackgroundColor (left) to tabBackgroundColor (right)*/ #e7f2fb; /*additionalBackgroundColor*/;
+ padding : 1px;
+}
+.menu_item {
+ border : 0px;
+ padding : 2px 36px 2px 28px;
+ white-space : nowrap;
+ font-family : arial; /*generalFamilyFont*/
+ font-size : 11px; /*generalSizeFont*/
+}
+.menu_item_select {
+ background-color : #FAE6B0; /*tipBackgroundColor*/
+ border: 1px solid #C77A00; /*TipBorderColor*/
+ cursor : pointer;
+ padding : 1px 35px 1px 27px;
+ white-space : nowrap;
+ font-family : arial; /*generalFamilyFont*/
+ font-size : 11px; /*generalSizeFont*/
+}
+.menu_item_disabled {
+ border : 0px;
+ padding : 2px 36px 2px 28px;
+ white-space : nowrap;
+ font-family : arial; /*generalFamilyFont*/
+ font-size : 11px; /*generalSizeFont*/
+ color : #839eca; /*tabDisabledTextColor*/
+}
+
+.menu_item a, .menu_item_select{
+ color : #000000; /*generalTextColor*/
+ text-decoration : none;
+}
+
+.menu_separator {
+ font-size : 0px;
+ border-top: 1px solid #bfbfc0; /*panelBorderColor*/
+ margin : 2px 0px 2px 24px;
+}
+
+.menu_node {
+ background-image : url(node.gif); /*generalTextColor*/
+ background-repeat: no-repeat;
+ background-position: center right;
+}
+
+
+/*table & greed styles*/
+
+.table_external{
+ border-top : 1px solid #c0c0c0 /*tableBorderColor*/;
+ border-left: 1px solid #c0c0c0 /*tableBorderColor*/;
+ border-bottom : 0px;
+ border-right : 0px;
+ background-color : #FFFFFF /*tableBackgroundColor*/;
+ border-collapse : collapse;
+}
+.table_external td{
+ border-top : 0px;
+ border-left: 0px;
+ border-bottom : 1px solid #c0c0c0 /*tableBorderColor*/;
+ border-right : 1px solid #c0c0c0 /*tableBorderColor*/;
+ font-family : Arial;
+ font-size : 11px;
+
+}
+.table_header{
+ border-top : 1px solid #4A75B5; /*headerBackgroundColor*/
+ border-left: 1px solid #4A75B5; /*headerBackgroundColor*/
+ background-color : #4A75B5 /*headerBackgroundColor*/;
+ background-image : url(header_bg.gif); /*from headerGradientColor to headerBackgroundColor*/
+ background-repeat: repeat-x;
+ background-position: top;
+ color : #FFFFFF /*headerTextColor*/;
+ font-family : Arial;
+ font-size : 11px;
+ padding : 1px 1px 2px 5px;
+}
+.table_subheader{
+ background-color : #C6D6EA /*trimColor*/;
+}
+.table_footer{
+ background-color : #cccccc /*tableFooterBackgroundColor*/;
+}
+.table_subfooter{
+ background-color : #f1f1f1 /*tableSubfooterBackgroundColor*/;
+}
+.table_hover{
+ background-color : #FAE6B0; /*tipBackgroundColor*/
+}
+
+
+/*list styles*/
+
+.li{list-style-image : url(bullet.gif); /*background - headerBackgroundColor, glare - headerGradientColor*/}
+
+
+
+/*panel styles*/
+
+.panel_exterior{
+ border : 1px solid #C0C0C0; /*panelBorderColor*/
+ background-color : #F3F2F2; /*generalBackgroundColor*/
+}
+
+.panel_header{
+ border : 1px solid #4A75B5; /*headerBackgroundColor*/
+ background-color : #4A75B5; /*headerBackgroundColor*/
+ font-size : 11px; /*headerSizeFont*/
+ color : #ffffff; /*headTextColor*/
+ font-family : Arial; /*headerFamilyFont*/
+ padding : 1px 1px 1px 5px;
+ background-image : url(header_bg.gif); /*from headerGradientColor to headerBackgroundColor*/
+ background-position : top left;
+ background-repeat : repeat-x;
+ margin : 1px;
+
+}
+
+.panel_interior{
+ font-size : 11px; /*preferableDataSizeFont*/
+ color : #000000; /*preferableDataSizeFont*/
+ font-family : arial; /*preferableDataFamilyFont*/
+ padding : 10px; /*preferablePanelBodyPadding*/
+ text-align : left;
+ vertical-align : top;
+}
+
+.panel_header_button{
+ padding : 1px;
+ font-size : 11px; /*headerSizeFont*/
+ color : #ffffff; /*headTextColor*/
+}
+.panel_header_button_over{
+ padding : 0px;
+ border : 1px outset #C0C0C0; /*panelBorderColor*/
+ background-color : #4A75B5; /*headerBackgroundColor*/
+ font-size : 11px; /*headerSizeFont*/
+ color : #ffffff; /*headTextColor*/
+}
+.panel_header_button_press{
+ padding : 0px;
+ border : 1px inset #C0C0C0; /*panelBorderColor*/
+ background-color : #4A75B5; /*headerBackgroundColor*/
+ font-size : 11px; /*headerSizeFont*/
+ color : #ffffff; /*headTextColor*/
+}
+
+
16 years, 10 months
JBoss Rich Faces SVN: r6383 - trunk/sandbox/samples/inplaceInput-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-27 11:27:03 -0500 (Wed, 27 Feb 2008)
New Revision: 6383
Modified:
trunk/sandbox/samples/inplaceInput-sample/src/main/webapp/pages/index.jsp
Log:
Modified: trunk/sandbox/samples/inplaceInput-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/inplaceInput-sample/src/main/webapp/pages/index.jsp 2008-02-27 16:26:10 UTC (rev 6382)
+++ trunk/sandbox/samples/inplaceInput-sample/src/main/webapp/pages/index.jsp 2008-02-27 16:27:03 UTC (rev 6383)
@@ -79,8 +79,8 @@
inputWidth="#{bean.width}"
minInputWidth="#{bean.minInputWidth}"
maxInputWidth="#{bean.maxInputWidth}"
- controlsPosition="#{bean.controlsPosition}"
- controlsHorizontalAlign="#{bean.controlsHorizontalAlign}"
+ controlsVerticalPosition="#{bean.controlsPosition}"
+ controlsHorizontalPosition="#{bean.controlsHorizontalAlign}"
editEvent="#{bean.editEvent}"
oneditactivation="#{bean.oneditactivation}"
onviewactivation="#{bean.onviewactivation}"
16 years, 10 months
JBoss Rich Faces SVN: r6382 - in trunk/sandbox/ui/inplaceInput/src/main: java/org/richfaces/component and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-27 11:26:10 -0500 (Wed, 27 Feb 2008)
New Revision: 6382
Modified:
trunk/sandbox/ui/inplaceInput/src/main/config/component/inplaceinput.xml
trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/component/UIInplaceInput.java
trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss
trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
css fix
Modified: trunk/sandbox/ui/inplaceInput/src/main/config/component/inplaceinput.xml
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/config/component/inplaceinput.xml 2008-02-27 16:23:24 UTC (rev 6381)
+++ trunk/sandbox/ui/inplaceInput/src/main/config/component/inplaceinput.xml 2008-02-27 16:26:10 UTC (rev 6382)
@@ -83,14 +83,14 @@
<defaultvalue><![CDATA["click"]]></defaultvalue>
</property>
<property>
- <name>controlsPosition</name>
+ <name>controlsVerticalPosition</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA["center"]]></defaultvalue>
+ <defaultvalue><![CDATA["bottom"]]></defaultvalue>
</property>
<property>
- <name>controlsHorizontalAlign</name>
+ <name>controlsHorizontalPosition</name>
<classname>java.lang.String</classname>
<description></description>
<defaultvalue><![CDATA["right"]]></defaultvalue>
Modified: trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/component/UIInplaceInput.java
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/component/UIInplaceInput.java 2008-02-27 16:23:24 UTC (rev 6381)
+++ trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/component/UIInplaceInput.java 2008-02-27 16:26:10 UTC (rev 6382)
@@ -23,7 +23,7 @@
public abstract String getDefaultLabel();
public abstract void setDefaultLabel(String label);
-
+
}
\ No newline at end of file
Modified: trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-02-27 16:23:24 UTC (rev 6381)
+++ trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-02-27 16:26:10 UTC (rev 6382)
@@ -50,7 +50,7 @@
private static final String INPLACE_CSS_EDITABLE = "edit";
- private static final String INPLACE_CSS_CHANGE = "change";
+ private static final String INPLACE_CSS_CHANGE = "changed";
private static final String INPLACE_CSS_HOVER = "hover";
@@ -120,11 +120,11 @@
options.addOption("applyFromControlsOnly");
options.addOption("editEvent");
options.addOption("selectOnEdit");
- options.addOption("verticalPosition");
- options.addOption("horizontalPosition");
+ options.addOption("verticalPosition", component.getAttributes().get("controlsVerticalPosition"));
+ options.addOption("horizontalPosition", component.getAttributes().get("controlsHorizontalPosition"));
options.addOption("inputWidth");
- options.addOption("inputMinWidth");
- options.addOption("inputMaxWidth");
+ options.addOption("minInputWidth");
+ options.addOption("maxInputWidth");
attributes.append(options.toScript());
return attributes.toString();
Modified: trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss 2008-02-27 16:23:24 UTC (rev 6381)
+++ trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/css/inplaceinput.xcss 2008-02-27 16:26:10 UTC (rev 6382)
@@ -9,7 +9,7 @@
.rich-inplace {
}
- .rich-inplace-change {
+ .rich-inplace-changed {
background-position:left top;
background-repeat:no-repeat;
}
@@ -36,7 +36,7 @@
color: blue;
}
- .rich-inplace-input-change-hover {
+ .rich-inplace-input-changed-hover {
border: thin solid blue;
}
@@ -45,7 +45,7 @@
position: absolute;
}
- .rich-inplace-button {
+ .rich-inplace-controls {
background-position: top;
background-repeat: repeat-x;
border-width : 1px;
@@ -54,7 +54,7 @@
margin : 0px;
}
- .rich-inplace-button-press {
+ .rich-inplace-controls-press {
background-position: top;
background-repeat: repeat-x;
border-width: 1px;
@@ -63,7 +63,7 @@
margin : 0px;
}
- .rich-inplace-input-button-set {
+ .rich-inplace-input-controls-set {
white-space : nowrap;
}
@@ -107,7 +107,7 @@
</u:style>
</u:selector>
- <u:selector name=".rich-inplace-button">
+ <u:selector name=".rich-inplace-control">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.SpinnerButtonGradient"/>
</u:style>
@@ -115,7 +115,7 @@
<u:style name="border-color" skin="panelBorderColor"/>
</u:selector>
- <u:selector name=".rich-inplace-button-press">
+ <u:selector name=".rich-inplace-control-press">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.images.ComboBoxButtonPressGradient"/>
</u:style>
Modified: trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-02-27 16:23:24 UTC (rev 6381)
+++ trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-02-27 16:26:10 UTC (rev 6382)
@@ -86,7 +86,7 @@
/>
<input id='#{clientId}value' name='#{clientId}value' type='hidden' value='#{fieldValue}'/>
- <div id="#{clientId}bar" class="rich-inplace-input-button-set" style="display:none;">
+ <div id="#{clientId}bar" class="rich-inplace-input-controls-set" style="display:none;">
<jsp:scriptlet>
<![CDATA[
if (isControlsFacetExists(context, component)) {
@@ -118,19 +118,19 @@
</div>
<div id="#{clientId}buttons" style="position:relative;">
- <input id='#{clientId}ok' class='rich-inplace-button #{controlClass}'
+ <input id='#{clientId}ok' class='rich-inplace-control #{controlClass}'
type='image'
- onmouseup="this.className='rich-inplace-button #{controlClass}'"
- onmouseout="this.className='rich-inplace-button #{controlClass}'"
- onmousedown="this.className='rich-inplace-button-press #{controlPressedClass}'"
- onmouseover="this.className='rich-inplace-button #{controlHoveredClass}'"
+ onmouseup="this.className='rich-inplace-control #{controlClass}'"
+ onmouseout="this.className='rich-inplace-control #{controlClass}'"
+ onmousedown="this.className='rich-inplace-control-press #{controlPressedClass}'"
+ onmouseover="this.className='rich-inplace-control #{controlHoveredClass}'"
src='#{saveIcon}'/>
- <input id='#{clientId}cancel' class='rich-inplace-button #{controlClass}'
+ <input id='#{clientId}cancel' class='rich-inplace-control #{controlClass}'
type='image'
- onmouseup="this.className='rich-inplace-button #{controlClass}'"
- onmouseout="this.className='rich-inplace-button #{controlClass}'"
- onmousedown="this.className='rich-inplace-button-press #{controlPressedClass}'"
- onmouseover="this.className='rich-inplace-button #{controlHoveredClass}'"
+ onmouseup="this.className='rich-inplace-control #{controlClass}'"
+ onmouseout="this.className='rich-inplace-control #{controlClass}'"
+ onmousedown="this.className='rich-inplace-control-press #{controlPressedClass}'"
+ onmouseover="this.className='rich-inplace-control #{controlHoveredClass}'"
src='#{cancelIcon}'/>
</div>
<jsp:scriptlet>
16 years, 10 months
JBoss Rich Faces SVN: r6381 - in trunk/framework/impl/src/main/java/org/richfaces/model: impl/expressive and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-02-27 11:23:24 -0500 (Wed, 27 Feb 2008)
New Revision: 6381
Modified:
trunk/framework/impl/src/main/java/org/richfaces/model/ListSequenceDataModel.java
trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/MethodBindingExpression.java
Log:
RF-1741
Modified: trunk/framework/impl/src/main/java/org/richfaces/model/ListSequenceDataModel.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/model/ListSequenceDataModel.java 2008-02-27 16:20:13 UTC (rev 6380)
+++ trunk/framework/impl/src/main/java/org/richfaces/model/ListSequenceDataModel.java 2008-02-27 16:23:24 UTC (rev 6381)
@@ -23,7 +23,7 @@
private int index;
public ListSequenceDataModel(List<?> list) {
- this.list = list;
+ setWrappedData(list);
}
/* (non-Javadoc)
Modified: trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/MethodBindingExpression.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/MethodBindingExpression.java 2008-02-27 16:20:13 UTC (rev 6380)
+++ trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/MethodBindingExpression.java 2008-02-27 16:23:24 UTC (rev 6381)
@@ -9,12 +9,12 @@
* @author Konstantin Mishin
*
*/
-final public class MethodBindingExpression extends Expression {
+public class MethodBindingExpression extends Expression {
private ELContext context;
private MethodExpression methodExpression;
- MethodBindingExpression(FacesContext faces, MethodExpression methodExpression) {
+ public MethodBindingExpression(FacesContext faces, MethodExpression methodExpression) {
super(methodExpression.getExpressionString());
this.context = faces.getELContext();
this.methodExpression = methodExpression;
16 years, 10 months
JBoss Rich Faces SVN: r6380 - in trunk/sandbox/samples/fileUploadDemo: src/main/webapp/WEB-INF and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-27 11:20:13 -0500 (Wed, 27 Feb 2008)
New Revision: 6380
Modified:
trunk/sandbox/samples/fileUploadDemo/pom.xml
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
Log:
add skinning form
Modified: trunk/sandbox/samples/fileUploadDemo/pom.xml
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/pom.xml 2008-02-27 16:18:42 UTC (rev 6379)
+++ trunk/sandbox/samples/fileUploadDemo/pom.xml 2008-02-27 16:20:13 UTC (rev 6380)
@@ -22,10 +22,15 @@
<version>3.2.0-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>progressBar</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- </dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>progressBar</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.samples</groupId>
+ <artifactId>skins</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<build>
<finalName>fileUploadDemo</finalName>
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/faces-config.xml 2008-02-27 16:18:42 UTC (rev 6379)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/faces-config.xml 2008-02-27 16:20:13 UTC (rev 6380)
@@ -7,4 +7,9 @@
<managed-bean-class>org.richfaces.Bean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>skinBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
</faces-config>
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml 2008-02-27 16:18:42 UTC (rev 6379)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml 2008-02-27 16:20:13 UTC (rev 6380)
@@ -26,6 +26,13 @@
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
+
+
+ <filter>
+ <display-name>Sleep Filter</display-name>
+ <filter-name>sleepFilter</filter-name>
+ <filter-class>org.richfaces.SleepDemoFilter</filter-class>
+ </filter>
<filter>
<display-name>FileUpload Filter</display-name>
@@ -41,13 +48,7 @@
</init-param>
</filter>
-
- <filter>
- <display-name>Sleep Filter</display-name>
- <filter-name>sleepFilter</filter-name>
- <filter-class>org.richfaces.SleepDemoFilter</filter-class>
- </filter>
-
+
<filter-mapping>
<filter-name>sleepFilter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-27 16:18:42 UTC (rev 6379)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-27 16:20:13 UTC (rev 6380)
@@ -3,7 +3,7 @@
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/ui/fileUpload"
prefix="fu"%>
-<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/ui/progressBar" prefix="progressBar" %>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/progressBar" prefix="progressBar" %>
<html>
<head>
<title></title>
@@ -19,6 +19,11 @@
</head>
<body>
<f:view>
+
+<h:form>
+ <h:selectOneRadio binding="#{skinBean.component}" />
+ <h:commandLink action="#{skinBean.change}" value="set skin" />
+ </h:form>
<h:form>
<table cellpadding="0" cellspacing="0" style="width: 500px">
@@ -41,12 +46,6 @@
fileUploadListener="#{bean.listener}"
listWidth="#{bean.width}px"
listHeight="#{bean.height}px"
- uploadListClass="list"
- uploadListClassDisabled="list_disabled"
- fileEntryClass="entry"
- fileEntryClassDisabled="entry_disabled"
- fileEntryControlClass="entry_control"
- fileEntryControlClassDisabled="entry_control_disabled"
maxFilesQuantity="#{bean.maxFiles}"
acceptedTypes="#{bean.fileTypes}">
<f:facet name="progress">
16 years, 10 months
JBoss Rich Faces SVN: r6379 - trunk/ui/dataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-02-27 11:18:42 -0500 (Wed, 27 Feb 2008)
New Revision: 6379
Modified:
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
Log:
Inputs for filter value. Some optimization.
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-02-27 16:13:27 UTC (rev 6378)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2008-02-27 16:18:42 UTC (rev 6379)
@@ -55,6 +55,8 @@
private static final String FILTER_INPUT_FACET_NAME = "filterValueInput";
+ private static final String SPACER_PATH = "/org/richfaces/renderkit/html/images/spacer.gif";
+
/**
* Encode all table structure - colgroups definitions, caption, header,
* footer
@@ -111,7 +113,7 @@
headerClass, "th");
}
- if (headers.hasNext()&&findFacet(table,"header")) {
+ if (headers.hasNext()) {
writer.startElement("tr", table);
encodeStyleClass(writer, null,
"dr-table-subheader rich-table-subheader", null,
@@ -126,20 +128,8 @@
}
}
- public boolean findFacet(UIDataTable table, String facetName)
- {
- Iterator iter = columnFacets(table,facetName);
- boolean find = false;
- while(iter.hasNext()){
- UIComponent comp = (UIComponent) iter.next();
- if(comp.getFacet(facetName)!=null)
- {
- find = true;
- break;
- }
-
- }
- return find;
+ public boolean findFacet(UIDataTable table, String facetName) {
+ return columnFacets(table,facetName).hasNext();
}
protected void encodeHeaderFacets(FacesContext context,
@@ -147,7 +137,7 @@
String headerClass, String facetName, String element, int colCount)
throws IOException {
int t_colCount = 0;
- String spacerUrl = getResource("/org/richfaces/renderkit/html/images/spacer.gif").getUri(context, null);
+ String spacerUrl = getResource(SPACER_PATH).getUri(context, null);
while (headers.hasNext()) {
UIComponent column = (UIComponent) headers.next();
if((Integer)column.getAttributes().get("colspan")!=null){
@@ -167,8 +157,13 @@
columnHeaderClass);
writer.writeAttribute("scope", "col", null);
getUtils().encodeAttribute(context, column, "colspan");
-
- if (column instanceof org.richfaces.component.UIColumn) {
+
+ boolean richHeader = column instanceof org.richfaces.component.UIColumn
+ && "header".equals(facetName);
+ boolean sortableColumn = column.getValueExpression("comparator") != null
+ || column.getValueExpression("sortBy") != null;
+
+ if (richHeader) {
org.richfaces.component.UIColumn col =
(org.richfaces.component.UIColumn) column;
String clientId = col.getClientId(context) + facetName;
@@ -176,24 +171,9 @@
writer.startElement(HTML.DIV_ELEM, column);
- if (column.getValueExpression("comparator") != null
- || column.getValueExpression("sortBy") != null) {
- StringBuffer buffer;
+ if (sortableColumn) {
if (col.isSelfSorted()) {
- UIComponent table = column.getParent();
- String id = table.getClientId(context);
- JSFunction ajaxFunction = AjaxRendererUtils
- .buildAjaxFunction(table, context);
- Map eventOptions = AjaxRendererUtils.buildEventOptions(
- context, table);
- Map parameters = (Map) eventOptions.get("parameters");
- parameters.put(id, SORT_FILTER_PARAMETER);
- parameters.put(SORT_FILTER_PARAMETER, column
- .getClientId(context));
- ajaxFunction.addParameter(eventOptions);
- buffer = new StringBuffer();
- ajaxFunction.appendScript(buffer);
- writer.writeAttribute(HTML.onclick_ATTRIBUTE, buffer
+ writer.writeAttribute(HTML.onclick_ATTRIBUTE, buildAjaxFunction(context, column, true)
.toString(), null);
writer.writeAttribute(HTML.class_ATTRIBUTE, "dr-table-cursor-pointer", null);
}
@@ -212,11 +192,10 @@
if (facet != null) {
renderChild(context, facet);
}
- if (column instanceof org.richfaces.component.UIColumn) {
- if (column.getValueExpression("comparator") != null
- || column.getValueExpression("sortBy") != null) {
- org.richfaces.component.UIColumn col =
- (org.richfaces.component.UIColumn) column;
+ if (richHeader) {
+ org.richfaces.component.UIColumn col =
+ (org.richfaces.component.UIColumn) column;
+ if (sortableColumn) {
if (Ordering.ASCENDING.equals(col.getSortOrder()) ||
Ordering.DESCENDING.equals(col.getSortOrder())) {
writer.startElement(HTML.IMG_ELEMENT, column);
@@ -229,21 +208,12 @@
writer.endElement(HTML.DIV_ELEM);
- if (((org.richfaces.component.UIColumn)column).getFilterMethod() == null
- && column.getValueExpression("filterExpression") == null
- && column.getValueExpression("filterBy") != null) {
- UIComponent table = column.getParent();
- String id = table.getClientId(context);
- JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(table, context);
- Map eventOptions = AjaxRendererUtils.buildEventOptions(context, table);
- Map parameters = (Map) eventOptions.get("parameters");
- parameters.put(id, SORT_FILTER_PARAMETER);
- ajaxFunction.addParameter(eventOptions);
- StringBuffer buffer = new StringBuffer();
- ajaxFunction.appendScript(buffer);
+ if (col.getFilterMethod() == null
+ && col.getValueExpression("filterExpression") == null
+ && col.getValueExpression("filterBy") != null) {
writer.startElement(HTML.DIV_ELEM, column);
- addInplaceInput(context, column, buffer);
+ addInplaceInput(context, column, buildAjaxFunction(context, column, false));
writer.endElement(HTML.DIV_ELEM);
}
}
@@ -565,10 +535,9 @@
filterValueInput.setImmediate(true);
column.getFacets().put(FILTER_INPUT_FACET_NAME, filterValueInput);
}
- String event = inplaceInput ? "onviewactivated" : "onchange";
String onkeydownEvent = inplaceInput ? "oninputkeydown" : "onkeydown";
- filterValueInput.getAttributes().put(event, buffer.toString());
+ filterValueInput.getAttributes().put("onchange", buffer.toString());
filterValueInput.getAttributes().put(onkeydownEvent, "RichFaces.blurFilterInput(event);");
filterValueInput.setValue(column.getAttributes().get("filterValue"));
@@ -576,4 +545,21 @@
renderChild(context, filterValueInput);
getUtils().encodeEndFormIfNessesary(context, column);
}
+
+ private StringBuffer buildAjaxFunction(FacesContext context, UIComponent column, boolean sortable) {
+ UIComponent table = column.getParent();
+ String id = table.getClientId(context);
+ JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(table, context);
+ Map eventOptions = AjaxRendererUtils.buildEventOptions(context, table);
+ Map parameters = (Map) eventOptions.get("parameters");
+ parameters.put(id, SORT_FILTER_PARAMETER);
+ if (sortable) {
+ parameters.put(SORT_FILTER_PARAMETER, column.getClientId(context));
+ }
+ ajaxFunction.addParameter(eventOptions);
+ StringBuffer buffer = new StringBuffer();
+ ajaxFunction.appendScript(buffer);
+
+ return buffer;
+ }
}
\ No newline at end of file
16 years, 10 months