JBoss Rich Faces SVN: r1107 - trunk/richfaces-samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-06-08 11:25:14 -0400 (Fri, 08 Jun 2007)
New Revision: 1107
Modified:
trunk/richfaces-samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/usage.xhtml
Log:
classes for ver menu items
Modified: trunk/richfaces-samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/usage.xhtml
===================================================================
--- trunk/richfaces-samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/usage.xhtml 2007-06-08 15:18:14 UTC (rev 1106)
+++ trunk/richfaces-samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/usage.xhtml 2007-06-08 15:25:14 UTC (rev 1107)
@@ -10,7 +10,7 @@
<style>
.optionList {
- height:30px;
+ height:22px;
}
.vertical-menu-cell {
padding:0px 4px 0px 4px;
@@ -94,7 +94,7 @@
<div class="sample-container">
<h:form>
- <h:panelGrid class="vertical-menu-cell" columns="1" cellspacing="0" cellpadding="0">
+ <h:panelGrid class="vertical-menu-cell" columnClasses="optionList" columns="1" cellspacing="0" cellpadding="0">
<rich:dropDownMenu style="border:1px solid #{a4jSkin.panelBorderColor}" value="Option1" direction="bottom-right" jointPoint="tr">
<rich:menuItem value="Suboption1-1" />
<rich:menuItem value="Suboption1-2">
17 years, 7 months
JBoss Rich Faces SVN: r1106 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-06-08 11:18:14 -0400 (Fri, 08 Jun 2007)
New Revision: 1106
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
Log:
fixed z-indexes so it looks correctly in Safari and Opera
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-08 15:06:46 UTC (rev 1105)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-08 15:18:14 UTC (rev 1106)
@@ -97,7 +97,7 @@
if(childs[i].tagName && childs[i].tagName.toLowerCase() == "div") {
this.container = new ClientUI.common.box.Box(childs[i], null, true);
this.container.makeAbsolute();
- this.container.setStyle({'z-index' : 100});
+ this.container.setStyle({'z-index' : 20});
if(!ClientUILib.isIE) this.container.setStyle({overflow: 'hidden'});
break;
}
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-06-08 15:06:46 UTC (rev 1105)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2007-06-08 15:18:14 UTC (rev 1106)
@@ -54,6 +54,7 @@
for(var i=0; i<childs.length; i++) {
if(childs[i].tagName && childs[i].tagName.toLowerCase() == "div") {
this.container = new ClientUI.common.box.Box(childs[i], null, true);
+ this.container.setStyle({"z-index": 100});
break;
}
}
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-06-08 15:06:46 UTC (rev 1105)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-06-08 15:18:14 UTC (rev 1106)
@@ -75,6 +75,7 @@
for(var i=0; i<childs.length; i++) {
if(childs[i].tagName && childs[i].tagName.toLowerCase() == "div") {
this.container = $(childs[i]);
+ this.container.setStyle({"z-index": 100});
break;
}
}
17 years, 7 months
JBoss Rich Faces SVN: r1105 - trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-06-08 11:06:46 -0400 (Fri, 08 Jun 2007)
New Revision: 1105
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Key.java
Log:
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Key.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Key.java 2007-06-08 14:54:16 UTC (rev 1104)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/model/Key.java 2007-06-08 15:06:46 UTC (rev 1105)
@@ -12,6 +12,8 @@
import java.io.Serializable;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+
/**
* @author Maksim Kaszynski
*
@@ -58,4 +60,14 @@
}
return super.equals(obj);
}
+
+ @Override
+ public int hashCode() {
+ return id;
+ }
+
+ @Override
+ public String toString() {
+ return getClass().getSimpleName() + ":" + value;
+ }
}
17 years, 7 months
JBoss Rich Faces SVN: r1104 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-06-08 10:54:16 -0400 (Fri, 08 Jun 2007)
New Revision: 1104
Modified:
trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml
Log:
changed links
Modified: trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml 2007-06-08 14:53:38 UTC (rev 1103)
+++ trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml 2007-06-08 14:54:16 UTC (rev 1104)
@@ -140,7 +140,7 @@
<section>
<title>Events Handling</title>
<para>Just as Drag and Drop operations it corresponds to the one described on
- <link linkend="tree.html">the tree component level</link> for a default Node.</para>
+ <link linkend="tree">the tree component level</link> for a default Node.</para>
</section>
<section>
<title>Look-and-Feel Customization</title>
17 years, 7 months
JBoss Rich Faces SVN: r1103 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-06-08 10:53:38 -0400 (Fri, 08 Jun 2007)
New Revision: 1103
Modified:
trunk/docs/userguide/en/src/main/docbook/included/subTable.xml
Log:
changed links
Modified: trunk/docs/userguide/en/src/main/docbook/included/subTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/subTable.xml 2007-06-08 14:53:02 UTC (rev 1102)
+++ trunk/docs/userguide/en/src/main/docbook/included/subTable.xml 2007-06-08 14:53:38 UTC (rev 1103)
@@ -72,7 +72,7 @@
<listitem>Skin support. The table completely meets a three-class principle of Rich Faces skinability</listitem>
<listitem>Support of AJAX updates for a limited set of rows</listitem>
</itemizedlist>
- <para>Skins support is described in the <ulink url="../html/ArchitectureOverview.html">corresponding section</ulink>. AJAX support is
+ <para>Skins support is described in the <link linkend="ArchitectureOverview">corresponding section</link>. AJAX support is
possible because the component is created basing on the <emphasis role="bold"><property><a4j:repeat></property></emphasis> component and as a result the
component has its possibilities of AJAX updates for a limited set of rows. The component is implemented
with the <emphasis role="italic"><property>"ajaxKeys"</property></emphasis> attribute for a table and in contrast to the <emphasis role="bold"><property><a4j:repeat></property></emphasis> outputs the standard HTML
17 years, 7 months
JBoss Rich Faces SVN: r1102 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-06-08 10:53:02 -0400 (Fri, 08 Jun 2007)
New Revision: 1102
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml
Log:
changed links
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml 2007-06-08 14:51:59 UTC (rev 1101)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataTable.xml 2007-06-08 14:53:02 UTC (rev 1102)
@@ -69,7 +69,7 @@
<listitem>Skin support. The <property>table</property> completely meets a three-class principle of Rich Faces skinability</listitem>
<listitem>Support of AJAX updates for a limited set of strings</listitem>
</itemizedlist>
- <para>Skins support is described in the <ulink url="../html/ArchitectureOverview.html">corresponding section</ulink>.
+ <para>Skins support is described in the <link linkend="ArchitectureOverview">corresponding section</link>.
AJAX support is possible because the component is created basing on the <emphasis role="bold"><property><a4j:repeat></property></emphasis> component and
as a result the component has its possibilities of AJAX updates for a limited set of strings.
The component is implemented with the <emphasis role="italic"><property>"ajaxKeys"</property></emphasis> attribute for a <property>table</property> and in contrast to
17 years, 7 months
JBoss Rich Faces SVN: r1101 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-06-08 10:51:59 -0400 (Fri, 08 Jun 2007)
New Revision: 1101
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml
Log:
edited text
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml 2007-06-08 14:51:24 UTC (rev 1100)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml 2007-06-08 14:51:59 UTC (rev 1101)
@@ -49,12 +49,7 @@
</chapterinfo>
<para><property>RichFaces</property> was developed with an open architecture
- to be compatible with the widest possible variety of environments. Based on
- user reports, we have compiled a list of confirmed compatible environments;
- however, the absence of your environment in the compatibility list doesn't
- necessarily mean it's incompatible. It just may not have been confirmed yet.
- Help us keep this list up-to-date by providing your own feedback on
- environments compatible with <property>RichFaces</property>.</para>
+ to be compatible with the widest possible variety of environments.</para>
<para>This is what you need to start working with
<property>RichFaces</property>:</para>
@@ -138,5 +133,7 @@
<listitem>Safari 2.0</listitem>
</itemizedlist>
+ <para>This list is composed basing on reports received from our users. We assume the list can be incomplete and absence of your environment in the list doesn't mean incompatibility.</para>
+ <para>We appreciate your feedback on platforms and browsers that aren't in the list but are compatible with RichFaces. It helps us to keep the list up-to-date.</para>
</section>
</chapter>
\ No newline at end of file
17 years, 7 months
JBoss Rich Faces SVN: r1100 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-06-08 10:51:24 -0400 (Fri, 08 Jun 2007)
New Revision: 1100
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
changed links
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2007-06-08 14:38:45 UTC (rev 1099)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2007-06-08 14:51:24 UTC (rev 1100)
@@ -475,7 +475,7 @@
</table>
<para>To get detailed information on particular parameter possibilities,
- see the <ulink url="../html/RichFacesComponentsLibrary.html">chapter</ulink> where each component has skin parameters described
+ see the <link linkend="RichFacesComponentsLibrary">chapter</link> where each component has skin parameters described
corresponding to its elements.</para>
</section>
17 years, 7 months
JBoss Rich Faces SVN: r1099 - in trunk/sandbox/scrollable-grid/src/main: javascript and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-06-08 10:38:45 -0400 (Fri, 08 Jun 2007)
New Revision: 1099
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridUtils.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUILib.js
Log:
selection - correct order
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridUtils.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridUtils.java 2007-06-08 14:12:06 UTC (rev 1098)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridUtils.java 2007-06-08 14:38:45 UTC (rev 1099)
@@ -3,6 +3,8 @@
*/
package org.richfaces.renderkit.html;
+import javax.faces.component.UIComponent;
+
import org.richfaces.component.UIScrollableGrid;
/**
@@ -12,9 +14,24 @@
public class GridUtils {
public static final String FROZEN_COL_COUNT_ATTR = "frozenColCount";
+ public static final String CLIENT_ROW_KEY = "clientIndex";
public static int getFrozenColumnsCount(UIScrollableGrid grid) {
- return ((Integer)grid.getAttributes().get(FROZEN_COL_COUNT_ATTR)).intValue();
+ return getIntOr0(grid, FROZEN_COL_COUNT_ATTR);
}
+ public static int getClientRowIndex(UIScrollableGrid grid) {
+ return getIntOr0(grid, CLIENT_ROW_KEY);
+ }
+
+ public static int getIntOr0(UIComponent grid, String attribute) {
+ Object value = grid.getAttributes().get(attribute);
+ int i = 0;
+ if (value instanceof Number) {
+ i = ((Number) value).intValue();
+ }
+
+ return i;
+ }
+
}
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-08 14:12:06 UTC (rev 1098)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-06-08 14:38:45 UTC (rev 1099)
@@ -49,7 +49,6 @@
private final String COLUMN_NORMAL_TYPE = "normal";
- private String CLIENT_ROW_KEY = "clientIndex";
private RendererBase cellTemplate = null;
@@ -505,13 +504,17 @@
if(column.isSortable()){
- grid.getAttributes().put(CLIENT_ROW_KEY,sortStartRow);
+ grid.getAttributes().put(GridUtils.CLIENT_ROW_KEY,sortStartRow);
grid.setFirst(sortDataIndex);
grid.setRows(grid.getDefaultRows());
- System.out.println("rows " + grid.getRows() );
- System.out.println("client start index" + grid.getAttributes().get(CLIENT_ROW_KEY));
- System.out.println("data index " + grid.getFirst());
+ if (log.isDebugEnabled()) {
+
+ log.debug("rows " + grid.getRows() );
+ log.debug("client start index" + grid.getAttributes().get(GridUtils.CLIENT_ROW_KEY));
+ log.debug("data index " + grid.getFirst());
+
+ }
sorted = true;
SortEvent sortEvent = new SortEvent(grid,sortColumn, sortStartRow.intValue(), sortDataIndex, asc );
@@ -544,16 +547,16 @@
grid.setRows(Integer.parseInt(values[0]));
grid.setFirst(Integer.parseInt(values[1]));
- grid.getAttributes().put(CLIENT_ROW_KEY,Integer.valueOf(values[2]));
+ grid.getAttributes().put(GridUtils.CLIENT_ROW_KEY,Integer.valueOf(values[2]));
}else{
- grid.getAttributes().put(CLIENT_ROW_KEY, new Integer(0));
+ grid.getAttributes().put(GridUtils.CLIENT_ROW_KEY, new Integer(0));
}
if (log.isDebugEnabled()) {
log.debug("");
log.debug("row count: " + grid.getRows());
log.debug("data index: " + grid.getFirst()) ;
- log.debug("start row: " + grid.getAttributes().get(CLIENT_ROW_KEY));
+ log.debug("start row: " + grid.getAttributes().get(GridUtils.CLIENT_ROW_KEY));
}
}
@@ -568,7 +571,7 @@
state.setClientId(client_id);
state.setAjaxContext(ajaxContext);
- state.setRowIndex(((Integer)grid.getAttributes().get(CLIENT_ROW_KEY)).intValue());
+ state.setRowIndex(GridUtils.getClientRowIndex(grid));
if (log.isDebugEnabled()) {
log.debug("ScrollableGridBaseRenderer.renderAjaxChildren()");
@@ -605,7 +608,7 @@
private GridScrollSettings createOptions(UIScrollableGrid grid){
int index = grid.getFirst();
- int startRow = ((Integer)grid.getAttributes().get(CLIENT_ROW_KEY)).intValue();
+ int startRow = GridUtils.getClientRowIndex(grid);
int count = grid.getRows();
GridScrollSettings options = new GridScrollSettings(index, startRow, count);
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java 2007-06-08 14:12:06 UTC (rev 1098)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/SelectionRendererContributor.java 2007-06-08 14:38:45 UTC (rev 1099)
@@ -73,8 +73,10 @@
final GridRendererState state =
GridRendererState.createState(context, grid);
- final SimpleSelection simpleSelection = new SimpleSelection();
+ state.setRowIndex(GridUtils.getClientRowIndex(grid));
+ final SimpleSelection simpleSelection = grid.getSelection() == null ? new SimpleSelection() : (SimpleSelection) grid.getSelection();
+
try {
grid.walk(context,
new DataVisitor() {
@@ -93,6 +95,8 @@
}
+ state.nextRow();
+
}
},
state);
@@ -100,6 +104,7 @@
throw new FacesException(e);
}
+ grid.setSelection(simpleSelection);
GridRendererState.restoreState(context);
}
@@ -163,19 +168,24 @@
//Decide whether to add new row to selection based on comparison with old one
private boolean shouldAddToSelection(int i, ClientSelection oldSelection, ClientSelection newSelection) {
- return false;
+ return newSelection.isSelected(i) && !oldSelection.isSelected(i);
}
//Decide whether to remove new row to selection based on comparison with old one
private boolean shouldRemoveFromSelection(int i, ClientSelection oldSelection, ClientSelection newSelection) {
- return false;
+ return !newSelection.isSelected(i) && oldSelection.isSelected(i);
}
private void encodeSelection(FacesContext context, UIScrollableGrid grid) throws IOException {
final GridRendererState state = GridRendererState.createState(context, grid);
- final Selection gridSelection = new SimpleSelection();
+ state.setRowIndex(GridUtils.getClientRowIndex(grid));
+
+ final Selection gridSelection =
+ grid.getSelection() == null ?
+ new SimpleSelection() :
+ grid.getSelection();
final ClientSelection clientSelection = new ClientSelection();
grid.walk(context,
@@ -191,8 +201,8 @@
}
+ state.nextRow();
-
}
},
state);
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-06-08 14:12:06 UTC (rev 1098)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-06-08 14:38:45 UTC (rev 1099)
@@ -63,18 +63,19 @@
target.parentNode.replaceChild(src, target);
+ return src;
}
},
AJAX : {
- updateRows: function(options,request,grid,clientid){
+ updateRows: function(options,request,grid,clientid, callbacks){
var theDoc = document;
var getEl = theDoc.getElementById;
var localOptions = options;
var rowCount = grid.getBody().templFrozen.getElement().rows.length;
var startRow = localOptions.startRow;
var count = localOptions.count;
- var row, id, rowindex, i, el;
+ var rowindex, i, el;
var dataModel = grid.dataModel;
var baseid = clientid;
@@ -83,14 +84,29 @@
if(rowindex >= rowCount){
rowindex -= rowCount;
}
+ var id = baseid + ":f:" + rowindex;
+ var row = Utils.DOM.replaceNode(id, request);
+ id = baseid + ":n:" + rowindex;
+ row = Utils.DOM.replaceNode(id, request);
+
+
+ [":f:", ":n:"].each(
+ function(suffix) {
+ var id = baseid + suffix + rowindex;
+ var row = Utils.DOM.replaceNode(id, request);
+
+ if (callbacks) {
+ callbacks.each(
+ function(callback) {
+ callback.call(grid, {index : rowindex, row : row});
+ }
+ );
+ }
+
+ }
+ );
- id = baseid + ":f:" + rowindex;
- Utils.DOM.replaceNode(id, request);
-
- id = baseid + ":n:" + rowindex;
-
- Utils.DOM.replaceNode(id, request);
}
dataModel.eventDataReady.fire(localOptions);
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-06-08 14:12:06 UTC (rev 1098)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Grid.js 2007-06-08 14:38:45 UTC (rev 1099)
@@ -60,6 +60,7 @@
this.eventOnResizeColumn = new ClientUI.common.utils.CustomEvent('OnResizeColumn');
this.createControl();
+
},
createControl: function() {
//TODO: delete
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-08 14:12:06 UTC (rev 1098)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-06-08 14:38:45 UTC (rev 1099)
@@ -54,7 +54,6 @@
this.createControl(template);
this.registerEvents();
this.updateLayout();
- this.selectionManager = new ClientUI.controls.grid.SelectionManager(this.grid);
},
registerEvents: function() {
Event.observe(this.scrollBox.eventHScroll, "grid body hscroll", this._eventOnHScroll);
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-08 14:12:06 UTC (rev 1098)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-08 14:38:45 UTC (rev 1099)
@@ -25,6 +25,9 @@
];
this.init2 = this.init.bindAsEventListener(this);
+
+ this.rowCallbacks = [];
+
// this.init()
},
@@ -35,20 +38,27 @@
var progress = new ClientUI.common.box.SplashBox(this.splash_id, null, 300, true);
this.setProgressCtrl(progress);
Event.observe(this.eventOnSort, "on sort", this.onSorted.bindAsEventListener(this));
+ this.selectionManager = new ClientUI.controls.grid.SelectionManager(this);
},
onSortComplete : function(request, event, data){
var options = request.getJSON("options");
- Utils.AJAX.updateRows(options,request, this, this.client_id);
+ Utils.AJAX.updateRows(options,request,this,this.client_id, [this.updateSelectionCallBack]);
+ this.selectionManager.restoreState();
},
onScrollComplete : function(request, event, data){
var options = this.dataModel.getCurrentOptions();
- Utils.AJAX.updateRows(options,request,this,this.client_id);
+ Utils.AJAX.updateRows(options,request,this,this.client_id, [this.updateSelectionCallBack]);
+ this.selectionManager.restoreState();
},
onSorted: function(sortEvent) {
this.options.onSortAjaxUpdate(sortEvent);
+ },
+
+ updateSelectionCallBack: function(argMap) {
+ this.selectionManager.addListener(argMap.row, argMap.index);
}
});
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-06-08 14:12:06 UTC (rev 1098)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-06-08 14:38:45 UTC (rev 1099)
@@ -190,6 +190,9 @@
var gridElement = grid.getElement();
this.prefix = gridElement.id;
this.selection = new ClientUI.controls.grid.Selection();
+
+ this.inputElement = grid.options.selectionInput;
+
this.restoreState();
this.eventKeyPress = this.processKeyDown.bindAsEventListener(this);
Event.observe(document, "keypress", this.eventKeyPress);
@@ -213,6 +216,7 @@
Event.observe(gridElement, "click", this.eventPreventLostFocus);
+
// var selChangeHandler = this.grid.options.onselectionchange;
// if (selChangeHandler) {
// IL.Event.observe(this.grid.element, "selectionchange", selChangeHandler);
@@ -225,7 +229,7 @@
},
restoreState: function() {
- this.selection.initRanges($(this.prefix+":s").value);
+ this.selection.initRanges($(this.inputElement).value);
var i = 0;
var j;
while(i < this.selection.ranges.length) {
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUILib.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUILib.js 2007-06-08 14:12:06 UTC (rev 1098)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUILib.js 2007-06-08 14:38:45 UTC (rev 1099)
@@ -10,6 +10,7 @@
packages: [],
load: function(showLog) {
// Check for Prototype JavaScript framework
+ /*
if((typeof Prototype=='undefined') ||
(typeof Element == 'undefined') ||
(typeof Element.Methods=='undefined') ||
@@ -27,11 +28,11 @@
}).each( function(s) {
LibraryPath = s.src.replace(/ClientUILib\.js(\?.*)?$/,'');
});
-
- if(showLog) {
+ */
+ /*if(showLog) {
ClientUILogger.create("ClientUILogger");
this.startTime = (new Date()).getTime();
- }
+ }*/
this.initBrowser();
},
@@ -81,8 +82,21 @@
ClientUILib.log(ClientUILogger.INFO, "ClientUILib::declarePackage '" + libName + "'");
},
log: function(level, infoText) {
- if(ClientUILogger.isCreated)
- ClientUILogger.log(level, infoText);
+ //if(ClientUILogger.isCreated)
+ //ClientUILogger.log(level, infoText);
+ switch(level) {
+ case ClientUILogger.INFO:
+ LOG.info(infoText);
+ break;
+ case ClientUILogger.WARNING:
+ LOG.warn(infoText);
+ break;
+ case ClientUILogger.ERROR:
+ LOG.error(infoText);
+ break;
+ default:
+ LOG.debug(infoText);
+ }
},
initBrowser: function() {
var ua = navigator.userAgent.toLowerCase();
17 years, 7 months
JBoss Rich Faces SVN: r1098 - in trunk/richfaces: inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-08 10:12:06 -0400 (Fri, 08 Jun 2007)
New Revision: 1098
Modified:
trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowSelectedImage.java
trunk/richfaces/inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImage.java
trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java
trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java
trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java
trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImage.java
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/html/images/TreeImageBase.java
Log:
http://jira.jboss.com/jira/browse/RF-260
Modified: trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java
===================================================================
--- trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java 2007-06-08 12:19:40 UTC (rev 1097)
+++ trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowImage.java 2007-06-08 14:12:06 UTC (rev 1098)
@@ -31,8 +31,13 @@
protected Object getDataToStore(FacesContext context, Object data) {
Skin skin = SkinFactory.getInstance().getSkin(context);
- String tmp = (String) skin.getParameter(context, "generalTextColor");
- int intValue = HtmlColor.decode( tmp ==null? "#000000":tmp ).getRGB();
+ String skinParameter = "generalTextColor";
+ String tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ int intValue = HtmlColor.decode(tmp ==null? "#000000":tmp).getRGB();
return new Integer(intValue);
}
Modified: trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowSelectedImage.java
===================================================================
--- trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowSelectedImage.java 2007-06-08 12:19:40 UTC (rev 1097)
+++ trunk/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/html/images/SliderArrowSelectedImage.java 2007-06-08 14:12:06 UTC (rev 1098)
@@ -31,7 +31,12 @@
protected Object getDataToStore(FacesContext context, Object data) {
Skin skin = SkinFactory.getInstance().getSkin(context);
- String tmp = (String) skin.getParameter(context, "tipBorderColor");
+ String skinParameter = "tipBorderColor";
+ String tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
int intValue = HtmlColor.decode( tmp ==null? "#000000":tmp ).getRGB();
return new Integer(intValue);
}
Modified: trunk/richfaces/inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImage.java
===================================================================
--- trunk/richfaces/inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImage.java 2007-06-08 12:19:40 UTC (rev 1097)
+++ trunk/richfaces/inputnumber-spinner/src/main/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImage.java 2007-06-08 14:12:06 UTC (rev 1098)
@@ -42,7 +42,13 @@
protected Object getDataToStore(FacesContext context, Object data) {
Skin skin = SkinFactory.getInstance().getSkin(context);
- String tmp = (String) skin.getParameter(context, "headerTextColor");
+ String skinParameter = "headerTextColor";
+ String tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+
int intValue = HtmlColor.decode( tmp ==null? "#000000":tmp ).getRGB();
return new Integer(intValue);
}
Modified: trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java
===================================================================
--- trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java 2007-06-08 12:19:40 UTC (rev 1097)
+++ trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java 2007-06-08 14:12:06 UTC (rev 1098)
@@ -37,17 +37,28 @@
MenuNodeImageData mnd = new MenuNodeImageData();
Skin skin = SkinFactory.getInstance().getSkin(context);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
String tmp;
int intValue;
- tmp = (String) skin.getParameter(context,"generalTextColor");
- if (tmp == null) tmp = "#4A75B5";
+ String skinParameter = "generalTextColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ if (tmp == null || "".equals(tmp))
+ tmp = "#4A75B5";
intValue = HtmlColor.decode(tmp).getRGB();
mnd.setGeneralColor(new Integer(intValue));
- tmp = (String) skin.getParameter(context,"tabDisabledTextColor");
- if (tmp == null) tmp = "#6A92CF";
+ skinParameter = "tabDisabledTextColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ if (tmp == null || "".equals(tmp))
+ tmp = "#6A92CF";
intValue = HtmlColor.decode(tmp).getRGB();
mnd.setDisabledColor(new Integer(intValue));
Modified: trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java
===================================================================
--- trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java 2007-06-08 12:19:40 UTC (rev 1097)
+++ trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/BevelSeparatorImage.java 2007-06-08 14:12:06 UTC (rev 1098)
@@ -132,10 +132,20 @@
tmp = (String) skin.getParameter(context, "interfaceLevel3D");
separatorData.setLevel3D(HtmlDimensions.decode(tmp == null ? "5" : tmp).intValue());
- tmp = (String) skin.getParameter(context, "headerBackgroundColor");
+ String skinParameter = "headerBackgroundColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
separatorData.setBgColor(HtmlColor.decode(tmp == null ? "#4169E1" : tmp).getRGB());
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
- tmp = (String) skin.getParameter(context, "overAllBackground");
+ skinParameter = "overAllBackground";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
separatorData.setGradColor(HtmlColor.decode(tmp == null ? "#FFFFFF" : tmp).getRGB());
return separatorData;
Modified: trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java
===================================================================
--- trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java 2007-06-08 12:19:40 UTC (rev 1097)
+++ trunk/richfaces/separator/src/main/java/org/richfaces/renderkit/html/images/SimpleSeparatorImage.java 2007-06-08 14:12:06 UTC (rev 1098)
@@ -108,7 +108,12 @@
String tmp = (String) ((UIComponent) data).getAttributes().get("height");
separatorData.setHeight(HtmlDimensions.decode(tmp == null ? "6" : tmp).intValue());
- tmp = (String) skin.getParameter(context, "headerBackgroundColor");
+ String skinParameter = "headerBackgroundColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
separatorData.setColor(HtmlColor.decode(tmp == null ? "#4169E1" : tmp).getRGB());
//XXX by nick - fantonov - ((UISeparator)data).getLineType() ?
Modified: trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImage.java
===================================================================
--- trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImage.java 2007-06-08 12:19:40 UTC (rev 1097)
+++ trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/images/ToolBarSeparatorImage.java 2007-06-08 14:12:06 UTC (rev 1098)
@@ -50,17 +50,34 @@
protected Object getDataToStore(FacesContext context, Object data) {
SeparatorData separatorData = new SeparatorData();
Skin skin = SkinFactory.getInstance().getSkin(context);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
- String tmp = (String) skin.getParameter(context, "headerBackgroundColor");
+ String skinParameter = "headerBackgroundColor";
+ String tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
separatorData.setHeaderBackgroundColor(HtmlColor.decode( tmp == null ? "#224986" : tmp ).getRGB());
- tmp = (String) skin.getParameter(context, "headerGradientColor");
+ skinParameter = "headerGradientColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
separatorData.setHeaderGradientColor(HtmlColor.decode( tmp == null ? "#CCCCFF" : tmp).getRGB());
- tmp = (String) skin.getParameter(context, "headerTextColor");
+ skinParameter = "headerTextColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
separatorData.setHeaderTextColor(HtmlColor.decode( tmp == null ? "#000000" : tmp ).getRGB());
- tmp = (String) skin.getParameter(context, "headerSizeFont");
+ skinParameter = "headerSizeFont";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
separatorData.setFontSize(HtmlDimensions.decode( tmp == null ? "11px" : tmp ).intValue());
separatorData.setSeparatorHeight(resolveBarHeight(data));
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/html/images/TreeImageBase.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/html/images/TreeImageBase.java 2007-06-08 12:19:40 UTC (rev 1097)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/html/images/TreeImageBase.java 2007-06-08 14:12:06 UTC (rev 1098)
@@ -46,23 +46,40 @@
String tmp;
int intValue;
Skin skin = SkinFactory.getInstance().getSkin(context);
- tmp = (String) skin.getParameter(context,"generalTextColor");
- if (tmp != null) {
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+
+ String skinParameter = "generalTextColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ if (tmp != null && !"".equals(tmp)) {
intValue = HtmlColor.decode(tmp).getRGB();
dt.setGeneralColor(new Integer(intValue));
- } else dt.setGeneralColor(null);
+ } else
+ dt.setGeneralColor(null);
- tmp = (String) skin.getParameter(context,"controlBackgroundColor");
- if (tmp != null) {
+ skinParameter = "controlBackgroundColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ if (tmp != null && !"".equals(tmp)) {
intValue = HtmlColor.decode(tmp).getRGB();
dt.setControlColor(new Integer(intValue));
- } else dt.setControlColor(null);
+ } else
+ dt.setControlColor(null);
- tmp = (String) skin.getParameter(context,"trimColor");
- if (tmp != null) {
+ skinParameter = "trimColor";
+ tmp = (String) skin.getParameter(context, skinParameter);
+ if (null == tmp || "".equals(tmp)) {
+ tmp = (String) defaultSkin.getParameter(context, skinParameter);
+ }
+ if (tmp != null && !"".equals(tmp)) {
intValue = HtmlColor.decode(tmp).getRGB();
dt.setTrimColor(new Integer(intValue));
- } else dt.setTrimColor(null);
+ } else
+ dt.setTrimColor(null);
return dt;
}
17 years, 7 months