JBoss Rich Faces SVN: r8506 - in trunk: framework/api/src/main/java/org/richfaces/model and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-05-08 12:37:18 -0400 (Thu, 08 May 2008)
New Revision: 8506
Modified:
trunk/framework/api/src/main/java/org/richfaces/event/sort/SortEvent.java
trunk/framework/api/src/main/java/org/richfaces/model/SortField.java
trunk/framework/test/src/test/java/org/richfaces/model/impl/expressive/ObjectWrapperFactoryTest.java
trunk/framework/test/src/test/java/org/richfaces/model/impl/expressive/WrappedBeanComparatorTest.java
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/event/sort/MultiColumnSortListener.java
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/event/sort/SingleColumnSortListener.java
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-cell.jspx
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/AbstractScrollableDataTableTestCase.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/MultiColumnSortListenerTest.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/SingleColumnSortListenerTest.java
trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/internal/ComponentSortableDataModelTest.java
Log:
RF-2854
Modified: trunk/framework/api/src/main/java/org/richfaces/event/sort/SortEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/sort/SortEvent.java 2008-05-08 16:10:34 UTC (rev 8505)
+++ trunk/framework/api/src/main/java/org/richfaces/event/sort/SortEvent.java 2008-05-08 16:37:18 UTC (rev 8506)
@@ -24,11 +24,11 @@
private static final long serialVersionUID = -1453867412542792281L;
- private int sortColumn;
+ private String sortColumn;
private Boolean suggestedOrder = null;
- public SortEvent(UIComponent component, int sortColumn, int rows, int first) {
+ public SortEvent(UIComponent component, String sortColumn, int rows, int first) {
super(component, rows, first);
this.sortColumn = sortColumn;
@@ -46,7 +46,7 @@
/**
* @return the sortField
*/
- public int getSortColumn() {
+ public String getSortColumn() {
return sortColumn;
}
@@ -57,7 +57,7 @@
return "SortEvent: {sortColumn: " + sortColumn + "}";
}
- public void setSortColumn(int sortColumn) {
+ public void setSortColumn(String sortColumn) {
this.sortColumn = sortColumn;
}
Modified: trunk/framework/api/src/main/java/org/richfaces/model/SortField.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/SortField.java 2008-05-08 16:10:34 UTC (rev 8505)
+++ trunk/framework/api/src/main/java/org/richfaces/model/SortField.java 2008-05-08 16:37:18 UTC (rev 8506)
@@ -16,15 +16,13 @@
*/
private static final long serialVersionUID = 1L;
private String name = null;
- private int index = -1;
private Boolean ascending = null;
- public SortField(String name, int index, Boolean ascending) {
+ public SortField(String name, Boolean ascending) {
super();
this.name = name;
- this.index = index;
this.ascending = ascending;
}
@@ -36,14 +34,6 @@
this.name = name;
}
- public int getIndex() {
- return index;
- }
-
- public void setIndex(int index) {
- this.index = index;
- }
-
public Boolean getAscending() {
return ascending;
}
@@ -52,16 +42,17 @@
this.ascending = ascending;
}
+ @Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((ascending == null) ? 0 : ascending.hashCode());
- result = prime * result + index;
result = prime * result + ((name == null) ? 0 : name.hashCode());
return result;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -69,14 +60,12 @@
return false;
if (getClass() != obj.getClass())
return false;
- final SortField other = (SortField) obj;
+ SortField other = (SortField) obj;
if (ascending == null) {
if (other.ascending != null)
return false;
} else if (!ascending.equals(other.ascending))
return false;
- if (index != other.index)
- return false;
if (name == null) {
if (other.name != null)
return false;
@@ -84,7 +73,4 @@
return false;
return true;
}
-
-
-
}
Modified: trunk/framework/test/src/test/java/org/richfaces/model/impl/expressive/ObjectWrapperFactoryTest.java
===================================================================
--- trunk/framework/test/src/test/java/org/richfaces/model/impl/expressive/ObjectWrapperFactoryTest.java 2008-05-08 16:10:34 UTC (rev 8505)
+++ trunk/framework/test/src/test/java/org/richfaces/model/impl/expressive/ObjectWrapperFactoryTest.java 2008-05-08 16:37:18 UTC (rev 8506)
@@ -57,9 +57,9 @@
public void setUp() throws Exception {
super.setUp();
sortFields = new SortField[3];
- sortFields[0] = new SortField("_id1", 0, Boolean.TRUE);
- sortFields[1] = new SortField("name", 1, Boolean.FALSE);
- sortFields[2] = new SortField("#{" +var + ".name}", 2, Boolean.TRUE);
+ sortFields[0] = new SortField("_id1", Boolean.TRUE);
+ sortFields[1] = new SortField("name", Boolean.FALSE);
+ sortFields[2] = new SortField("#{" +var + ".name}", Boolean.TRUE);
sortOrder = new SortOrder(sortFields);
factory = new ObjectWrapperFactory(facesContext, var, sortOrder);
Modified: trunk/framework/test/src/test/java/org/richfaces/model/impl/expressive/WrappedBeanComparatorTest.java
===================================================================
--- trunk/framework/test/src/test/java/org/richfaces/model/impl/expressive/WrappedBeanComparatorTest.java 2008-05-08 16:10:34 UTC (rev 8505)
+++ trunk/framework/test/src/test/java/org/richfaces/model/impl/expressive/WrappedBeanComparatorTest.java 2008-05-08 16:37:18 UTC (rev 8506)
@@ -54,8 +54,8 @@
super.setUp();
sortFields = new SortField[2];
- sortFields[0] = new SortField("a", 1, Boolean.FALSE);
- sortFields[1] = new SortField("b", 2, Boolean.TRUE);
+ sortFields[0] = new SortField("a", Boolean.FALSE);
+ sortFields[1] = new SortField("b", Boolean.TRUE);
comparator = new WrappedBeanComparator(sortFields);
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/event/sort/MultiColumnSortListener.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/event/sort/MultiColumnSortListener.java 2008-05-08 16:10:34 UTC (rev 8505)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/event/sort/MultiColumnSortListener.java 2008-05-08 16:37:18 UTC (rev 8506)
@@ -33,10 +33,9 @@
*/
public void processSort(SortEvent e) {
UIScrollableDataTable grid = (UIScrollableDataTable) e.getComponent();
- int columnIndex = e.getSortColumn();
+ String sortColumn = e.getSortColumn();
- UIComponent column =
- grid.getChildren().get(columnIndex);
+ UIComponent column = grid.findComponent(sortColumn);
String name = ColumnUtil.getColumnSorting(column);
@@ -57,7 +56,7 @@
if (fields == null) {
//If no sorting was applied at all, set sorting to current
- fields = new SortField[] {new SortField(name, columnIndex, nextSortOrder(null, suggested))};
+ fields = new SortField[] {new SortField(name, nextSortOrder(null, suggested))};
} else {
List<SortField> newFields = new LinkedList<SortField>(Arrays.asList(fields));
@@ -65,14 +64,11 @@
for (Iterator<SortField> iterator = newFields.iterator(); iterator.hasNext() && newField == null; ) {
SortField sortField = (SortField) iterator.next();
- if (sortField.getIndex() == columnIndex ||
- (sortField.getName() != null &&
- name != null &&
- name.equals(sortField.getName()))) {
+ if (name != null && name.equals(sortField.getName())) {
Boolean asc = sortField.getAscending();
- newField = new SortField(name, columnIndex, nextSortOrder(asc, suggested));
+ newField = new SortField(name, nextSortOrder(asc, suggested));
iterator.remove();
}
@@ -80,7 +76,7 @@
if (newField == null) {
- newField = new SortField(name, columnIndex, nextSortOrder(null, suggested));
+ newField = new SortField(name, nextSortOrder(null, suggested));
}
newFields.add(newField);
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/event/sort/SingleColumnSortListener.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/event/sort/SingleColumnSortListener.java 2008-05-08 16:10:34 UTC (rev 8505)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/event/sort/SingleColumnSortListener.java 2008-05-08 16:37:18 UTC (rev 8506)
@@ -27,9 +27,9 @@
*/
public void processSort(SortEvent e) {
UIScrollableDataTable grid = (UIScrollableDataTable) e.getComponent();
- int columnIndex = e.getSortColumn();
- UIComponent column =
- grid.getChildren().get(columnIndex);
+ String sortColumn = e.getSortColumn();
+
+ UIComponent column = grid.findComponent(sortColumn);
String name = ColumnUtil.getColumnSorting(column);
@@ -46,19 +46,16 @@
SortField[] fields = sortOrder.getFields();
- SortField newField = new SortField(name, columnIndex, nextSortOrder(null, e.getSuggestedOrder()));
+ SortField newField = new SortField(name, nextSortOrder(null, e.getSuggestedOrder()));
if (fields != null) {
for (int i = 0; i < fields.length; i++) {
SortField sortField = fields[i];
- if (sortField.getIndex() == columnIndex ||
- (sortField.getName() != null &&
- name != null &&
- name.equals(sortField.getName()))) {
+ if (name != null && name.equals(sortField.getName())) {
Boolean asc = nextSortOrder(sortField.getAscending(), e.getSuggestedOrder()) ;
- newField = new SortField(name, columnIndex, asc);
+ newField = new SortField(name, asc);
break;
}
Modified: trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
===================================================================
--- trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2008-05-08 16:10:34 UTC (rev 8505)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2008-05-08 16:37:18 UTC (rev 8506)
@@ -158,7 +158,7 @@
variables.setVariable("sepOffset", new Integer(sepOffset));
variables.setVariable("headerColumnClass", state.getColumnClass());
variables.setVariable("columnWidth", width);
- Boolean sorting = getColumnSorting(state.getGrid(), cell_index);
+ Boolean sorting = getColumnSorting(state.getGrid(), column.getId());
if (sorting != null) {
if (sorting.booleanValue()) {
variables.setVariable("headerColumnSortClass", "rich-sdt-header-sort-up");
@@ -185,7 +185,7 @@
int cell_index = state.getCellIndex();
String client_id = state.getClientId();
- Boolean sorting = getColumnSorting(state.getGrid(), cell_index);
+ Boolean sorting = getColumnSorting(state.getGrid(), column.getId());
if (sorting != null) {
if (sorting.booleanValue()) {
@@ -227,7 +227,7 @@
variables.setVariable("cell_index", new Integer(cell_index));
variables.setVariable("footerColumnClass", state.getColumnClass());
- Boolean sorting = getColumnSorting(state.getGrid(), cell_index);
+ Boolean sorting = getColumnSorting(state.getGrid(), column.getId());
if (sorting != null) {
if (sorting.booleanValue()) {
variables.setVariable("footerColumnSortClass", "rich-sdt-footer-sort-up");
@@ -263,7 +263,7 @@
variables.setVariable("client_id", client_id);
variables.setVariable("cell_index", new Integer(cell_index));
variables.setVariable("columnClass", state.getColumnClass());
- Boolean sorting = getColumnSorting(state.getGrid(), cell_index);
+ Boolean sorting = getColumnSorting(state.getGrid(), column.getId());
if (sorting != null) {
if (sorting.booleanValue()) {
variables.setVariable("columnSortClass", "rich-sdt-column-sort-up");
@@ -628,7 +628,7 @@
parameters.containsKey(clientId + ":sortStartRow") &&
parameters.containsKey(clientId + ":sortIndex")){
- int sortColumn = Integer.parseInt((String)parameters.get(clientId + ":sortColumn"));
+ String sortColumn = (String)parameters.get(clientId + ":sortColumn");
int sortDataIndex = Integer.parseInt((String)parameters.get(clientId + ":sortIndex"));
Integer sortStartRow = Integer.valueOf((String)parameters.get(clientId + ":sortStartRow"));
@@ -648,7 +648,7 @@
}
- UIComponent column = (UIComponent)grid.getChildren().get(sortColumn);
+ UIComponent column = grid.findComponent(sortColumn);
if(ColumnUtil.isSortable(column)){
@@ -940,12 +940,11 @@
}
}
- private Boolean getColumnSorting(UIScrollableDataTable grid, int columnIndex) {
+ private Boolean getColumnSorting(UIScrollableDataTable grid, String sortColumn) {
Boolean sorting = null;
- UIComponent column =
- grid.getChildren().get(columnIndex);
+ UIComponent column = grid.findComponent(sortColumn);
String name = ColumnUtil.getColumnSorting(column);
@@ -958,8 +957,7 @@
for (int i = 0; i < sortFields.length && sorting == null; i++) {
SortField sortField = sortFields[i];
- if ((name != null && name.equals(sortField.getName()))
- || columnIndex == sortField.getIndex()) {
+ if (name != null && name.equals(sortField.getName())) {
sorting = sortField.getAscending();
}
}
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-05-08 16:10:34 UTC (rev 8505)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-05-08 16:37:18 UTC (rev 8506)
@@ -334,8 +334,8 @@
}
if(el) {
- var index = parseInt(el.getAttribute("columnindex"));
- if(index>=0) {
+ var sortColumnId = el.getAttribute("columnid");
+ if(sortColumnId) {
/*
var dir = this.getColumns()[index].sorted;
dir = (dir == "asc") ? "desc" : "asc";
@@ -358,7 +358,7 @@
*/
var rows = this.grid.getBody().templFrozen.getElement().rows;
var startRow = rows && rows.length>0 ? this.grid.getBody()._getRowIndex(rows[0].id) : 0;
- this.grid.element.fire("grid:onsort",{ column: index,
+ this.grid.element.fire("grid:onsort",{ column: sortColumnId,
startRow: startRow,
index: this.grid.getBody().currRange.start
});
Modified: trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-cell.jspx
===================================================================
--- trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-cell.jspx 2008-05-08 16:10:34 UTC (rev 8505)
+++ trunk/ui/scrollableDataTable/src/main/templates/org/richfaces/scrollable-data-table-header-cell.jspx 2008-05-08 16:37:18 UTC (rev 8506)
@@ -12,7 +12,7 @@
component="javax.faces.component.UIComponent"
>
- <th class="dr-sdt-hc rich-sdt-header-cell #{headerColumnClass} #{headerColumnSortClass}" id="#{client_id}:hc_#{cell_index}" columnindex="#{cell_index}" sortable="#{component.attributes['sortable']}">
+ <th class="dr-sdt-hc rich-sdt-header-cell #{headerColumnClass} #{headerColumnSortClass}" id="#{client_id}:hc_#{cell_index}" columnid="#{component.attributes['id']}" sortable="#{component.attributes['sortable']}">
<jsp:scriptlet>
if(org.richfaces.component.util.ColumnUtil.isSortable(component)) {
Modified: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/AbstractScrollableDataTableTestCase.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/AbstractScrollableDataTableTestCase.java 2008-05-08 16:10:34 UTC (rev 8505)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/component/AbstractScrollableDataTableTestCase.java 2008-05-08 16:37:18 UTC (rev 8506)
@@ -89,8 +89,8 @@
protected SortOrder createTestData_0_sortOrder() {
SortField[] fields = new SortField[] {
- new SortField("aaa", 1, Boolean.TRUE),
- new SortField("bb", 0, Boolean.FALSE)
+ new SortField("aaa", Boolean.TRUE),
+ new SortField("bb", Boolean.FALSE)
};
return new SortOrder(fields);
}
@@ -103,9 +103,9 @@
protected SortOrder createTestData_1_sortOrder() {
SortField[] fields = new SortField[] {
- new SortField("column3", 2, null),
- new SortField("column1", 1, Boolean.TRUE),
- new SortField("column2", 0, Boolean.FALSE)
+ new SortField("column3", null),
+ new SortField("column1", Boolean.TRUE),
+ new SortField("column2", Boolean.FALSE)
};
return new SortOrder(fields);
}
@@ -139,7 +139,7 @@
SortListener1 sortListener = new SortListener1();
table.setSortListener(sortListener);
- table.broadcast(new SortEvent(table, 0, 20, 30));
+ table.broadcast(new SortEvent(table, "0", 20, 30));
assertTrue(sortListener.triggered);
}
@@ -176,7 +176,7 @@
table.setSortListener(sortListener1);
- SortEvent sortEvent = new SortEvent(table, 0, 20, 30);
+ SortEvent sortEvent = new SortEvent(table, "0", 20, 30);
table.processSortingChange(sortEvent);
Modified: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/MultiColumnSortListenerTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/MultiColumnSortListenerTest.java 2008-05-08 16:10:34 UTC (rev 8505)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/MultiColumnSortListenerTest.java 2008-05-08 16:37:18 UTC (rev 8506)
@@ -75,7 +75,7 @@
* Test method for {@link org.richfaces.event.sort.SingleColumnSortListener#processSort(org.richfaces.event.sort.SortEvent)}.
*/
public final void testProcessSort() {
- SortEvent event = new SortEvent(table, 0, 0, 0);
+ SortEvent event = new SortEvent(table, "col1", 0, 0);
listener.processSort(event);
@@ -92,7 +92,6 @@
assertEquals("col1", field.getName());
assertEquals(Boolean.TRUE, field.getAscending());
- assertEquals(0, field.getIndex());
listener.processSort(event);
@@ -109,9 +108,8 @@
assertEquals("col1", field.getName());
assertEquals(Boolean.FALSE, field.getAscending());
- assertEquals(0, field.getIndex());
- event = new SortEvent(table, 1, 0, 0);
+ event = new SortEvent(table, "col2", 0, 0);
listener.processSort(event);
@@ -128,13 +126,11 @@
assertEquals("col1", field.getName());
assertEquals(Boolean.FALSE, field.getAscending());
- assertEquals(0, field.getIndex());
field = fields[1];
assertEquals("col2", field.getName());
assertEquals(Boolean.TRUE, field.getAscending());
- assertEquals(1, field.getIndex());
}
}
Modified: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/SingleColumnSortListenerTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/SingleColumnSortListenerTest.java 2008-05-08 16:10:34 UTC (rev 8505)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/event/sort/SingleColumnSortListenerTest.java 2008-05-08 16:37:18 UTC (rev 8506)
@@ -72,7 +72,7 @@
* Test method for {@link org.richfaces.event.sort.SingleColumnSortListener#processSort(org.richfaces.event.sort.SortEvent)}.
*/
public final void testProcessSort() {
- SortEvent event = new SortEvent(table, 0, 0, 0);
+ SortEvent event = new SortEvent(table, "col1", 0, 0);
listener.processSort(event);
@@ -89,7 +89,6 @@
assertEquals("col1", field.getName());
assertEquals(Boolean.TRUE, field.getAscending());
- assertEquals(0, field.getIndex());
listener.processSort(event);
@@ -106,9 +105,8 @@
assertEquals("col1", field.getName());
assertEquals(Boolean.FALSE, field.getAscending());
- assertEquals(0, field.getIndex());
- event = new SortEvent(table, 1, 0, 0);
+ event = new SortEvent(table, "col2", 0, 0);
listener.processSort(event);
@@ -125,7 +123,6 @@
assertEquals("col2", field.getName());
assertEquals(Boolean.TRUE, field.getAscending());
- assertEquals(1, field.getIndex());
}
Modified: trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/internal/ComponentSortableDataModelTest.java
===================================================================
--- trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/internal/ComponentSortableDataModelTest.java 2008-05-08 16:10:34 UTC (rev 8505)
+++ trunk/ui/scrollableDataTable/src/test/java/org/richfaces/model/internal/ComponentSortableDataModelTest.java 2008-05-08 16:37:18 UTC (rev 8506)
@@ -66,7 +66,7 @@
o = o(20);
- sortOrder = new SortOrder(new SortField[] {new SortField("name", 0, Boolean.TRUE)});
+ sortOrder = new SortOrder(new SortField[] {new SortField("name", Boolean.TRUE)});
//model = new ComponentSortableDataModel()
}
16 years, 8 months
JBoss Rich Faces SVN: r8505 - Reports/3.2.1 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-05-08 12:10:34 -0400 (Thu, 08 May 2008)
New Revision: 8505
Added:
trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR3ayanul.xls
trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR3gmaksimenko.xls
trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR3mvitenkov.xls
Log:
Added: trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR3ayanul.xls
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR3ayanul.xls
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR3gmaksimenko.xls
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR3gmaksimenko.xls
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR3mvitenkov.xls
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/qa/Test Reports/3.2.1/DailyReportCR3mvitenkov.xls
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 8 months
JBoss Rich Faces SVN: r8504 - in trunk/ui/panelmenu/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-05-08 12:07:32 -0400 (Thu, 08 May 2008)
New Revision: 8504
Modified:
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
Log:
http://jira.jboss.com/jira/browse/RF-1948
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2008-05-08 15:43:52 UTC (rev 8503)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2008-05-08 16:07:32 UTC (rev 8504)
@@ -120,12 +120,12 @@
flatten(component.getChildren(), flatList, levels, 0);
- panelMenu.append("new PanelMenu('")
+ panelMenu.append("var ids = new PanelMenu('")
.append(component.getClientId(context).toString())
.append("',")
.append(new Boolean(expandSingle).toString())
.append(",").append("'").append(selectedChild).append("'")
- .append(");\n");
+ .append(").getIds();\n");
for (Iterator iter = flatList.iterator(); iter.hasNext();) {
UIComponent child = (UIComponent) iter.next();
@@ -204,7 +204,7 @@
}
buffer
- .append("new PanelMenuItem(params,{myId:'")
+ .append("new PanelMenuItem(ids, params,{myId:'")
.append((String) child.getClientId(context))
.append("',parentId:'")
.append((String) child.getParent().getClientId(context))
Modified: trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
--- trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2008-05-08 15:43:52 UTC (rev 8503)
+++ trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2008-05-08 16:07:32 UTC (rev 8504)
@@ -12,6 +12,8 @@
PanelMenu.prototype = {
initialize: function(myId, so, selectedChild){
+ this.myId = myId;
+
this.childObj = new Array();
this.expandSingle = so;
this.lastExpanded = null;
@@ -21,13 +23,53 @@
this.is = 'panelMenu';
this.selectedNameInput = $(myId + 'selectedItemName');
PanelMenuStorage[myId] = this;
+ },
+
+ _getIds: function(elt, ids) {
+ var child = Richfaces.firstDescendant(elt);
+ while (child) {
+ if (child.id) {
+ ids[child.id] = child;
+
+ if (child.tagName) {
+ var tagName = child.tagName.toLowerCase();
+
+ if (tagName == 'div') {
+ this._getIds(child, ids);
+ } else if (child.rows) {
+ var rows = child.rows;
+ for (var i = 0; i < rows.length; i++ ) {
+ var cells = rows[i].cells;
+ for (var j = 0; j < cells.length; j++ ) {
+ var cell = cells[j];
+ if (/^icon/.test(cell.id)) {
+ ids[cell.id] = cell;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ child = Richfaces.next(child);
+ }
+ },
+
+ getIds: function() {
+ var root = $(this.myId);
+ var ids = {};
+ ids[root.id] = root;
+
+ this._getIds(root, ids);
+
+ return ids;
}
};
PanelMenuItem = Class.create();
PanelMenuItem.prototype = {
- initialize: function(params,ids, options, hoveredStyles, hoveredClasses, level, haveDynamicIcon, action, opened, ajaxFunction, onItemHover, iconAlign, iconExpanded, iconCollapsed, iconSpacer){
+ initialize: function(idsMap, params,ids, options, hoveredStyles, hoveredClasses, level, haveDynamicIcon, action, opened, ajaxFunction, onItemHover, iconAlign, iconExpanded, iconCollapsed, iconSpacer){
if (!ids.parentId){return};
this.type = options.type;
this.onopen = options.onopen;
@@ -49,11 +91,19 @@
this.hoveredStyles = hoveredStyles;
this.hoveredClasses = hoveredClasses;
- this.tdhider = $(ids.myId);
+ this.tdhider = Element.extend(idsMap[ids.myId]);
+ if (!this.tdhider) {
+ this.tdhider = $(ids.myId);
+ }
this.tablehider = Richfaces.firstDescendant(this.tdhider);
this.haveDynamicIcon = haveDynamicIcon;
- if (this.haveDynamicIcon==true)
- this.iconswitcher = $("icon"+ids.myId);
+ if (this.haveDynamicIcon==true) {
+ var iconSwitcherId = "icon" + ids.myId;
+ this.iconswitcher = Element.extend(idsMap[iconSwitcherId]);
+ if (!this.iconswitcher) {
+ this.iconswitcher = $(iconSwitcherId);
+ }
+ }
this.childObj = new Array();
this.parentObj = PanelMenuStorage[ids.parentId];
this.parentObj.childObj.push(this);
16 years, 8 months
JBoss Rich Faces SVN: r8503 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-05-08 11:43:52 -0400 (Thu, 08 May 2008)
New Revision: 8503
Modified:
trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml
Log:
http://jira.jboss.com/jira/browse/RF-920 - rich:panelMenu: class rich-panel-menu was changed to rich-pmenu
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml 2008-05-08 15:34:35 UTC (rev 8502)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml 2008-05-08 15:43:52 UTC (rev 8503)
@@ -303,7 +303,7 @@
<tbody>
<row>
- <entry>rich-panel-menu</entry>
+ <entry>rich-pmenu</entry>
<entry>Defines styles for a wrapper <div> element of a component</entry>
</row>
16 years, 8 months
JBoss Rich Faces SVN: r8502 - trunk/docs/faq/en/src/main/docbook/module.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-05-08 11:34:35 -0400 (Thu, 08 May 2008)
New Revision: 8502
Modified:
trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
Log:
http://jira.jboss.com/jira/browse/RF-2420 - info was added into FAQ
Modified: trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
===================================================================
--- trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2008-05-08 13:45:43 UTC (rev 8501)
+++ trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2008-05-08 15:34:35 UTC (rev 8502)
@@ -1570,23 +1570,24 @@
<section id="SimpleTogglePanelPanelMenuState">
<?dbhtml filename="SimpleTogglePanelPanelMenuState.html"?>
- <title>How to save the state of simpleTogglePanel?</title>
+ <title>How to save the state of <rich:simpleTogglePanel>?</title>
<para>
In order to save the state (exapnd/collapse) of the <emphasis role="bold"><property><rich:simpleTogglePanel></property></emphasis> component
you could use <emphasis><property>"opened"</property></emphasis> attribute responsible for keeping a panel state
and <emphasis role="bold"><property><a4j:support></property></emphasis> binded to <property>onexpand</property> and <property>oncollapse</property> events.
</para>
<para>
- In the following example when you click on the toggle icon simpleTogglePanel appears and current state displays on modal panel.
+ In the following example when you click on the toggle icon <emphasis role="bold"><property><rich:simpleTogglePanel></property></emphasis> appears and current state displays on
+ <emphasis role="bold"><property><rich:modalPanel></property></emphasis>.
This state is remembered between page views.
</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-<rich:simpleTogglePanel id="toggleP" label="simpleTogglePanel" switchType="client" width="600px" opened="#{demo.state}">
- <a4j:support event="onexpand" actionListener="#{demo.stateTrue}" reRender="repeater" oncomplete="Richfaces.showModalPanel('myFrom:panel')" />
- <a4j:support event="oncollapse" actionListener="#{demo.stateFalse}" reRender="repeater" oncomplete="Richfaces.showModalPanel('myFrom:panel')" />
+<rich:simpleTogglePanel id="toggleP" label="simpleTogglePanel" switchType="client" width="600px" opened="#{bean.state}">
+ <a4j:support event="onexpand" actionListener="#{bean.stateTrue}" reRender="repeater" oncomplete="Richfaces.showModalPanel('myFrom:panel')" />
+ <a4j:support event="oncollapse" actionListener="#{bean.stateFalse}" reRender="repeater" oncomplete="Richfaces.showModalPanel('myFrom:panel')" />
<h:panelGrid columns="2" border="0">
<h:graphicImage url="pics/Canon.jpg" alt="" width="100px" height="100px" />
<h:panelGroup>
@@ -1604,20 +1605,20 @@
<h:outputText value="States of simpleTogglePanel" />
</f:facet>
<f:facet name="controls">
- <span style="cursor: pointer" onclick="Richfaces.hideModalPanel('myFrom:panel')">X</span>
+ <span style="cursor: pointer" onclick="Richfaces.hibeandalPanel('myFrom:panel')">X</span>
</f:facet>
<h:outputText value="Expanded simpleTogglePanel: " style="font-weight:bold;" />
- <h:outputText value="#{demo.state}" id="repeater" />
+ <h:outputText value="#{bean.state}" id="repeater" />
</rich:modalPanel>
...]]></programlisting>
<para>
In order to build this application, you can create a managed bean like this one.
</para>
- <para>
+ <para id="beanState">
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-public class demo {
+public class bean {
private boolean state = false;
@@ -1640,7 +1641,51 @@
...]]></programlisting>
</section>
+ <section id="PanelMenuGroupState">
+ <?dbhtml filename="PanelMenuGroupState.html"?>
+ <title>How to save the state of <rich:panelMenuGroup>?</title>
+ <para>
+ With the help of the <emphasis><property>"expanded"</property></emphasis> attribute
+ and <emphasis role="bold"><property><a4j:support></property></emphasis> binded to <property>onexpand</property> and <property>oncollapse</property> events
+ you could keep the state (exapnd/collapse) of the <emphasis role="bold"><property><rich:panelMenuGroup></property></emphasis> component.
+ </para>
+ <para>
+ In the following example when you click on the toggle icon the <emphasis role="bold"><property><rich:panelMenuGroup></property></emphasis>
+ expands and current state displays on <emphasis role="bold"><property><rich:modalPanel></property></emphasis>.
+ This state is remembered between page views.
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<h:form id="myFrom">
+ <rich:panelMenu expandMode="ajax" iconExpandedTopGroup="chevronUp" iconCollapsedTopGroup="chevronDown">
+ <rich:panelMenuGroup label="Group 1" expanded="#{bean.state}">
+ <a4j:support event="onexpand" actionListener="#{bean.stateTrue}" reRender="repeater" oncomplete="Richfaces.showModalPanel('myFrom:panel')" />
+ <a4j:support event="oncollapse" actionListener="#{bean.stateFalse}" reRender="repeater" oncomplete="Richfaces.showModalPanel('myFrom:panel')" />
+ <rich:panelMenuItem label="Item 1.1" />
+ <rich:panelMenuItem label="Item 1.2" />
+ <rich:panelMenuItem label="Item 1.3" />
+ </rich:panelMenuGroup>
+ </rich:panelMenu>
+ <rich:modalPanel id="panel" width="230" height="50">
+ <f:facet name="header">
+ <h:outputText value="States of rich:panelMenuGroup" />
+ </f:facet>
+ <f:facet name="controls">
+ <span style="cursor: pointer" onclick="Richfaces.hideModalPanel('myFrom:panel')">X</span>
+ </f:facet>
+ <h:outputText value="Expanded rich:panelMenuGroup: " />
+ <h:outputText value="#{bean.state}" id="repeater" />
+ </rich:modalPanel>
+</h:form>
+...]]></programlisting>
+ <para>
+ In order to build this application, you can create a managed bean like <link linkend="beanState">this one</link>.
+ </para>
+ </section>
+
<section id="RowSelectionInDataTable">
<?dbhtml filename="HighlightRowDataTable.html"?>
<title>How to highlight rows in a dataTable when the mouse is over?</title>
16 years, 8 months
JBoss Rich Faces SVN: r8501 - in trunk/ui/fileUpload/src/main: java/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-05-08 09:45:43 -0400 (Thu, 08 May 2008)
New Revision: 8501
Modified:
trunk/ui/fileUpload/src/main/config/component/fileUpload.xml
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
Log:
RF-3363
Modified: trunk/ui/fileUpload/src/main/config/component/fileUpload.xml
===================================================================
--- trunk/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-05-08 13:36:13 UTC (rev 8500)
+++ trunk/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-05-08 13:45:43 UTC (rev 8501)
@@ -302,6 +302,26 @@
<description>Defines a label for a stop control</description>
</property>
<property>
+ <name>doneLabel</name>
+ <classname>java.lang.String</classname>
+ <description>Defines a label for a done label</description>
+ </property>
+ <property>
+ <name>transferErrorLabel</name>
+ <classname>java.lang.String</classname>
+ <description>Defines a label for a transfer error label</description>
+ </property>
+ <property>
+ <name>sizeErrorLabel</name>
+ <classname>java.lang.String</classname>
+ <description>Defines a label for a size error label</description>
+ </property>
+ <property>
+ <name>progressLabel</name>
+ <classname>java.lang.String</classname>
+ <description>Defines a label for a progress label</description>
+ </property>
+ <property>
<name>locale</name>
<classname>java.lang.Object</classname>
<description>Used for locale definition</description>
Modified: trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
===================================================================
--- trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-05-08 13:36:13 UTC (rev 8500)
+++ trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-05-08 13:45:43 UTC (rev 8501)
@@ -76,7 +76,7 @@
private static final String[] labelAttribues = { "addControlLabel",
"uploadControlLabel", "stopControlLabel", "clearAllControlLabel",
"cancelEntryControlLabel", "clearControlLabel",
- "stopEntryControlLabel", null, null, null, null };
+ "stopEntryControlLabel", "doneLabel", "sizeErrorLabel", "transferErrorLabel", "progressLabel" };
/**
* Overrides standard JSF component method.
16 years, 8 months
JBoss Rich Faces SVN: r8500 - in trunk/test-applications/jsp/src/main: webapp/PickList and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: gmaksimenko
Date: 2008-05-08 09:36:13 -0400 (Thu, 08 May 2008)
New Revision: 8500
Modified:
trunk/test-applications/jsp/src/main/java/pickList/PickList.java
trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp
trunk/test-applications/jsp/src/main/webapp/PickList/PickListProperty.jsp
Log:
Erase test for lang
Modified: trunk/test-applications/jsp/src/main/java/pickList/PickList.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/pickList/PickList.java 2008-05-08 13:35:52 UTC (rev 8499)
+++ trunk/test-applications/jsp/src/main/java/pickList/PickList.java 2008-05-08 13:36:13 UTC (rev 8500)
@@ -36,7 +36,6 @@
private String valueCL;
private HtmlPickList myPickList = null;
private String bindLabel;
- private String lang;
public PickList() {
this.copyAllControlLabel = "copyAllControlLabel";
@@ -59,20 +58,11 @@
this.required = false;
this.requiredMessage = "requiredMessage";
this.bindLabel = "Click Binding";
- this.lang = "defaultLang";
data = new ArrayList<SelectItem>();
for (int i = 0; i < 10; i++)
data.add(new SelectItem("selectItems " + i));
}
- public String getLang() {
- return lang;
- }
-
- public void setLang(String lang) {
- this.lang = lang;
- }
-
public HtmlPickList getMyPickList() {
return myPickList;
}
Modified: trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp 2008-05-08 13:35:52 UTC (rev 8499)
+++ trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp 2008-05-08 13:36:13 UTC (rev 8500)
@@ -6,7 +6,8 @@
<rich:pickList id="pickListID" value="#{pickList.value}"
showButtonsLabel="#{pickList.showButtonLabels}"
valueChangeListener="#{pickList.valueChangeListener}"
- controlClass="#{style.controlClass}" listClass="#{style.listClass}"
+ controlClass="#{style.controlClass}"
+ listClass="#{style.listClass}"
style="#{style.style}" styleClass="#{style.styleClass}"
copyAllControlLabel="#{pickList.copyAllControlLabel}"
copyControlLabel="#{pickList.copyControlLabel}"
Modified: trunk/test-applications/jsp/src/main/webapp/PickList/PickListProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/PickList/PickListProperty.jsp 2008-05-08 13:35:52 UTC (rev 8499)
+++ trunk/test-applications/jsp/src/main/webapp/PickList/PickListProperty.jsp 2008-05-08 13:36:13 UTC (rev 8500)
@@ -42,7 +42,7 @@
<h:inputText value="#{pickList.sourceListWidth}" onchange="submit();"></h:inputText>
<h:outputText value="targetListWidth:"></h:outputText>
- <h:inputText value="#{pickList.targetListWidth}" onchange="sumbmit();"></h:inputText>
+ <h:inputText value="#{pickList.targetListWidth}" onchange="submit();"></h:inputText>
<h:outputText value="fastOrderControlsVisible:"></h:outputText>
<h:selectBooleanCheckbox value="#{pickList.fastOrderControlsVisible}"
@@ -65,9 +65,6 @@
<h:commandButton actionListener="#{pickList.checkBinding}" value="Binding"></h:commandButton>
<h:outputText value="#{pickList.bindLabel}"></h:outputText>
-
- <h:outputText value="lang"></h:outputText>
- <h:inputText value="#{pickList.lang}" onchange="submit();"></h:inputText>
</h:panelGrid>
</f:subview>
\ No newline at end of file
16 years, 8 months
JBoss Rich Faces SVN: r8499 - in trunk/test-applications/facelets/src/main: webapp/PickList and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: gmaksimenko
Date: 2008-05-08 09:35:52 -0400 (Thu, 08 May 2008)
New Revision: 8499
Modified:
trunk/test-applications/facelets/src/main/java/pickList/PickList.java
trunk/test-applications/facelets/src/main/webapp/PickList/PickList.xhtml
trunk/test-applications/facelets/src/main/webapp/PickList/PickListProperty.xhtml
Log:
Erase test for lang
Modified: trunk/test-applications/facelets/src/main/java/pickList/PickList.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/pickList/PickList.java 2008-05-08 13:25:12 UTC (rev 8498)
+++ trunk/test-applications/facelets/src/main/java/pickList/PickList.java 2008-05-08 13:35:52 UTC (rev 8499)
@@ -34,7 +34,6 @@
private String valueCL;
private HtmlPickList myPickList = null;
private String bindLabel;
- private String lang;
public PickList() {
this.copyAllControlLabel = "copyAllControlLabel";
@@ -57,7 +56,6 @@
this.required = false;
this.requiredMessage = "requiredMessage";
bindLabel = "Click Binding";
- this.lang = "defaultLang";
data = new ArrayList<SelectItem>();
for (int i = 0; i < 10; i++)
data.add(new SelectItem("selectItems " + i));
@@ -256,12 +254,4 @@
public void setValue(Object[] value) {
this.value = value;
}
-
- public String getLang() {
- return lang;
- }
-
- public void setLang(String lang) {
- this.lang = lang;
- }
}
Modified: trunk/test-applications/facelets/src/main/webapp/PickList/PickList.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/PickList/PickList.xhtml 2008-05-08 13:25:12 UTC (rev 8498)
+++ trunk/test-applications/facelets/src/main/webapp/PickList/PickList.xhtml 2008-05-08 13:35:52 UTC (rev 8499)
@@ -33,8 +33,7 @@
onmouseout="#{event.onmouseout}"
onmouseover="#{event.onmouseover}"
onmouseup="#{event.onmouseup}"
- binding="#{pickList.myPickList}"
- lang="#{pickList.lang}">
+ binding="#{pickList.myPickList}">
<f:selectItem itemValue="selectItem" itemLabel="selectItem" />
<f:selectItem itemValue="selectItem 1" itemLabel="selectItem 1" />
<f:selectItem itemValue="selectItem 2" itemLabel="selectItem 2" />
Modified: trunk/test-applications/facelets/src/main/webapp/PickList/PickListProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/PickList/PickListProperty.xhtml 2008-05-08 13:25:12 UTC (rev 8498)
+++ trunk/test-applications/facelets/src/main/webapp/PickList/PickListProperty.xhtml 2008-05-08 13:35:52 UTC (rev 8499)
@@ -38,13 +38,14 @@
<h:inputText value="#{pickList.sourceListWidth}" onchange="submit();"></h:inputText>
<h:outputText value="targetListWidth:"></h:outputText>
- <h:inputText value="#{pickList.targetListWidth}" onchange="sumbmit();"></h:inputText>
+ <h:inputText value="#{pickList.targetListWidth}" onchange="submit();"></h:inputText>
<h:outputText value="fastOrderControlsVisible:"></h:outputText>
<h:selectBooleanCheckbox value="#{pickList.fastOrderControlsVisible}"
onchange="submit();"></h:selectBooleanCheckbox>
- <h:outputText value="rendered:"></h:outputText>
+ <h:outputText value="rendered:"></h:outputText>
+
<h:selectBooleanCheckbox value="#{pickList.rendered}" onchange="submit();"></h:selectBooleanCheckbox>
<h:outputText value="immediate:"></h:outputText>
@@ -61,9 +62,6 @@
<h:commandButton actionListener="#{pickList.checkBinding}" value="Binding"></h:commandButton>
<h:outputText value="#{pickList.bindLabel}"></h:outputText>
-
- <h:outputText value="lang"></h:outputText>
- <h:inputText value="#{pickList.lang}" onchange="submit();"></h:inputText>
</h:panelGrid>
</f:subview>
\ No newline at end of file
16 years, 8 months
JBoss Rich Faces SVN: r8498 - in trunk/ui/combobox/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-05-08 09:25:12 -0400 (Thu, 08 May 2008)
New Revision: 8498
Modified:
trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
trunk/ui/combobox/src/main/templates/combobox.jspx
Log:
http://jira.jboss.com/jira/browse/RF-3285
Modified: trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-05-08 13:21:48 UTC (rev 8497)
+++ trunk/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-05-08 13:25:12 UTC (rev 8498)
@@ -337,13 +337,15 @@
this.button.style.backgroundImage = iconStyles.ACTIVE;
this.field.className = this.classes.FIELD.CLASSES.ACTIVE;
- this.isDisabled = false;
+ Element.setStyle(this.field, this.classes.FIELD.STYLE.ACTIVE);
+ this.isDisabled = false;
},
doDisable : function() {
this.button.className = this.classes.BUTTON.CLASSES.DISABLED;
this.buttonBG.className = this.classes.BUTTONBG.CLASSES.DISABLED;
this.field.className = this.classes.FIELD.CLASSES.DISABLED;
+ Element.setStyle(this.field, this.classes.FIELD.STYLE.DISABLED);
var iconStyles = this.classes.BUTTONICON.STYLE;
this.button.style.backgroundImage = iconStyles.DISABLED;
@@ -351,6 +353,7 @@
this.button.disabled = true;
this.field.disabled = true;
+
this.isDisabled = true;
},
@@ -358,6 +361,7 @@
this.button.className = this.classes.BUTTON.CLASSES.NORMAL;
this.buttonBG.className = this.classes.BUTTONBG.CLASSES.NORMAL;
this.field.className = this.classes.FIELD.CLASSES.NORMAL;
+ Element.setStyle(this.field, this.classes.FIELD.STYLE.NORMAL);
var iconStyles = this.classes.BUTTONICON.STYLE;
this.button.style.backgroundImage = iconStyles.NORMAL;
Modified: trunk/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/ui/combobox/src/main/templates/combobox.jspx 2008-05-08 13:21:48 UTC (rev 8497)
+++ trunk/ui/combobox/src/main/templates/combobox.jspx 2008-05-08 13:25:12 UTC (rev 8498)
@@ -210,11 +210,11 @@
<input id="#{clientId}comboboxField"
name="#{clientId}comboboxField"
disabled="#{disabled}"
- class="#{valueStyle} rich-combobox-input-inactive #{inputDisabledClass}" type="text"
+ class="#{valueStyle} rich-combobox-input-inactive #{inputInactiveClass}" type="text"
readonly="#{enableManualInput}"
value="#{value}"
onblur="#{component.attributes['onblur']}"
- style="width:#{correction}; #{inputStyle}"
+ style="width:#{correction}; #{inputInactiveStyle}"
autocomplete="off"
tabindex="#{component.attributes['tabindex']}"
/>
@@ -224,7 +224,7 @@
value=""
class="rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive"/>
<input id="#{clientId}comboboxButton" readonly="true" disabled="#{disabled}" type="text" value="" style="#{buttonStyle}; background-image: #{buttonIconInactive};"
- class="rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive #{buttonDisabledClass}"/>
+ class="rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive #{buttonInactiveClass}"/>
<div class="rich-combobox-strut rich-combobox-font" style="width:#{correction}">Strut</div>
</div>
@@ -303,7 +303,7 @@
ACTIVE : "rich-combobox-font rich-combobox-input #{inputClass}",
DISABLED : "rich-combobox-font-disabled rich-combobox-input-disabled #{inputDisabledClass}"},
STYLE :
- {NORMAL : "#{inputStyle}",
+ {NORMAL : "#{inputInactiveStyle}",
ACTIVE : "#{inputStyle}",
DISABLED : "#{inputDisabledStyle}"}
},
16 years, 8 months
JBoss Rich Faces SVN: r8497 - trunk/test-applications/facelets/src/main/webapp/Panel.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-05-08 09:21:48 -0400 (Thu, 08 May 2008)
New Revision: 8497
Modified:
trunk/test-applications/facelets/src/main/webapp/Panel/Panel.xhtml
Log:
Modified: trunk/test-applications/facelets/src/main/webapp/Panel/Panel.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Panel/Panel.xhtml 2008-05-08 13:20:32 UTC (rev 8496)
+++ trunk/test-applications/facelets/src/main/webapp/Panel/Panel.xhtml 2008-05-08 13:21:48 UTC (rev 8497)
@@ -101,7 +101,6 @@
<h:selectOneMenu value="#{richBean.srcContainer}" onchange="submit();">
<f:selectItems value="#{richBean.listContainer}"/>
</h:selectOneMenu>
- <ui:include src="${richBean.pathComponentContainer}"/>
</rich:panel>
<rich:panel id="panelId" rendered="#{panel.rendered}"
16 years, 8 months