JBoss Rich Faces SVN: r6868 - trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-17 12:04:35 -0400 (Mon, 17 Mar 2008)
New Revision: 6868
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
http://jira.jboss.com/jira/browse/RF-2423
see method tmpValueKeyDownHandler
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-17 15:49:26 UTC (rev 6867)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-17 16:04:35 UTC (rev 6868)
@@ -139,7 +139,8 @@
this.cancel();
break;
case Event.KEY_RETURN :
- //TO DO
+ this.inputProcessing();
+ Event.stop(e);
break;
case Event.KEY_TAB :
this.inputProcessing();
16 years, 10 months
JBoss Rich Faces SVN: r6867 - trunk/ui/inplaceSelect/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-17 11:49:26 -0400 (Mon, 17 Mar 2008)
New Revision: 6867
Modified:
trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml
Log:
http://jira.jboss.com/jira/browse/RF-2510
Modified: trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml
===================================================================
--- trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml 2008-03-17 15:49:03 UTC (rev 6866)
+++ trunk/ui/inplaceSelect/src/main/config/component/inplaceselect.xml 2008-03-17 15:49:26 UTC (rev 6867)
@@ -40,7 +40,7 @@
<name>editEvent</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA["click"]]></defaultvalue>
+ <defaultvalue><![CDATA["onclick"]]></defaultvalue>
</property>
<property>
<name>maxSelectWidth</name>
16 years, 10 months
JBoss Rich Faces SVN: r6866 - in trunk/ui/inplaceInput/src/main: java/org/richfaces/renderkit and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-17 11:49:03 -0400 (Mon, 17 Mar 2008)
New Revision: 6866
Modified:
trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml
trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
http://jira.jboss.com/jira/browse/RF-2510
Modified: trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml
===================================================================
--- trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml 2008-03-17 15:45:18 UTC (rev 6865)
+++ trunk/ui/inplaceInput/src/main/config/component/inplaceinput.xml 2008-03-17 15:49:03 UTC (rev 6866)
@@ -74,7 +74,7 @@
<name>editEvent</name>
<classname>java.lang.String</classname>
<description></description>
- <defaultvalue><![CDATA["click"]]></defaultvalue>
+ <defaultvalue><![CDATA["onclick"]]></defaultvalue>
</property>
<property>
<name>controlsVerticalPosition</name>
Modified: trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
===================================================================
--- trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-03-17 15:45:18 UTC (rev 6865)
+++ trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-03-17 15:49:03 UTC (rev 6866)
@@ -5,11 +5,9 @@
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
import javax.faces.convert.Converter;
import org.ajax4jsf.javascript.JSFunctionDefinition;
-import org.ajax4jsf.renderkit.ComponentVariables;
import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
import org.ajax4jsf.util.InputUtils;
import org.apache.commons.logging.Log;
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-17 15:45:18 UTC (rev 6865)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-17 15:49:03 UTC (rev 6866)
@@ -26,12 +26,15 @@
this.bar = new Richfaces.InplaceInputBar(barParams[0], barParams[1], barParams[2], barParams[3], barParams[4],
this.attributes.verticalPosition, this.attributes.horizontalPosition);
}
+
+ this.editEvent = this.attributes.editEvent.substring(2,this.attributes.editEvent.length);
+
this.initHandlers();
this.initEvents();
},
initHandlers : function() {
- this.inplaceInput.observe(this.attributes.editEvent, function(e){this.switchingStatesHandler(e);}.bindAsEventListener(this));
+ this.inplaceInput.observe(this.editEvent, function(e){this.switchingStatesHandler(e);}.bindAsEventListener(this));
this.inplaceInput.observe("mouseout", function(e){this.inplaceMouseOutHandler(e);}.bindAsEventListener(this));
this.inplaceInput.observe("mouseover", function(e){this.inplaceMouseOverHandler(e);}.bindAsEventListener(this));
16 years, 10 months
JBoss Rich Faces SVN: r6865 - in trunk/ui/listShuttle/src/main: java/org/richfaces/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-03-17 11:45:18 -0400 (Mon, 17 Mar 2008)
New Revision: 6865
Modified:
trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
trunk/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
Log:
bugs RF-2016,RF-2015
Modified: trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2008-03-17 15:27:52 UTC (rev 6864)
+++ trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2008-03-17 15:45:18 UTC (rev 6865)
@@ -404,17 +404,11 @@
</property>
<property>
- <name>moveControlsVerticalAlign</name>
+ <name>controlsVerticalAlign</name>
<classname>java.lang.String</classname>
- <description>Customizes vertically a position of move/copy controls relatively to lists</description>
+ <description>Customizes vertically a position of move/copy and order controls relatively to lists</description>
<defaultvalue><![CDATA["middle"]]></defaultvalue>
</property>
- <property>
- <name>orderControlsVerticalAlign</name>
- <classname>java.lang.String</classname>
- <description>Customizes vertically a position of order controls relatively to lists</description>
- <defaultvalue><![CDATA["middle"]]></defaultvalue>
- </property>
<property>
<name>listClass</name>
<classname>java.lang.String</classname>
Modified: trunk/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java
===================================================================
--- trunk/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2008-03-17 15:27:52 UTC (rev 6864)
+++ trunk/ui/listShuttle/src/main/java/org/richfaces/component/UIListShuttle.java 2008-03-17 15:45:18 UTC (rev 6865)
@@ -657,6 +657,9 @@
}
}
+ public abstract String getControlsVerticalAlign();
+ public abstract void setControlsVerticalAlign(String controlsVerticalAlign);
+
public abstract boolean isOrderControlsVisible();
public abstract void setOrderControlsVisible(boolean visible);
@@ -669,12 +672,6 @@
public abstract boolean isFastMoveControlsVisible();
public abstract void setFastMoveControlsVisible(boolean visible);
- public abstract String getOrderControlsVerticalAlign();
- public abstract void setOrderControlsVerticalAlign(String align);
-
- public abstract String getMoveControlsVerticalAlign();
- public abstract void setMoveControlsVerticalAlign(String align);
-
public abstract String getListClass();
public abstract void setListClass(String listClass);
Modified: trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-03-17 15:27:52 UTC (rev 6864)
+++ trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2008-03-17 15:45:18 UTC (rev 6865)
@@ -114,7 +114,7 @@
</table>
</div>
</td>
- <td style="vertical-align: #{component.moveControlsVerticalAlign};" >
+ <td style="vertical-align: #{component.controlsVerticalAlign};" >
<div class="rich-shuttle-controls">
<jsp:scriptlet><![CDATA[
encodeShuttleControlsFacets(context, component, sourceSelectionState, targetSelectionState);
@@ -175,7 +175,7 @@
</table>
</div>
</td>
- <td style="vertical-align: #{component.orderControlsVerticalAlign};" >
+ <td style="vertical-align: #{component.controlsVerticalAlign};" >
<div class="rich-shuttle-controls">
<jsp:scriptlet><![CDATA[
encodeTLControlsFacets(context, component, targetSelectionState);
16 years, 10 months
JBoss Rich Faces SVN: r6864 - in trunk/ui/progressBAR/src/main/java/org/richfaces: renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-03-17 11:27:52 -0400 (Mon, 17 Mar 2008)
New Revision: 6864
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
Log:
RF-2541
Modified: trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
===================================================================
--- trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-03-17 15:17:20 UTC (rev 6863)
+++ trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-03-17 15:27:52 UTC (rev 6864)
@@ -248,7 +248,7 @@
* @return result
*/
public Number getNumber(Object v) {
- Number result = new Integer(0);
+ Number result = null;
if (v != null) {
try {
if (v instanceof String) { // String
@@ -259,7 +259,7 @@
|| (n instanceof Float)) {
result = n.floatValue();
} else if (n instanceof Integer || n instanceof Long) { // Integer
- result = n.intValue();
+ result = n.longValue();
}
}
} catch (Exception e) {
Modified: trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
===================================================================
--- trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-03-17 15:17:20 UTC (rev 6863)
+++ trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-03-17 15:27:52 UTC (rev 6864)
@@ -608,7 +608,7 @@
* @return result
*/
public Number getNumber(Object v) {
- Number result = new Integer(0);
+ Number result = null;
if (v != null) {
try {
if (v instanceof String) {
@@ -619,7 +619,7 @@
|| n instanceof Float) {
result = n.floatValue();
} else if (n instanceof Integer || n instanceof Long) {
- result = n.intValue();
+ result = n.longValue();
}
}
} catch (Exception e) {
16 years, 10 months
JBoss Rich Faces SVN: r6863 - trunk/ui/progressBAR/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-03-17 11:17:20 -0400 (Mon, 17 Mar 2008)
New Revision: 6863
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
Log:
http://jira.jboss.com/jira/browse/RF-2535
Modified: trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
===================================================================
--- trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-03-17 14:51:44 UTC (rev 6862)
+++ trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-03-17 15:17:20 UTC (rev 6863)
@@ -27,6 +27,8 @@
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.RendererUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.richfaces.renderkit.AbstractProgressBarRenderer;
/**
@@ -38,6 +40,9 @@
// TODO add @since declaration
public abstract class UIProgressBar extends UIPoll {
+ /** Logger */
+ private final Log logger = LogFactory.getLog(UIProgressBar.class);
+
/** Component type */
public static final String COMPONENT_TYPE = "org.richfaces.ProgressBar";
@@ -93,7 +98,6 @@
String clientId = this.getClientId(facesContext);
if (!params.containsKey(clientId)) {
- System.out.println("Return from broadcast");
return;
}
@@ -112,19 +116,20 @@
.setResponseData(getResponseData(value, facesContext));
Object reRender = this.getAttributes().get(AjaxRendererUtils.AJAX_REGIONS_ATTRIBUTE);
- Set ajaxRegions = AjaxRendererUtils.asSet(reRender);
+ Set<String> ajaxRegions = AjaxRendererUtils.asSet(reRender);
if (ajaxRegions != null) {
- for (Iterator iter = ajaxRegions.iterator(); iter.hasNext();) {
- String id = iter.next().toString();
+ for (Iterator<String> iter = ajaxRegions.iterator(); iter.hasNext();) {
+ String id = iter.next();
ajaxContext.addComponentToAjaxRender(this, id);
}
}
} else if (params.containsKey(FORCE_PERCENT_PARAM)) {
- System.out.println("Force state: " + this.getClientId(facesContext));
- ajaxContext.addComponentToAjaxRender(this);
+ if (logger.isDebugEnabled()) {
+ logger.debug("Force state: " + this.getClientId(facesContext));
+ }
+ ajaxContext.addComponentToAjaxRender(this);
}
-
}
}
16 years, 10 months
JBoss Rich Faces SVN: r6862 - trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-17 10:51:44 -0400 (Mon, 17 Mar 2008)
New Revision: 6862
Modified:
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
Log:
http://jira.jboss.com/jira/browse/RF-2362
Modified: trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
--- trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-03-17 14:51:09 UTC (rev 6861)
+++ trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-03-17 14:51:44 UTC (rev 6862)
@@ -126,10 +126,6 @@
onkeydownHandler : function(event, component) {
component._onkeydownHandler(event);
this.controlListManager();
-
- if (event.keyCode != Event.KEY_TAB) {
- Event.stop(event);
- }
},
controlsProcessing : function(disabledControls , action) {
16 years, 10 months
JBoss Rich Faces SVN: r6861 - trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-17 10:51:09 -0400 (Mon, 17 Mar 2008)
New Revision: 6861
Modified:
trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
Log:
http://jira.jboss.com/jira/browse/RF-2362
Modified: trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js
===================================================================
--- trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2008-03-17 14:46:54 UTC (rev 6860)
+++ trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/ListBase.js 2008-03-17 14:51:09 UTC (rev 6861)
@@ -185,18 +185,20 @@
case 38 : //up arrow
action = 'up';
this.moveActiveItem(action, event);
+ Event.stop(event);
break;
case 40 : //down arrow
action = 'down';
this.moveActiveItem(action, event);
+ Event.stop(event);
break;
case 65 : // Ctrl + A
if (event.ctrlKey) {
this.selectAll();
- Event.stop(event);
}
this.activeItem.item.doActive(this.getExtRowClass(this.activeItem.rowIndex), this.columnsClasses);
//this.saveState();
+ Event.stop(event);
break;
}
},
Modified: trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js
===================================================================
--- trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2008-03-17 14:46:54 UTC (rev 6860)
+++ trunk/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/OrderingList.js 2008-03-17 14:51:09 UTC (rev 6861)
@@ -144,8 +144,14 @@
onkeydownHandler : function(event) {
var action = null;
switch (event.keyCode) {
- case 34 : action = 'last'; this.moveSelectedItems(action ,event); break; //page down
- case 33 : action = 'first'; this.moveSelectedItems(action, event); break; //page up
+ case 34 : action = 'last';
+ this.moveSelectedItems(action ,event);
+ Event.stop(event);
+ break; //page down
+ case 33 : action = 'first';
+ this.moveSelectedItems(action, event);
+ Event.stop(event);
+ break; //page up
case 38 : //up arrow
action = 'up';
if (event.ctrlKey) {
@@ -153,6 +159,7 @@
} else {
this.moveActiveItem(action, event);
}
+ Event.stop(event);
break;
case 40 : //down arrow
action = 'down';
@@ -161,15 +168,16 @@
} else {
this.moveActiveItem(action, event);
}
+ Event.stop(event);
break;
case 65 : // Ctrl + A
if (event.ctrlKey) {
this.selectAll();
- Event.stop(event);
}
this.activeItem.item.doActive(this.getExtRowClass(this.activeItem.rowIndex), this.columnsClasses);
//this.saveState();
this.controlListManager();
+ Event.stop(event);
break;
}
},
16 years, 10 months
JBoss Rich Faces SVN: r6860 - trunk/ui/pickList/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-17 10:46:54 -0400 (Mon, 17 Mar 2008)
New Revision: 6860
Modified:
trunk/ui/pickList/src/main/templates/htmlPickList.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2549
Modified: trunk/ui/pickList/src/main/templates/htmlPickList.jspx
===================================================================
--- trunk/ui/pickList/src/main/templates/htmlPickList.jspx 2008-03-17 14:45:46 UTC (rev 6859)
+++ trunk/ui/pickList/src/main/templates/htmlPickList.jspx 2008-03-17 14:46:54 UTC (rev 6860)
@@ -155,19 +155,22 @@
<script type="text/javascript">
var clientId = '#{clientId}';
- Event.onReady(function() {
- var cotrolsIdPrefix = [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']];
- var listShuttleCotrolsIdPrefix = [['copy', 'discopy'], ['copyAll', 'discopyAll'], ['remove', 'disremove'], ['removeAll','disremoveAll']];
+ RichShuttleUtils.execOnLoad(
+ function(){
+ var cotrolsIdPrefix = [['up', 'disup'], ['down', 'disdown'], ['last', 'dislast'], ['first','disfirst']];
+ var listShuttleCotrolsIdPrefix = [['copy', 'discopy'], ['copyAll', 'discopyAll'], ['remove', 'disremove'], ['removeAll','disremoveAll']];
- var sourceLayoutManager = new LayoutManager('#{clientId}internal_header_tab', '#{clientId}internal_tab');
- var targetLayoutManager = new LayoutManager('#{clientId}tlInternal_header_tab', '#{clientId}tlInternal_tab');
+ var sourceLayoutManager = new LayoutManager('#{clientId}internal_header_tab', '#{clientId}internal_tab');
+ var targetLayoutManager = new LayoutManager('#{clientId}tlInternal_header_tab', '#{clientId}tlInternal_tab');
- var listShuttle = new Richfaces.PickList(new Richfaces.PickList.Target('#{clientId}', '#{clientId}tlInternal_tab', '#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper', undefined, Richfaces.PickList.Target.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
+ var listShuttle = new Richfaces.PickList(new Richfaces.PickList.Target('#{clientId}', '#{clientId}tlInternal_tab', '#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper', undefined, Richfaces.PickList.Target.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
new Richfaces.PickList.Source('#{clientId}', '#{clientId}internal_tab', '#{clientId}internal_header_tab', '#{clientId}focusKeeper', undefined, Richfaces.PickList.Source.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
"#{clientId}", listShuttleCotrolsIdPrefix, "#{switchByClick}", sourceLayoutManager, targetLayoutManager, #{this:getAsEventHandler(context, component, "onlistchanged")},
"#{clientId}valueKeeper");
- sourceLayoutManager.widthSynchronization();
- targetLayoutManager.widthSynchronization();
- });
+ sourceLayoutManager.widthSynchronization();
+ targetLayoutManager.widthSynchronization();
+ },
+ RichShuttleUtils.Condition.ElementPresent("#{clientId}"), 100
+ );
</script>
</f:root>
\ No newline at end of file
16 years, 10 months
JBoss Rich Faces SVN: r6859 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-03-17 10:45:46 -0400 (Mon, 17 Mar 2008)
New Revision: 6859
Added:
trunk/docs/userguide/en/src/main/resources/images/columnFilt1.png
trunk/docs/userguide/en/src/main/resources/images/columnsort1.png
trunk/docs/userguide/en/src/main/resources/images/columnsort2.png
Modified:
trunk/docs/userguide/en/src/main/docbook/included/column.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/column.xml
trunk/docs/userguide/en/src/main/docbook/included/columns.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml
Log:
RF-1740 - Added new key feature for dataTable,columns and column components.
Sorting:added new section in <rich:column> chapter and added information, examples code and screens.
Filtering: added new section in <rich:column> chapter and added information, example code and screen.
Modified: trunk/docs/userguide/en/src/main/docbook/included/column.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/column.desc.xml 2008-03-17 14:45:17 UTC (rev 6858)
+++ trunk/docs/userguide/en/src/main/docbook/included/column.desc.xml 2008-03-17 14:45:46 UTC (rev 6859)
@@ -23,6 +23,7 @@
<listitem>Completely skinned table rows and child elements</listitem>
<listitem>Possibility to combine columns with the help of <emphasis ><property>"colspan"</property></emphasis></listitem>
<listitem>Possibility to combine rows with the help of <emphasis ><property>"rowspan"</property></emphasis> and <emphasis ><property>"breakBefore"</property></emphasis></listitem>
+ <listitem>Possibility to sort and to filter of columns</listitem>
</itemizedlist>
</section>
</section>
\ No newline at end of file
Modified: trunk/docs/userguide/en/src/main/docbook/included/column.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/column.xml 2008-03-17 14:45:17 UTC (rev 6858)
+++ trunk/docs/userguide/en/src/main/docbook/included/column.xml 2008-03-17 14:45:46 UTC (rev 6859)
@@ -181,12 +181,197 @@
component, it becomes possible to group easily the rows with special HTML attribute.</para>
<para>The columns also could be grouped in a particular way with the help of the <emphasis role="bold"><property><h:columnGroup></property></emphasis>
component that is described in <link linkend="columnGroup">the following chapter</link>.</para>
- </section>
+</section>
+
+ <section>
+ <title id="sortAndFilter">Sorting and Filtering</title>
+ <section>
+ <title>Sorting</title>
+ <para>In order to sort the columns you should use <emphasis><property>"sortBy"</property></emphasis> attribute which defines a bean property which is used for sorting of a column.</para>
+ <para>By default, the first column sorted in ascending. Below you can see code example:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<h:form>
+ <rich:dataTable value="#{capitalsBean.capitals}" var="cap" width="300px">
+ <f:facet name="header">
+ <h:outputText value="Sorting Example"/>
+ </f:facet>
+ <rich:column sortBy="#{cap.state}">
+ <f:facet name="header">
+ <h:outputText value="State Name"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{cap.state}"></h:outputText>
+ </rich:column>
+ <rich:column sortBy="#{cap.name}">
+ <f:facet name="header">
+ <h:outputText value="State Capital"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{cap.name}"/>
+ </rich:column>
+ </rich:dataTable>
+</h:form>
+...
+]]></programlisting>
+ <para>This is result:</para>
+ <figure>
+ <title>Example sorting first column in ascending</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/columnsort1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In order to sort the data in descending order, you should double-click on the header of column, which you want to sort.</para>
+ <para><emphasis><property>"sortOrder"</property></emphasis> attribute may be possible in three states:
+ <itemizedlist>
+ <listitem>
+ <emphasis><property>"none"</property></emphasis>
+ </listitem>
+ <listitem>
+ <emphasis><property>"ascending"</property></emphasis>
+ </listitem>
+ <listitem>
+ <emphasis><property>"descending"</property></emphasis>.
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>By default, data in the columns is not sorted.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<h:panelGrid columns="2" columnClasses="top">
+ <rich:dataTable value="#{dataTableScrollerBean.allCars}" var="category" rows="5" id="table">
+ <rich:column id="make" sortBy="#{category.make}" sortOrder="#{sortingBean.makeDirection}">
+ <f:facet name="header"><h:outputText styleClass="headerText" value="Make" />
+ <h:outputText value="#{category.make}" />
+ </rich:column>
+ <rich:column id="model" sortBy="#{category.model}" sortOrder="#{sortingBean.modelDirection}">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Model" />
+ </f:facet>
+ <h:outputText value="#{category.model}" />
+ </rich:column>
+ <rich:column id="price" sortBy="#{category.price}" sortOrder="#{sortingBean.priceDirection}">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Price" />
+ </f:facet>
+ <h:outputText value="#{category.price}" />
+ </rich:column>
+ <rich:column id="mileage" sortBy="#{category.mileage}" sortOrder="#{sortingBean.mileageDirection}">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Mileage" />
+ </f:facet>
+ <h:outputText value="#{category.mileage}" />
+ </rich:column>
+ <rich:column width="200px" id="vin">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="VIN" />
+ </f:facet>
+ <h:outputText value="#{category.vin}" />
+ </rich:column>
+ <rich:column id="stock">
+ <f:facet name="header">
+ <h:outputText styleClass="headerText" value="Stock" />
+ </f:facet>
+ <h:outputText value="#{category.stock}" />
+ </rich:column>
+</rich:dataTable>
+...]]></programlisting>
+ <para>Below you can see result:</para>
+ <figure>
+ <title>Sorting using the example of the <emphasis><property>"sortOrder"</property></emphasis> attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/columnsort2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><emphasis><property>"selfSorted"</property></emphasis> attribute will manage if it's header will be clickable, icons rendered and sorting will be fired after click on the header.
+ So, developer will be able to define the <emphasis><property>sortBy</property></emphasis> property and conditionally use internal sorting.</para>
+ <para>The default attribute is set to <emphasis><property>"true"</property></emphasis>.</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<h:form>
+ <rich:dataTable value="#{capitalsBean.capitals}" var="cap" width="300px" columnClasses="center">
+ <f:facet name="header">
+ <h:outputText value="Sorting Example"/>
+ </f:facet>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="State Flag"></h:outputText>
+ </f:facet>
+ <h:graphicImage value="#{cap.stateFlag}"/>
+ </rich:column>
+ <rich:column sortBy="#{cap.state}" selfSorted="false">
+ <f:facet name="header">
+ <h:outputText value="State Name"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{cap.state}"></h:outputText>
+ </rich:column>
+ <rich:column sortBy="#{cap.name}">
+ <f:facet name="header">
+ <h:outputText value="State Capital"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{cap.name}"/>
+ </rich:column>
+ </rich:dataTable>
+</h:form>
+...
+]]></programlisting>
+ <para>As a result, the second column will be unavailable for sorting.</para>
+ <para>Sorting can't be used together with pagination.</para>
+ </section>
+ <section>
+ <title>Filtering</title>
+ <para>In order to filter the column value, in accordance with the entered value, it is necessary to use a <emphasis><property>"filterBy"</property></emphasis> attribute.</para>
+ <para>Below you can see example code and the result of its use:</para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<h:form>
+ <rich:dataTable value="#{capitalsBean.capitals}" var="cap" width="500px">
+ <f:facet name="header">
+ <h:outputText value="Filtering Example"/>
+ </f:facet>
+ <rich:column>
+ <f:facet name="header">
+ <h:graphicImage value="/images/ico_DataTable.gif"></h:graphicImage>
+ </f:facet>
+ <h:graphicImage value="#{cap.stateFlag}"/>
+ </rich:column>
+ <rich:column filterBy="#{cap.state}" filterDefaultLabel="click to filter">
+ <h:outputText value="#{cap.state}"></h:outputText>
+ </rich:column>
+ <rich:column filterBy="#{cap.name}" filterDefaultLabel="click to filter">
+ <h:outputText value="#{cap.name}"/>
+ </rich:column>
+ </rich:dataTable>
+</h:form>
+...
+]]></programlisting>
+ <figure>
+ <title>Filtering using the example of the <emphasis><property>"filterBy"</property></emphasis> attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/columnFilt1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ </section>
+
<section>
<title>Look-and-Feel Customization</title>
<para>For skinnability implementation, the components use a <emphasis>
- <property>style class redefinition method.</property>
+ <property>style class redefinition method</property>.
</emphasis> Default style classes are mapped on <emphasis>
<property>skin parameters.</property>
</emphasis></para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/columns.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/columns.desc.xml 2008-03-17 14:45:17 UTC (rev 6858)
+++ trunk/docs/userguide/en/src/main/docbook/included/columns.desc.xml 2008-03-17 14:45:46 UTC (rev 6859)
@@ -28,6 +28,7 @@
<listitem>Dynamic tables creation</listitem>
<listitem>Possibility to combine columns with the help of <emphasis ><property>"colspan"</property></emphasis> and <emphasis ><property>"breakBefore"</property></emphasis></listitem>
<listitem>Possibility to combine rows with the help of <emphasis ><property>"rowspan"</property></emphasis> </listitem>
+ <listitem>Possibility to sort and to filter of columns</listitem>
</itemizedlist>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml 2008-03-17 14:45:17 UTC (rev 6858)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataTable.desc.xml 2008-03-17 14:45:46 UTC (rev 6859)
@@ -26,6 +26,7 @@
<property>"colGroup"</property> and
<property>"subTable"</property></listitem>
<listitem>Possibility to update a limited set of strings with AJAX</listitem>
+ <listitem>Possibility to sort and to filter of columns</listitem>
</itemizedlist>
</section>
</section>
Added: trunk/docs/userguide/en/src/main/resources/images/columnFilt1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/columnFilt1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/columnsort1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/columnsort1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/columnsort2.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/columnsort2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 10 months