JBoss Rich Faces SVN: r3566 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-10-26 09:44:21 -0400 (Fri, 26 Oct 2007)
New Revision: 3566
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
RF-1132
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-10-26 13:41:35 UTC (rev 3565)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-10-26 13:44:21 UTC (rev 3566)
@@ -453,8 +453,6 @@
this.todayDate = new Date();
- this.selectedDateCellId = null;
-
this.firstWeekendDayNumber = 6-this.params.firstWeekDay;
this.secondWeekendDayNumber = (this.params.firstWeekDay>0 ? 7-this.params.firstWeekDay : 0);
@@ -476,6 +474,9 @@
this.days = [];
this.todayCellId = null;
this.todayCellColor = "";
+
+ this.selectedDateCellId = null;
+ this.selectedDateCellColor = "";
var obj=$(id);
@@ -922,6 +923,45 @@
return daysData;
},
+ getCellBackgroundColor: function(element)
+ {
+ var result;
+ if (Richfaces.browser.isSafari && this.params.popup && !this.isVisible)
+ {
+ // Safari 2.0 fix
+ // if [display:none] Element.getStyle() function returns null;
+ var els = $(this.id).style;
+ var originalVisibility = els.visibility;
+ var originalDisplay = els.display;
+ els.visibility = 'hidden';
+ els.display = '';
+ result = Element.getStyle(element, 'background-color').parseColor();
+ els.display = originalDisplay;
+ els.visibility = originalVisibility;
+ } else
+ {
+ result = Element.getStyle(element, 'background-color').parseColor();
+ }
+
+ return result;
+ },
+
+ clearEffect: function (element_id, effect, className)
+ {
+ if (effect)
+ {
+ effect.cancel();
+ effect=null;
+ }
+ if (element_id)
+ {
+ var e = $(element_id);
+ e.style['backgroundColor'] = '';
+ if (className) Element.removeClassName(e, className);
+ }
+ return null;
+ },
+
render:function() {
this.todayDate = new Date();
@@ -1013,24 +1053,11 @@
var boundaryDatesModeFlag = (this.params.boundaryDatesMode == "scroll" || this.params.boundaryDatesMode == "select");
- if (this.highlightEffect)
- {
- this.highlightEffect.cancel();
- this.highlightEffect=null;
- }
- if (this.todayCellId)
- {
- $(this.todayCellId).style['backgroundColor'] = '';
- this.todayCellId = null;
- }
+ this.todayCellId = this.clearEffect(this.todayCellId, this.highlightEffect, "rich-calendar-today");
+ this.selectedDateCellId = this.clearEffect(this.selectedDateCellId, this.highlightEffect2, "rich-calendar-select");
//var _d=new Date();
- if (this.selectedDateCellId) {
- Element.classNames(this.selectedDateCellId).remove("rich-calendar-select");
- this.selectedDateCellId = null;
- }
-
for (var k=1;k<7;k++)
{
//
@@ -1118,32 +1145,14 @@
if (todayflag && dataobj._month==0 && dataobj.day==todaydate)
{
this.todayCellId = element.id;
-
- if (Richfaces.browser.isSafari && this.params.popup && !this.isVisible)
- {
- // Safari 2.0 fix
- // if [display:none] Element.getStyle() function returns null;
- var els = $(this.id).style;
- var originalVisibility = els.visibility;
- var originalDisplay = els.display;
- els.visibility = 'hidden';
- els.display = '';
- this.todayCellColor = Element.getStyle(element, 'background-color').parseColor();
- els.display = originalDisplay;
- els.visibility = originalVisibility;
- } else
- {
- this.todayCellColor = Element.getStyle(element, 'background-color').parseColor();
- }
+ this.todayCellColor = this.getCellBackgroundColor(element);
e.add("rich-calendar-today");
}
- else
+
+ if (selectedflag && dataobj._month==0 && dataobj.day==selecteddate)
{
- e.remove("rich-calendar-today");
- }
-
- if (selectedflag && dataobj._month==0 && dataobj.day==selecteddate) {
this.selectedDateCellId = element.id;
+ this.selectedDateCellColor = this.getCellBackgroundColor(element);
e.add("rich-calendar-select");
}
@@ -1261,18 +1270,13 @@
else
{
// highlight today
+
if (this.isVisible && this.todayCellId && !noHighlight)
{
- if (this.highlightEffect)
- {
- this.highlightEffect.cancel();
- this.highlightEffect=null;
- }
- var e = $(this.todayCellId);
- e.style['backgroundColor'] = '';
+ this.clearEffect(this.todayCellId, this.highlightEffect);
if (this.todayCellColor!="transparent")
{
- this.highlightEffect = new Effect.Highlight(e, {startcolor: this.todayCellColor, duration:0.3, transition: Effect.Transitions.sinoidal,
+ this.highlightEffect = new Effect.Highlight($(this.todayCellId), {startcolor: this.todayCellColor, duration:0.3, transition: Effect.Transitions.sinoidal,
afterFinish: this.onHighlightFinish});
}
}
@@ -1326,8 +1330,10 @@
{
// find cell and change style class
var e = $(this.DATE_ELEMENT_ID+(this.firstDateIndex + this.selectedDate.getDate()-1));
- if (this.selectedDateCellId) Element.removeClassName(this.selectedDateCellId, "rich-calendar-select");
+
+ this.clearEffect(this.selectedDateCellId, this.highlightEffect2, "rich-calendar-select");
this.selectedDateCellId = e.id;
+ this.selectedDateCellColor = this.getCellBackgroundColor(e);
Element.addClassName(e, "rich-calendar-select");
this.renderHeader();
@@ -1344,9 +1350,11 @@
{
this.selectedDate = null;
field.value = "";
+
+ this.clearEffect(this.selectedDateCellId, this.highlightEffect2, "rich-calendar-select");
+
if (this.selectedDateCellId)
{
- Element.removeClassName(this.selectedDateCellId, "rich-calendar-select");
this.selectedDateCellId = null;
this.renderHeader();
this.renderFooter();
@@ -1377,12 +1385,10 @@
if (this.invokeEvent("dateselect", null, null, null))
{
this.selectedDate = null;
- $(this.INPUT_DATE_ID).value = "";
- if (this.selectedDateCellId)
- {
- Element.removeClassName(this.selectedDateCellId, "rich-calendar-select");
- this.selectedDateCellId = null;
- }
+ $(this.INPUT_DATE_ID).value = "";
+
+ this.selectedDateCellId = this.clearEffect(this.selectedDateCellId, this.highlightEffect2, "rich-calendar-select");
+
this.renderHeader();
this.renderFooter();
this.doCollapse();
@@ -1402,7 +1408,15 @@
else
{
// highlight Selected Date
-
+ if (this.isVisible && this.selectedDateCellId)
+ {
+ this.clearEffect(this.selectedDateCellId, this.highlightEffect2);
+ if (this.selectedDateCellColor!="transparent")
+ {
+ this.highlightEffect2 = new Effect.Highlight($(this.selectedDateCellId), {startcolor: this.selectedDateCellColor, duration:0.3, transition: Effect.Transitions.sinoidal,
+ afterFinish: this.onHighlightFinish});
+ }
+ }
}
}
17 years, 2 months
JBoss Rich Faces SVN: r3565 - in trunk/ui/scrollableDataTable/src/main/javascript/ClientUI: controls/grid and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-10-26 09:41:35 -0400 (Fri, 26 Oct 2007)
New Revision: 3565
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
Log:
RF-1248
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2007-10-26 13:27:34 UTC (rev 3564)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2007-10-26 13:41:35 UTC (rev 3565)
@@ -43,7 +43,10 @@
var src = request.getElementById(id);
if(target && src) {
- Utils.DOM.Event.removeListeners(target);
+ var cells = target.cells;
+ for(var i = 0; i < cells.length; i++) {
+ Utils.DOM.Event.removeListeners(cells[i]);
+ }
if (ClientUILib.isIE) {
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-10-26 13:27:34 UTC (rev 3564)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-10-26 13:41:35 UTC (rev 3565)
@@ -303,7 +303,11 @@
},
addListener: function(element, rowIndex) {
- Utils.DOM.Event.observe(element, "click", this.processClick.bindAsEventListener(this, rowIndex));
+ var listener = this.processClick.bindAsEventListener(this, rowIndex);
+ var cells = element.cells;
+ for(var i = 0; i < cells.length; i++) {
+ Utils.DOM.Event.observe(cells[i], "click", listener);
+ }
},
/* getGridSelection: function() {
17 years, 2 months
JBoss Rich Faces SVN: r3564 - trunk/ui/dropdown-menu/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-10-26 09:27:34 -0400 (Fri, 26 Oct 2007)
New Revision: 3564
Removed:
trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx
Log:
Deleted: trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx
===================================================================
--- trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx 2007-10-26 13:26:33 UTC (rev 3563)
+++ trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx 2007-10-26 13:27:34 UTC (rev 3564)
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:c=" http://java.sun.com/jsf/core"
- xmlns:ui=" http://ajax4jsf.org/cdk/ui"
- xmlns:u=" http://ajax4jsf.org/cdk/u"
- xmlns:x=" http://ajax4jsf.org/cdk/x"
- baseclass="org.richfaces.renderkit.html.DropDownMenuRendererBase"
- class="org.richfaces.renderkit.html.DropDownMenuRenderer"
- component="org.richfaces.component.UIDropDownMenu"
- >
- <h:styles>css/dropdownmenu.xcss</h:styles>
-
- <h:scripts>
- new org.ajax4jsf.javascript.PrototypeScript(),
- new org.ajax4jsf.javascript.AjaxScript(),
- scripts/menu.js
- </h:scripts>
-
- <f:clientid var="clientId"/>
- <jsp:scriptlet>
- <![CDATA[if (!((org.richfaces.component.UIDropDownMenu)component).getSubmitMode().equalsIgnoreCase("none")) org.richfaces.component.util.FormUtil.throwEnclFormReqExceptionIfNeed(context,component);]]>
- </jsp:scriptlet>
- <div id="#{clientId}"
- style="#{component.attributes['style']};"
- class="#{component.attributes['styleClass']} dr-menu-label dr-menu-label-unselect rich-ddmenu-label rich-ddmenu-label-unselect"
- onmouseover="this.className='dr-menu-label dr-menu-label-select rich-ddmenu-label rich-ddmenu-label-select' ; #{component.attributes['onmouseover']}"
- onmouseout="this.className='dr-menu-label dr-menu-label-unselect rich-ddmenu-label rich-ddmenu-label-unselect'; #{component.attributes['onmouseout']}"
- onmousemove="#{component.attributes['onmousemove']}">
-
- <jsp:scriptlet>
- <![CDATA[if(component.getFacet("label")!=null && component.getFacet("label").isRendered()) {]]>
- </jsp:scriptlet>
- <span class="dr-label-text-decor rich-label-text-decor">
- <u:insertFacet name="label" />
- </span>
- <jsp:scriptlet>
- <![CDATA[} else {]]>
- </jsp:scriptlet>
- <span class="dr-label-text-decor rich-label-text-decor">#{component.attributes['value']}</span>
- <jsp:scriptlet>
- <![CDATA[}]]>
- </jsp:scriptlet>
-
- <div style="margin: 0px; padding: 0px; border: 0px; position: relative; z-index:100;">
- <vcp:body>
- <f:call name="renderChildren" />
- </vcp:body>
- </div>
-
- </div>
-
-</f:root>
\ No newline at end of file
17 years, 2 months
JBoss Rich Faces SVN: r3563 - trunk/ui/dropdown-menu/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-10-26 09:26:33 -0400 (Fri, 26 Oct 2007)
New Revision: 3563
Added:
trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlSelectOrderShuttle.jspx
Log:
Added: trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlSelectOrderShuttle.jspx
===================================================================
--- trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlSelectOrderShuttle.jspx (rev 0)
+++ trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlSelectOrderShuttle.jspx 2007-10-26 13:26:33 UTC (rev 3563)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+ xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:c=" http://java.sun.com/jsf/core"
+ xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+ xmlns:u=" http://ajax4jsf.org/cdk/u"
+ xmlns:x=" http://ajax4jsf.org/cdk/x"
+ baseclass="org.richfaces.renderkit.html.SelectOrderShuttleRendererBase"
+ class="org.richfaces.renderkit.html.SelectOrderShuttleRenderer"
+ component="org.richfaces.component.UISelectOrderShuttle"
+ >
+ <h:styles>css/selectOrderShuttle.xcss</h:styles>
+
+ <h:scripts>
+ scripts/StringBuilder.js,scripts/SelectItem.js,scripts/SelectOrderShuttle.js
+ </h:scripts>
+
+ <f:clientid var="clientId"/>
+ <div id="#{clientId}">
+
+ <vcp:body>
+ <f:call name="renderChildren" />
+ </vcp:body>
+ </div>
+ <a href="#" onclick="shuttle.sort();">Header</a><br/>
+ <a href="#" onclick="shuttle.moveSelectedItems('up');">up</a><br/>
+ <a href="#" onclick="shuttle.moveSelectedItems('down');">down</a><br/>
+ <a href="#" onclick="shuttle.moveSelectedItems('first');">first</a><br/>
+ <a href="#" onclick="shuttle.moveSelectedItems('last');">last</a>
+ <script type="text/javascript">
+ #{this:initJSShuttleObject(context, component)}
+ document.body.onselectstart = function() {return false;};
+ document.body.className = "body";
+
+ </script>
+</f:root>
\ No newline at end of file
17 years, 2 months
JBoss Rich Faces SVN: r3562 - in trunk/sandbox/ui/orderingList: src/main/config/component and 39 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-10-26 09:22:55 -0400 (Fri, 26 Oct 2007)
New Revision: 3562
Added:
trunk/sandbox/ui/orderingList/src/main/config/component/selectordershuttle.xml
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/component/UISelectOrderShuttle.java
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/
trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/SelectOrderShuttleRendererBase.java
trunk/sandbox/ui/orderingList/src/main/resources/org/
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/selectOrderShuttle.xcss
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectItem.js
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectOrderShuttle.js
trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/StringBuilder.js
trunk/sandbox/ui/orderingList/target/
trunk/sandbox/ui/orderingList/target/classes/
trunk/sandbox/ui/orderingList/target/classes/META-INF/
trunk/sandbox/ui/orderingList/target/classes/META-INF/faces-config.xml
trunk/sandbox/ui/orderingList/target/classes/META-INF/orderingList.taglib.xml
trunk/sandbox/ui/orderingList/target/classes/META-INF/orderingList.tld
trunk/sandbox/ui/orderingList/target/classes/META-INF/resources-config.xml
trunk/sandbox/ui/orderingList/target/classes/org/
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/component/
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/component/README
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/component/UISelectOrderShuttle.class
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/component/html/
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/component/html/HtmlSelectOrderShuttle.class
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/SelectOrderShuttleRenderer.class
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/SelectOrderShuttleRendererBase.class
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/css/
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/css/selectOrderShuttle.xcss
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/scripts/
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/scripts/SelectItem.js
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/scripts/SelectOrderShuttle.js
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/scripts/StringBuilder.js
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/taglib/
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/taglib/SelectOrderShuttleTag.class
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/taglib/SelectOrderShuttleTagHandler$SelectOrderShuttleTagHandlerMetaRule.class
trunk/sandbox/ui/orderingList/target/classes/org/richfaces/taglib/SelectOrderShuttleTagHandler.class
trunk/sandbox/ui/orderingList/target/generated-component/
trunk/sandbox/ui/orderingList/target/generated-component/java/
trunk/sandbox/ui/orderingList/target/generated-component/java/org/
trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/
trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/component/
trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/component/html/
trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/component/html/HtmlSelectOrderShuttle.java
trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/renderkit/
trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/renderkit/html/
trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/renderkit/html/SelectOrderShuttleRenderer.java
trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/taglib/
trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/taglib/SelectOrderShuttleTag.java
trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/taglib/SelectOrderShuttleTagHandler.java
trunk/sandbox/ui/orderingList/target/generated-component/resources/
trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/
trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/faces-config.xml
trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/orderingList.taglib.xml
trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/orderingList.tld
trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/resources-config.xml
trunk/sandbox/ui/orderingList/target/mvn-eclipse-cache.properties
trunk/sandbox/ui/orderingList/target/orderingList-1.0-SNAPSHOT-sources.jar
trunk/sandbox/ui/orderingList/target/orderingList-1.0-SNAPSHOT.jar
trunk/sandbox/ui/orderingList/target/surefire-reports/
trunk/sandbox/ui/orderingList/target/surefire-reports/TEST-org.richfaces.component.JSFComponentTest.xml
trunk/sandbox/ui/orderingList/target/surefire-reports/org.richfaces.component.JSFComponentTest.txt
trunk/sandbox/ui/orderingList/target/test-classes/
trunk/sandbox/ui/orderingList/target/test-classes/org/
trunk/sandbox/ui/orderingList/target/test-classes/org/richfaces/
trunk/sandbox/ui/orderingList/target/test-classes/org/richfaces/component/
trunk/sandbox/ui/orderingList/target/test-classes/org/richfaces/component/JSFComponentTest.class
Log:
selectOrderShuttle component added
Added: trunk/sandbox/ui/orderingList/src/main/config/component/selectordershuttle.xml
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/config/component/selectordershuttle.xml (rev 0)
+++ trunk/sandbox/ui/orderingList/src/main/config/component/selectordershuttle.xml 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<components>
+ <component>
+ <name>org.richfaces.SelectOrderShuttle</name>
+ <family>org.richfaces.SelectOrderShuttle</family>
+ <classname>org.richfaces.component.html.HtmlSelectOrderShuttle</classname>
+ <superclass>org.richfaces.component.UISelectOrderShuttle</superclass>
+ <description>
+ </description>
+
+ <renderer generate="true" override="true">
+ <name>org.richfaces.SelectOrderShuttleRenderer</name>
+ <template>org/richfaces/htmlSelectOrderShuttle.jspx</template>
+ </renderer>
+
+ <tag>
+ <name>selectOrderShuttle</name>
+ <classname>org.richfaces.taglib.SelectOrderShuttleTag</classname>
+ <superclass>
+ org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
+ </superclass>
+ <test/>
+ </tag>
+
+ <taghandler generate="true">
+ <classname>org.richfaces.taglib.SelectOrderShuttleTagHandler</classname>
+ <superclass>com.sun.facelets.tag.jsf.ComponentHandler</superclass>
+ </taghandler>
+
+ &ui_component_attributes;
+
+ <property>
+ <name>onmousemove</name>
+ <classname>java.lang.String</classname>
+ <description>
+ HTML: script expression; a pointer was moved within.
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+
+ </component>
+</components>
Added: trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/component/UISelectOrderShuttle.java
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/component/UISelectOrderShuttle.java (rev 0)
+++ trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/component/UISelectOrderShuttle.java 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,8 @@
+package org.richfaces.component;
+
+import javax.faces.component.UIComponentBase;
+
+public abstract class UISelectOrderShuttle extends UIComponentBase {
+
+
+}
Added: trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/SelectOrderShuttleRendererBase.java
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/SelectOrderShuttleRendererBase.java (rev 0)
+++ trunk/sandbox/ui/orderingList/src/main/java/org/richfaces/renderkit/html/SelectOrderShuttleRendererBase.java 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,35 @@
+package org.richfaces.renderkit.html;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
+import org.richfaces.component.UISelectOrderShuttle;
+
+public class SelectOrderShuttleRendererBase extends HeaderResourcesRendererBase {
+
+ protected Class getComponentClass() {
+ return UISelectOrderShuttle.class;
+ }
+
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+ public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+
+ }
+
+ public String initJSShuttleObject(FacesContext context, UISelectOrderShuttle component) {
+ StringBuffer script = new StringBuffer();
+ script.append("var shuttleItems = new Array();");
+ script.append("for (var i = 9; i > 0; i--) {");
+ script.append("shuttleItems[9-i] = new SelectItem('Item ' + i, i, 'description' + i, null, false);");
+ script.append("}");
+ script.append("var shuttle = new Shuttle('").append(component.getClientId(context)).append("', shuttleItems);");
+ script.append(" shuttle.init();");
+ return script.toString();
+ }
+}
Added: trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/selectOrderShuttle.xcss
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/selectOrderShuttle.xcss (rev 0)
+++ trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/css/selectOrderShuttle.xcss 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:template xmlns:f='http:/jsf.exadel.com/template'
+ xmlns:u='http:/jsf.exadel.com/template/util'
+ xmlns="http://www.w3.org/1999/xhtml" >
+
+<f:verbatim><![CDATA[
+.selectedItem {
+ color: white;
+ background-color: blue;
+}
+.normalItem {
+ background-color: white;
+ color: black;
+}
+.activeItem {
+ color: white;
+ background-color: brown;
+ border: 1px black dotted;
+}
+
+.body {
+ -moz-user-select: none;
+}
+]]>
+
+</f:verbatim>
+</f:template>
\ No newline at end of file
Added: trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectItem.js
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectItem.js (rev 0)
+++ trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectItem.js 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,20 @@
+SelectItem = function(label, value, description, id, selected, node) {
+ this._label = label;
+ this._value = value;
+ this._node = node;
+ this._description = description;
+ if (id == null) {
+ this._id = this.generateId();
+ } else {
+ this._id = id;
+ }
+ this._selected = selected;
+}
+
+SelectItem.ITEM_ID_PREFIX = "row_";
+SelectItem.PREV_ID = 0;
+
+SelectItem.prototype.generateId = function() {
+ SelectItem.PREV_ID++;
+ return SelectItem.ITEM_ID_PREFIX.concat(SelectItem.PREV_ID);
+}
\ No newline at end of file
Added: trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectOrderShuttle.js
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectOrderShuttle.js (rev 0)
+++ trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/SelectOrderShuttle.js 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,300 @@
+Array.prototype.remove = function(object) {
+
+ var index = this.indexOf(object, 0, this.length);
+ if (index == 0) {
+ this.shift();
+ } else {
+ this.splice(index, 1);
+ }
+}
+
+Shuttle = function(containerId, shuttleItems) {
+ this.container = document.getElementById(containerId);
+ this.items = null;
+ this.selectedItems = new Array();
+ this.shuttleItems = shuttleItems;
+
+ this.shuttle = null;
+ this.sortOrder = Shuttle.ASC;
+
+ this.shuttleTable = null;
+ this.shuttleTbody = null;
+
+ this.activeItem = null;
+}
+
+Shuttle.ASC = "acs";
+Shuttle.DESC = "desc";
+Shuttle.SELECTED_ITEM_CLASS = "selectedItem";
+Shuttle.NORMAL_ITEM_CLASS = "normalItem";
+Shuttle.ACTIVE_ITEM_CLASS = "activeItem";
+
+Shuttle.prototype.add = function(selectItem) {
+ this.createShuttleItem(selectItem, this.shuttle);
+}
+
+Shuttle.prototype.addList = function(shuttleItems) {
+ for (var i = 0; i < shuttleItems.length; i++) {
+ this.add(shuttleItems[i]);
+ }
+}
+
+Shuttle.prototype.remove = function() {
+
+}
+
+Shuttle.prototype.removeList = function() {
+
+}
+
+Shuttle.prototype.sort = function() {
+ if (this.sortOrder == Shuttle.ASC) {
+ this.shuttleItems.sort(this.compare);
+ this.sortOrder = Shuttle.DESC;
+ } else {
+ this.shuttleItems.reverse();
+ this.sortOrder = Shuttle.ASC;
+ }
+ this.rebuild();
+}
+
+Shuttle.prototype.moveSelectedItems = function(action) {
+ var rows = this.shuttleTbody.rows;
+ var item;
+ this.selectedItems.sort(this.compareByRowIndex);
+ if ((action == 'up') && this.getExtremeItem("first").previousSibling) {
+ for (var i = 0; i < this.selectedItems.length; i++) {
+ item = this.selectedItems[i];
+ item.parentNode.insertBefore(item, item.previousSibling);
+ }
+ } else if ((action == 'down') && this.getExtremeItem("last").nextSibling) {
+ for (var i = this.selectedItems.length - 1; i > -1; i--) {
+ item = this.selectedItems[i];
+ item.parentNode.insertBefore(item.nextSibling, item);
+ }
+ } else if (action == 'first') {
+ var incr = this.selectedItems[0].rowIndex;
+ for (var i = 0; i < this.selectedItems.length; i++) {
+ item = this.selectedItems[i];
+ item.parentNode.insertBefore(item, rows[item.rowIndex - incr]);
+ }
+ } else if (action == 'last') {
+ var length = this.shuttleItems.length;
+ var incr = length - this.selectedItems[this.selectedItems.length - 1].rowIndex;
+ for (var i = this.selectedItems.length - 1; i > -1; i--) {
+ item = this.selectedItems[i];
+ if (item.rowIndex + incr > length - 1) {
+ item.parentNode.insertBefore(item, null);
+ } else {
+ item.parentNode.insertBefore(item, rows[item.rowIndex + incr]);
+ }
+ }
+ }
+}
+
+Shuttle.prototype.getExtremeItem = function(position) {
+ var extremeItem = this.selectedItems[0];
+ var currentItem;
+
+ for (var i = 1; i < this.selectedItems.length; i++) {
+ currentItem = this.selectedItems[i];
+ if (position == "first") {
+ if (currentItem.rowIndex < extremeItem.rowIndex) {
+ extremeItem = currentItem;
+ }
+ } else {
+ if (currentItem.rowIndex > extremeItem.rowIndex) {
+ extremeItem = currentItem;
+ }
+ }
+ }
+ return extremeItem;
+}
+
+Shuttle.prototype.getLastSelectedItem = function() {
+
+}
+
+Shuttle.prototype.onclickHandler = function(event) {
+ //this.selectItem(event.srcElement);
+ var activeElem = event.target || event.srcElement;
+ if (activeElem == null) {
+ return;
+ }
+
+ while (activeElem.tagName.toLowerCase() != "tr") {
+ activeElem = activeElem.parentNode;
+ }
+
+ if (event.ctrlKey) {
+ this.addSelectedItem(activeElem);
+ //FIX
+ } else if (event.shiftKey) {
+ this.selectItemGroup(activeElem);
+ } else {
+ this.selectItem(activeElem);
+ }
+ activeElem.className = Shuttle.ACTIVE_ITEM_CLASS;
+ this.activeItem = activeElem;
+}
+
+/**
+ * Click handler
+ */
+Shuttle.prototype.selectItem = function(activeItem) {
+ var markedItem = this.getSelectItemById(activeItem.id);
+ var markedShuttleItem = activeItem;
+
+ if (markedItem != null) {
+ if (markedItem._selected) {
+ this.resetMarked();
+ markedItem._selected = false;
+ } else {
+ this.resetMarked();
+
+ markedItem._selected = true;
+ //markedShuttleItem.className = Shuttle.ACTIVE_ITEM_CLASS;
+ this.selectedItems[0] = markedShuttleItem;
+ }
+ }
+}
+
+/**
+ * CTRL+Click handler
+ */
+Shuttle.prototype.addSelectedItem = function(activeItem) {
+ var markedItem = this.getSelectItemById(activeItem.id);
+ var markedShuttleItem = activeItem;
+
+ if (markedItem._selected) {
+ //this.activeItem.className = Shuttle.NORMAL_ITEM_CLASS;
+ this.selectedItems.remove(markedShuttleItem);
+ markedItem._selected = false;
+ } else {
+ markedItem._selected = true;
+ //markedShuttleItem.className = Shuttle.SELECTED_ITEM_CLASS;
+ this.selectedItems.push(markedShuttleItem);
+ }
+ this.activeItem.className = Shuttle.SELECTED_ITEM_CLASS;
+
+ if (this.activeItem && !this.getSelectItemById(this.activeItem.id)._selected) {
+ this.activeItem.className = Shuttle.NORMAL_ITEM_CLASS;
+ }
+}
+
+/**
+ * Shift+Click handler
+ */
+Shuttle.prototype.selectItemGroup = function(activeItem) {
+ var lastItemIndex = this.activeItem.rowIndex;
+ var startIndex;
+ var endIndex;
+ this.resetMarked();
+ if (activeItem.rowIndex > lastItemIndex) {
+ startIndex = lastItemIndex;
+ endIndex = activeItem.rowIndex;
+ } else {
+ startIndex = activeItem.rowIndex;
+ endIndex = lastItemIndex;
+ }
+ var rows = this.shuttleTbody.rows;
+ for (var i = startIndex; i <= endIndex; i++) {
+ rows[i].className = Shuttle.SELECTED_ITEM_CLASS;
+ this.selectedItems.push(rows[i]);
+ this.getSelectItemById(rows[i].id)._selected = true;
+ }
+}
+
+Shuttle.prototype.resetMarked = function() {
+ var rows = this.shuttleTbody.rows;
+ for (var i = 0; i < rows.length; i++) {
+ var shuttleItem = rows[i];
+ shuttleItem.className = Shuttle.NORMAL_ITEM_CLASS;
+ this.getSelectItemById(shuttleItem.id)._selected = false; //FIXME
+ }
+ this.selectedItems.length = 0;
+}
+
+Shuttle.prototype.getSelectItemById = function(selectItemId) {
+ for (var i = 0; i < this.shuttleItems.length; i++) {
+ var item = this.shuttleItems[i];
+ if (selectItemId == item._id) {
+ return item;
+ }
+ }
+ return null
+}
+
+Shuttle.prototype.init = function() {
+ this.shuttleTable = document.createElement("table");
+ this.shuttleTbody = document.createElement("tbody");
+ this.shuttle = this.shuttleTbody;
+ this.addList(this.shuttleItems);
+ this.shuttleTable.appendChild(this.shuttle)
+ this.container.appendChild(this.shuttleTable);
+
+}
+
+Shuttle.prototype.rebuild = function() {
+ this.shuttle = document.createElement("tbody");
+
+ for (var i = 0; i < this.shuttleItems.length; i++) {
+ this.shuttle.appendChild(this.shuttleItems[i]._node);
+ }
+ this.shuttleTbody.parentNode.removeChild(this.shuttleTbody);
+ this.shuttleTable.appendChild(this.shuttle);
+ this.shuttleTbody = this.shuttleTable.tBodies[0];
+}
+//--------------------------------
+Shuttle.prototype.createShuttleItem = function(selectItem, elemContainer) {
+ var tr = document.createElement("tr");
+ elemContainer.appendChild(tr);
+ tr.id = selectItem._id
+ //elemContainer.append('<tr id="').append(selectItem._id).append('" ');
+ var className = null;
+ if (selectItem._selected) {
+ className = Shuttle.SELECTED_ITEM_CLASS;
+ } else if (this.activeItem && (this.activeItem == selectItem)) {
+ className = Shuttle.ACTIVE_ITEM_CLASS;
+ } else {
+ className = Shuttle.NORMAL_ITEM_CLASS;
+ }
+ //elemContainer.append('class="').append(className);
+ tr.className = className;
+ var obj = this;
+ tr.onclick = function(e) {
+ e = (window.event || e);
+ obj.onclickHandler(e);
+ }
+ //elemContainer.append('" onclick="shuttle.onclickHandler(window.event||event);"');
+ //elemContainer.append('>').append('<td>');
+ var td = document.createElement("td");
+ tr.appendChild(td);
+ if (td.textContent == undefined) {
+ td.innerText = selectItem._label;
+ } else {
+ td.textContent = selectItem._label;
+ }
+ selectItem._node = tr;
+ //elemContainer.append(selectItem._label);
+ //elemContainer.append('</td><td width="0">');
+ //this.createValueKeeper(selectItem, elemContainer);
+ //elemContainer.append('</td></tr>');
+}
+
+Shuttle.prototype.compare = function(obj1, obj2) {
+ obj1 = obj1._label;
+ obj2 = obj2._label;
+ return ((obj1 == obj2) ? 0 : ((obj1 < obj2) ? -1 : 1));
+}
+
+Shuttle.prototype.compareByRowIndex = function(obj1, obj2) {
+ obj1 = obj1.rowIndex;
+ obj2 = obj2.rowIndex;
+ return ((obj1 == obj2) ? 0 : ((obj1 < obj2) ? -1 : 1));
+}
+
+Shuttle.prototype.createValueKeeper = function(selectItem, elemContainer) {
+ elemContainer.append('<input type="hidden" value="')
+ .append(selectItem._value).append('"/>');
+}
Added: trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/StringBuilder.js
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/StringBuilder.js (rev 0)
+++ trunk/sandbox/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/StringBuilder.js 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,55 @@
+/*
+/* sbuilder.js - Helper class to improve strings concatenation perfomance
+ * by Denis Morozov <dmorozov(a)exadel.com> distributed under the BSD license.
+ *
+ * Usage:
+ * var sb = new StringBuilder();
+ * sb.append("String 1").append("String 2");
+ * sb.append("String 3");
+ * var str = sb.toString();
+ */
+StringBuilder = function() {
+
+ this.length = 0;
+
+ this._current = 0;
+ this._parts = [];
+ this._string = null;
+
+ this.initialize();
+}
+
+StringBuilder.prototype.initialize = function(str) {
+ this._string = null;
+ this._current = 0;
+ this._parts = [];
+ this.length = 0;
+
+ if(str != null)
+ this.append(str);
+}
+StringBuilder.prototype.append = function(str) {
+ // append argument
+ //this.length += (this._parts[this._current++] = String(str)).length;
+ this._parts.push(String(str));
+
+ // reset cache
+ this._string = null;
+ return this;
+}
+
+StringBuilder.prototype.toString = function () {
+ if (this._string != null)
+ return this._string;
+
+ var s = this._parts.join("");
+ this._parts = [];
+ this._current = 1;
+ this.length = s.length;
+
+ return this._string = s;
+}
+
+StringBuilder.prototype.clean = function(str) {
+ this.initialize();
+}
Added: trunk/sandbox/ui/orderingList/target/classes/META-INF/faces-config.xml
===================================================================
--- trunk/sandbox/ui/orderingList/target/classes/META-INF/faces-config.xml (rev 0)
+++ trunk/sandbox/ui/orderingList/target/classes/META-INF/faces-config.xml 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+
+
+
+
+
+
+
+ <component>
+ <description></description>
+ <component-type>org.richfaces.SelectOrderShuttle</component-type>
+ <component-class>org.richfaces.component.html.HtmlSelectOrderShuttle</component-class>
+
+ <component-extension>
+ <component-family>org.richfaces.SelectOrderShuttle</component-family>
+ <renderer-type>org.richfaces.SelectOrderShuttleRenderer</renderer-type>
+ </component-extension>
+ </component>
+
+ <render-kit>
+ <render-kit-id>HTML_BASIC</render-kit-id>
+ <renderer>
+ <component-family>org.richfaces.SelectOrderShuttle</component-family>
+ <renderer-type>
+ org.richfaces.SelectOrderShuttleRenderer
+ </renderer-type>
+ <renderer-class>
+ org.richfaces.renderkit.html.SelectOrderShuttleRenderer
+ </renderer-class>
+ </renderer>
+ </render-kit>
+
+
+</faces-config>
Added: trunk/sandbox/ui/orderingList/target/classes/META-INF/orderingList.taglib.xml
===================================================================
--- trunk/sandbox/ui/orderingList/target/classes/META-INF/orderingList.taglib.xml (rev 0)
+++ trunk/sandbox/ui/orderingList/target/classes/META-INF/orderingList.taglib.xml 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE facelet-taglib PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+ "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+<facelet-taglib xmlns="http://java.sun.com/JSF/Facelet">
+ <namespace>http://labs.jboss.com/jbossrichfaces/ui/ui/orderingList</namespace>
+
+
+
+ <tag>
+ <tag-name>selectOrderShuttle</tag-name>
+ <component>
+ <component-type>org.richfaces.SelectOrderShuttle</component-type>
+ <renderer-type>
+ org.richfaces.SelectOrderShuttleRenderer
+ </renderer-type>
+ <handler-class>
+ org.richfaces.taglib.SelectOrderShuttleTagHandler
+ </handler-class>
+ </component>
+
+ </tag>
+
+
+
+</facelet-taglib>
\ No newline at end of file
Added: trunk/sandbox/ui/orderingList/target/classes/META-INF/orderingList.tld
===================================================================
--- trunk/sandbox/ui/orderingList/target/classes/META-INF/orderingList.tld (rev 0)
+++ trunk/sandbox/ui/orderingList/target/classes/META-INF/orderingList.tld 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+ "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+ <tlib-version>1.2</tlib-version>
+ <jsp-version>1.2</jsp-version>
+ <short-name>orderingList</short-name>
+ <uri>http://labs.jboss.com/jbossrichfaces/ui/ui/orderingList</uri>
+
+
+ <tag>
+ <name>selectOrderShuttle</name>
+ <tag-class>org.richfaces.taglib.SelectOrderShuttleTag</tag-class>
+ <body-content>JSP</body-content>
+ <description></description>
+ <attribute>
+ <name>rendered</name>
+ <rtexprvalue>false</rtexprvalue>
+ <description>If "false", this component is not rendered</description>
+ </attribute>
+ <attribute>
+ <name>binding</name>
+ <rtexprvalue>false</rtexprvalue>
+ <description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+ </attribute>
+ <attribute>
+ <name>onmousemove</name>
+ <rtexprvalue>false</rtexprvalue>
+ <description>HTML: script expression; a pointer was moved within.</description>
+ </attribute>
+ <attribute>
+ <name>id</name>
+ <rtexprvalue>false</rtexprvalue>
+ <description>Every component may have a unique id that is automatically created if omitted</description>
+ </attribute>
+ </tag>
+
+
+
+
+
+</taglib>
\ No newline at end of file
Added: trunk/sandbox/ui/orderingList/target/classes/META-INF/resources-config.xml
===================================================================
--- trunk/sandbox/ui/orderingList/target/classes/META-INF/resources-config.xml (rev 0)
+++ trunk/sandbox/ui/orderingList/target/classes/META-INF/resources-config.xml 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resource-config>
+<!-- Include manual created resource -->
+
+
+
+ <resource>
+ <name>css/selectOrderShuttle.xcss</name>
+ <path>org/richfaces/renderkit/html/css/selectOrderShuttle.xcss</path>
+ </resource>
+ <resource>
+ <name>scripts/SelectOrderShuttle.js</name>
+ <path>org/richfaces/renderkit/html/scripts/SelectOrderShuttle.js</path>
+ </resource>
+ <resource>
+ <name>scripts/SelectItem.js</name>
+ <path>org/richfaces/renderkit/html/scripts/SelectItem.js</path>
+ </resource>
+ <resource>
+ <name>scripts/StringBuilder.js</name>
+ <path>org/richfaces/renderkit/html/scripts/StringBuilder.js</path>
+ </resource>
+</resource-config>
Added: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/component/README
===================================================================
Added: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/component/UISelectOrderShuttle.class
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/component/UISelectOrderShuttle.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/component/html/HtmlSelectOrderShuttle.class
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/component/html/HtmlSelectOrderShuttle.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/SelectOrderShuttleRenderer.class
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/SelectOrderShuttleRenderer.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/SelectOrderShuttleRendererBase.class
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/SelectOrderShuttleRendererBase.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/css/selectOrderShuttle.xcss
===================================================================
--- trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/css/selectOrderShuttle.xcss (rev 0)
+++ trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/css/selectOrderShuttle.xcss 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:template xmlns:f='http:/jsf.exadel.com/template'
+ xmlns:u='http:/jsf.exadel.com/template/util'
+ xmlns="http://www.w3.org/1999/xhtml" >
+
+<f:verbatim><![CDATA[
+.selectedItem {
+ color: white;
+ background-color: blue;
+}
+.normalItem {
+ background-color: white;
+ color: black;
+}
+.activeItem {
+ color: white;
+ background-color: brown;
+ border: 1px black dotted;
+}
+
+.body {
+ -moz-user-select: none;
+}
+]]>
+
+</f:verbatim>
+</f:template>
\ No newline at end of file
Added: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/scripts/SelectItem.js
===================================================================
--- trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/scripts/SelectItem.js (rev 0)
+++ trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/scripts/SelectItem.js 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,20 @@
+SelectItem = function(label, value, description, id, selected, node) {
+ this._label = label;
+ this._value = value;
+ this._node = node;
+ this._description = description;
+ if (id == null) {
+ this._id = this.generateId();
+ } else {
+ this._id = id;
+ }
+ this._selected = selected;
+}
+
+SelectItem.ITEM_ID_PREFIX = "row_";
+SelectItem.PREV_ID = 0;
+
+SelectItem.prototype.generateId = function() {
+ SelectItem.PREV_ID++;
+ return SelectItem.ITEM_ID_PREFIX.concat(SelectItem.PREV_ID);
+}
\ No newline at end of file
Added: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/scripts/SelectOrderShuttle.js
===================================================================
--- trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/scripts/SelectOrderShuttle.js (rev 0)
+++ trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/scripts/SelectOrderShuttle.js 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,300 @@
+Array.prototype.remove = function(object) {
+
+ var index = this.indexOf(object, 0, this.length);
+ if (index == 0) {
+ this.shift();
+ } else {
+ this.splice(index, 1);
+ }
+}
+
+Shuttle = function(containerId, shuttleItems) {
+ this.container = document.getElementById(containerId);
+ this.items = null;
+ this.selectedItems = new Array();
+ this.shuttleItems = shuttleItems;
+
+ this.shuttle = null;
+ this.sortOrder = Shuttle.ASC;
+
+ this.shuttleTable = null;
+ this.shuttleTbody = null;
+
+ this.activeItem = null;
+}
+
+Shuttle.ASC = "acs";
+Shuttle.DESC = "desc";
+Shuttle.SELECTED_ITEM_CLASS = "selectedItem";
+Shuttle.NORMAL_ITEM_CLASS = "normalItem";
+Shuttle.ACTIVE_ITEM_CLASS = "activeItem";
+
+Shuttle.prototype.add = function(selectItem) {
+ this.createShuttleItem(selectItem, this.shuttle);
+}
+
+Shuttle.prototype.addList = function(shuttleItems) {
+ for (var i = 0; i < shuttleItems.length; i++) {
+ this.add(shuttleItems[i]);
+ }
+}
+
+Shuttle.prototype.remove = function() {
+
+}
+
+Shuttle.prototype.removeList = function() {
+
+}
+
+Shuttle.prototype.sort = function() {
+ if (this.sortOrder == Shuttle.ASC) {
+ this.shuttleItems.sort(this.compare);
+ this.sortOrder = Shuttle.DESC;
+ } else {
+ this.shuttleItems.reverse();
+ this.sortOrder = Shuttle.ASC;
+ }
+ this.rebuild();
+}
+
+Shuttle.prototype.moveSelectedItems = function(action) {
+ var rows = this.shuttleTbody.rows;
+ var item;
+ this.selectedItems.sort(this.compareByRowIndex);
+ if ((action == 'up') && this.getExtremeItem("first").previousSibling) {
+ for (var i = 0; i < this.selectedItems.length; i++) {
+ item = this.selectedItems[i];
+ item.parentNode.insertBefore(item, item.previousSibling);
+ }
+ } else if ((action == 'down') && this.getExtremeItem("last").nextSibling) {
+ for (var i = this.selectedItems.length - 1; i > -1; i--) {
+ item = this.selectedItems[i];
+ item.parentNode.insertBefore(item.nextSibling, item);
+ }
+ } else if (action == 'first') {
+ var incr = this.selectedItems[0].rowIndex;
+ for (var i = 0; i < this.selectedItems.length; i++) {
+ item = this.selectedItems[i];
+ item.parentNode.insertBefore(item, rows[item.rowIndex - incr]);
+ }
+ } else if (action == 'last') {
+ var length = this.shuttleItems.length;
+ var incr = length - this.selectedItems[this.selectedItems.length - 1].rowIndex;
+ for (var i = this.selectedItems.length - 1; i > -1; i--) {
+ item = this.selectedItems[i];
+ if (item.rowIndex + incr > length - 1) {
+ item.parentNode.insertBefore(item, null);
+ } else {
+ item.parentNode.insertBefore(item, rows[item.rowIndex + incr]);
+ }
+ }
+ }
+}
+
+Shuttle.prototype.getExtremeItem = function(position) {
+ var extremeItem = this.selectedItems[0];
+ var currentItem;
+
+ for (var i = 1; i < this.selectedItems.length; i++) {
+ currentItem = this.selectedItems[i];
+ if (position == "first") {
+ if (currentItem.rowIndex < extremeItem.rowIndex) {
+ extremeItem = currentItem;
+ }
+ } else {
+ if (currentItem.rowIndex > extremeItem.rowIndex) {
+ extremeItem = currentItem;
+ }
+ }
+ }
+ return extremeItem;
+}
+
+Shuttle.prototype.getLastSelectedItem = function() {
+
+}
+
+Shuttle.prototype.onclickHandler = function(event) {
+ //this.selectItem(event.srcElement);
+ var activeElem = event.target || event.srcElement;
+ if (activeElem == null) {
+ return;
+ }
+
+ while (activeElem.tagName.toLowerCase() != "tr") {
+ activeElem = activeElem.parentNode;
+ }
+
+ if (event.ctrlKey) {
+ this.addSelectedItem(activeElem);
+ //FIX
+ } else if (event.shiftKey) {
+ this.selectItemGroup(activeElem);
+ } else {
+ this.selectItem(activeElem);
+ }
+ activeElem.className = Shuttle.ACTIVE_ITEM_CLASS;
+ this.activeItem = activeElem;
+}
+
+/**
+ * Click handler
+ */
+Shuttle.prototype.selectItem = function(activeItem) {
+ var markedItem = this.getSelectItemById(activeItem.id);
+ var markedShuttleItem = activeItem;
+
+ if (markedItem != null) {
+ if (markedItem._selected) {
+ this.resetMarked();
+ markedItem._selected = false;
+ } else {
+ this.resetMarked();
+
+ markedItem._selected = true;
+ //markedShuttleItem.className = Shuttle.ACTIVE_ITEM_CLASS;
+ this.selectedItems[0] = markedShuttleItem;
+ }
+ }
+}
+
+/**
+ * CTRL+Click handler
+ */
+Shuttle.prototype.addSelectedItem = function(activeItem) {
+ var markedItem = this.getSelectItemById(activeItem.id);
+ var markedShuttleItem = activeItem;
+
+ if (markedItem._selected) {
+ //this.activeItem.className = Shuttle.NORMAL_ITEM_CLASS;
+ this.selectedItems.remove(markedShuttleItem);
+ markedItem._selected = false;
+ } else {
+ markedItem._selected = true;
+ //markedShuttleItem.className = Shuttle.SELECTED_ITEM_CLASS;
+ this.selectedItems.push(markedShuttleItem);
+ }
+ this.activeItem.className = Shuttle.SELECTED_ITEM_CLASS;
+
+ if (this.activeItem && !this.getSelectItemById(this.activeItem.id)._selected) {
+ this.activeItem.className = Shuttle.NORMAL_ITEM_CLASS;
+ }
+}
+
+/**
+ * Shift+Click handler
+ */
+Shuttle.prototype.selectItemGroup = function(activeItem) {
+ var lastItemIndex = this.activeItem.rowIndex;
+ var startIndex;
+ var endIndex;
+ this.resetMarked();
+ if (activeItem.rowIndex > lastItemIndex) {
+ startIndex = lastItemIndex;
+ endIndex = activeItem.rowIndex;
+ } else {
+ startIndex = activeItem.rowIndex;
+ endIndex = lastItemIndex;
+ }
+ var rows = this.shuttleTbody.rows;
+ for (var i = startIndex; i <= endIndex; i++) {
+ rows[i].className = Shuttle.SELECTED_ITEM_CLASS;
+ this.selectedItems.push(rows[i]);
+ this.getSelectItemById(rows[i].id)._selected = true;
+ }
+}
+
+Shuttle.prototype.resetMarked = function() {
+ var rows = this.shuttleTbody.rows;
+ for (var i = 0; i < rows.length; i++) {
+ var shuttleItem = rows[i];
+ shuttleItem.className = Shuttle.NORMAL_ITEM_CLASS;
+ this.getSelectItemById(shuttleItem.id)._selected = false; //FIXME
+ }
+ this.selectedItems.length = 0;
+}
+
+Shuttle.prototype.getSelectItemById = function(selectItemId) {
+ for (var i = 0; i < this.shuttleItems.length; i++) {
+ var item = this.shuttleItems[i];
+ if (selectItemId == item._id) {
+ return item;
+ }
+ }
+ return null
+}
+
+Shuttle.prototype.init = function() {
+ this.shuttleTable = document.createElement("table");
+ this.shuttleTbody = document.createElement("tbody");
+ this.shuttle = this.shuttleTbody;
+ this.addList(this.shuttleItems);
+ this.shuttleTable.appendChild(this.shuttle)
+ this.container.appendChild(this.shuttleTable);
+
+}
+
+Shuttle.prototype.rebuild = function() {
+ this.shuttle = document.createElement("tbody");
+
+ for (var i = 0; i < this.shuttleItems.length; i++) {
+ this.shuttle.appendChild(this.shuttleItems[i]._node);
+ }
+ this.shuttleTbody.parentNode.removeChild(this.shuttleTbody);
+ this.shuttleTable.appendChild(this.shuttle);
+ this.shuttleTbody = this.shuttleTable.tBodies[0];
+}
+//--------------------------------
+Shuttle.prototype.createShuttleItem = function(selectItem, elemContainer) {
+ var tr = document.createElement("tr");
+ elemContainer.appendChild(tr);
+ tr.id = selectItem._id
+ //elemContainer.append('<tr id="').append(selectItem._id).append('" ');
+ var className = null;
+ if (selectItem._selected) {
+ className = Shuttle.SELECTED_ITEM_CLASS;
+ } else if (this.activeItem && (this.activeItem == selectItem)) {
+ className = Shuttle.ACTIVE_ITEM_CLASS;
+ } else {
+ className = Shuttle.NORMAL_ITEM_CLASS;
+ }
+ //elemContainer.append('class="').append(className);
+ tr.className = className;
+ var obj = this;
+ tr.onclick = function(e) {
+ e = (window.event || e);
+ obj.onclickHandler(e);
+ }
+ //elemContainer.append('" onclick="shuttle.onclickHandler(window.event||event);"');
+ //elemContainer.append('>').append('<td>');
+ var td = document.createElement("td");
+ tr.appendChild(td);
+ if (td.textContent == undefined) {
+ td.innerText = selectItem._label;
+ } else {
+ td.textContent = selectItem._label;
+ }
+ selectItem._node = tr;
+ //elemContainer.append(selectItem._label);
+ //elemContainer.append('</td><td width="0">');
+ //this.createValueKeeper(selectItem, elemContainer);
+ //elemContainer.append('</td></tr>');
+}
+
+Shuttle.prototype.compare = function(obj1, obj2) {
+ obj1 = obj1._label;
+ obj2 = obj2._label;
+ return ((obj1 == obj2) ? 0 : ((obj1 < obj2) ? -1 : 1));
+}
+
+Shuttle.prototype.compareByRowIndex = function(obj1, obj2) {
+ obj1 = obj1.rowIndex;
+ obj2 = obj2.rowIndex;
+ return ((obj1 == obj2) ? 0 : ((obj1 < obj2) ? -1 : 1));
+}
+
+Shuttle.prototype.createValueKeeper = function(selectItem, elemContainer) {
+ elemContainer.append('<input type="hidden" value="')
+ .append(selectItem._value).append('"/>');
+}
Added: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/scripts/StringBuilder.js
===================================================================
--- trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/scripts/StringBuilder.js (rev 0)
+++ trunk/sandbox/ui/orderingList/target/classes/org/richfaces/renderkit/html/scripts/StringBuilder.js 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,55 @@
+/*
+/* sbuilder.js - Helper class to improve strings concatenation perfomance
+ * by Denis Morozov <dmorozov(a)exadel.com> distributed under the BSD license.
+ *
+ * Usage:
+ * var sb = new StringBuilder();
+ * sb.append("String 1").append("String 2");
+ * sb.append("String 3");
+ * var str = sb.toString();
+ */
+StringBuilder = function() {
+
+ this.length = 0;
+
+ this._current = 0;
+ this._parts = [];
+ this._string = null;
+
+ this.initialize();
+}
+
+StringBuilder.prototype.initialize = function(str) {
+ this._string = null;
+ this._current = 0;
+ this._parts = [];
+ this.length = 0;
+
+ if(str != null)
+ this.append(str);
+}
+StringBuilder.prototype.append = function(str) {
+ // append argument
+ //this.length += (this._parts[this._current++] = String(str)).length;
+ this._parts.push(String(str));
+
+ // reset cache
+ this._string = null;
+ return this;
+}
+
+StringBuilder.prototype.toString = function () {
+ if (this._string != null)
+ return this._string;
+
+ var s = this._parts.join("");
+ this._parts = [];
+ this._current = 1;
+ this.length = s.length;
+
+ return this._string = s;
+}
+
+StringBuilder.prototype.clean = function(str) {
+ this.initialize();
+}
Added: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/taglib/SelectOrderShuttleTag.class
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/taglib/SelectOrderShuttleTag.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/taglib/SelectOrderShuttleTagHandler$SelectOrderShuttleTagHandlerMetaRule.class
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/taglib/SelectOrderShuttleTagHandler$SelectOrderShuttleTagHandlerMetaRule.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/taglib/SelectOrderShuttleTagHandler.class
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/orderingList/target/classes/org/richfaces/taglib/SelectOrderShuttleTagHandler.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/component/html/HtmlSelectOrderShuttle.java
===================================================================
--- trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/component/html/HtmlSelectOrderShuttle.java (rev 0)
+++ trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/component/html/HtmlSelectOrderShuttle.java 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,97 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+
+package org.richfaces.component.html;
+
+import java.lang.String ;
+import org.richfaces.component.UISelectOrderShuttle ;
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+/**
+ * Component-Type org.richfaces.SelectOrderShuttle
+ * Component-Family org.richfaces.SelectOrderShuttle
+ * Renderer-Type org.richfaces.SelectOrderShuttleRenderer
+ *
+ */
+ public class HtmlSelectOrderShuttle extends org.richfaces.component.UISelectOrderShuttle {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.SelectOrderShuttle";
+
+ /**
+ * Constructor to init default renderers
+ */
+ public HtmlSelectOrderShuttle (){
+ setRendererType("org.richfaces.SelectOrderShuttleRenderer");
+ }
+
+// Component properties fields
+ /**
+ * onmousemove
+ * HTML: script expression; a pointer was moved within.
+ */
+ private String _onmousemove = null; /* Default is ""*/
+
+// Getters-setters
+ /**
+ * HTML: script expression; a pointer was moved within.
+ * Setter for onmousemove
+ * @param onmousemove - new value
+ */
+ public void setOnmousemove( String __onmousemove ){
+ this._onmousemove = __onmousemove;
+ }
+
+
+ /**
+ * HTML: script expression; a pointer was moved within.
+ * Getter for onmousemove
+ * @return onmousemove value from local variable or value bindings
+ */
+ public String getOnmousemove( ){
+ if (null != this._onmousemove)
+ {
+ return this._onmousemove;
+ }
+ ValueBinding vb = getValueBinding("onmousemove");
+ if (null != vb){
+ return (String)vb.getValue(getFacesContext());
+ } else {
+ return "";
+ }
+ }
+
+// Component family.
+ public static final String COMPONENT_FAMILY = "org.richfaces.SelectOrderShuttle";
+
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+// Save state
+// ----------------------------------------------------- StateHolder Methods
+
+
+ public Object saveState(FacesContext context) {
+ Object values[] = new Object[2];
+ values[0] = super.saveState(context);
+ values[1] = _onmousemove;
+
+ return values;
+ }
+
+
+ public void restoreState(FacesContext context, Object state) {
+ Object values[] = (Object[]) state;
+ super.restoreState(context, values[0]);
+ _onmousemove = (String)values[1] ;
+
+
+
+ }
+// Utilites
+
+}
\ No newline at end of file
Added: trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/renderkit/html/SelectOrderShuttleRenderer.java
===================================================================
--- trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/renderkit/html/SelectOrderShuttleRenderer.java (rev 0)
+++ trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/renderkit/html/SelectOrderShuttleRenderer.java 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,271 @@
+/**
+ * License Agreement.
+ *
+ * Ajax4jsf 1.1 - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html;
+
+
+//
+// Imports
+//
+import java.util.Iterator;
+import java.util.Collection;
+import java.io.IOException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import org.ajax4jsf.renderkit.ComponentsVariableResolver;
+import org.ajax4jsf.renderkit.ComponentVariables;
+import org.ajax4jsf.resource.InternetResource;
+import org.ajax4jsf.resource.InternetResource;
+//
+//
+//
+
+
+import org.richfaces.renderkit.html.SelectOrderShuttleRendererBase;
+
+
+
+/**
+ * Renderer for component class org.richfaces.renderkit.html.SelectOrderShuttleRenderer
+ */
+public class SelectOrderShuttleRenderer extends SelectOrderShuttleRendererBase {
+
+ public SelectOrderShuttleRenderer () {
+ super();
+ }
+
+ //
+ // Declarations
+ //
+ private final InternetResource[] styles = {
+ getResource("css/selectOrderShuttle.xcss")
+ };
+
+private InternetResource[] stylesAll = null;
+
+protected InternetResource[] getStyles() {
+ synchronized (this) {
+ if (stylesAll == null) {
+ InternetResource[] rsrcs = super.getStyles();
+ boolean ignoreSuper = rsrcs == null || rsrcs.length == 0;
+ boolean ignoreThis = styles == null || styles.length == 0;
+
+ if (ignoreSuper) {
+ if (ignoreThis) {
+ stylesAll = new InternetResource[0];
+ } else {
+ stylesAll = styles;
+ }
+ } else {
+ if (ignoreThis) {
+ stylesAll = rsrcs;
+ } else {
+ java.util.Set rsrcsSet = new java.util.LinkedHashSet();
+
+ for (int i = 0; i < rsrcs.length; i++ ) {
+ rsrcsSet.add(rsrcs[i]);
+ }
+
+ for (int i = 0; i < styles.length; i++ ) {
+ rsrcsSet.add(styles[i]);
+ }
+
+ stylesAll = (InternetResource[]) rsrcsSet.toArray(new InternetResource[rsrcsSet.size()]);
+ }
+ }
+ }
+ }
+
+ return stylesAll;
+}
+ private final InternetResource[] scripts = {
+ getResource("scripts/StringBuilder.js")
+ ,
+ getResource("scripts/SelectItem.js")
+ ,
+ getResource("scripts/SelectOrderShuttle.js")
+ };
+
+private InternetResource[] scriptsAll = null;
+
+protected InternetResource[] getScripts() {
+ synchronized (this) {
+ if (scriptsAll == null) {
+ InternetResource[] rsrcs = super.getScripts();
+ boolean ignoreSuper = rsrcs == null || rsrcs.length == 0;
+ boolean ignoreThis = scripts == null || scripts.length == 0;
+
+ if (ignoreSuper) {
+ if (ignoreThis) {
+ scriptsAll = new InternetResource[0];
+ } else {
+ scriptsAll = scripts;
+ }
+ } else {
+ if (ignoreThis) {
+ scriptsAll = rsrcs;
+ } else {
+ java.util.Set rsrcsSet = new java.util.LinkedHashSet();
+
+ for (int i = 0; i < rsrcs.length; i++ ) {
+ rsrcsSet.add(rsrcs[i]);
+ }
+
+ for (int i = 0; i < scripts.length; i++ ) {
+ rsrcsSet.add(scripts[i]);
+ }
+
+ scriptsAll = (InternetResource[]) rsrcsSet.toArray(new InternetResource[rsrcsSet.size()]);
+ }
+ }
+ }
+ }
+
+ return scriptsAll;
+}
+ //
+ //
+ //
+
+
+ private String convertToString(Object obj ) {
+ return ( obj == null ? "" : obj.toString() );
+ }
+ private String convertToString(boolean b ) {
+ return String.valueOf(b);
+ }
+ private String convertToString(int b ) {
+ return b!=Integer.MIN_VALUE?String.valueOf(b):"";
+ }
+ private String convertToString(long b ) {
+ return b!=Long.MIN_VALUE?String.valueOf(b):"";
+ }
+
+ /**
+ * Get base component class, targetted for this renderer. Used for check arguments in decode/encode.
+ * @return
+ */
+ protected Class getComponentClass() {
+ return org.richfaces.component.UISelectOrderShuttle.class;
+ }
+
+
+ public void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component ) throws IOException {
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
+ doEncodeBegin(writer, context, (org.richfaces.component.UISelectOrderShuttle)component, variables );
+ }
+
+ public void doEncodeBegin(ResponseWriter writer, FacesContext context, org.richfaces.component.UISelectOrderShuttle component, ComponentVariables variables ) throws IOException {
+ java.lang.String clientId = component.getClientId(context);
+writer.startElement("div", component);
+ getUtils().writeAttribute(writer, "id", clientId );
+
+
+ }
+
+ public void doEncodeChildren(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
+ doEncodeChildren(writer, context, (org.richfaces.component.UISelectOrderShuttle)component, variables );
+ }
+
+ public void doEncodeChildren(ResponseWriter writer, FacesContext context, org.richfaces.component.UISelectOrderShuttle component, ComponentVariables variables) throws IOException {
+
+renderChildren(context, component);
+
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.render.Renderer#getRendersChildren()
+ */
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+ public void doEncodeEnd(ResponseWriter writer, FacesContext context, org.richfaces.component.UISelectOrderShuttle component, ComponentVariables variables) throws IOException {
+
+writer.endElement("div");
+writer.startElement("a", component);
+ getUtils().writeAttribute(writer, "href", "#" );
+ getUtils().writeAttribute(writer, "onclick", "shuttle.sort();" );
+
+writer.writeText(convertToString("Header"),null);
+
+writer.endElement("a");
+writer.startElement("br", component);
+
+writer.endElement("br");
+writer.startElement("a", component);
+ getUtils().writeAttribute(writer, "href", "#" );
+ getUtils().writeAttribute(writer, "onclick", "shuttle.moveSelectedItems('up');" );
+
+writer.writeText(convertToString("up"),null);
+
+writer.endElement("a");
+writer.startElement("br", component);
+
+writer.endElement("br");
+writer.startElement("a", component);
+ getUtils().writeAttribute(writer, "href", "#" );
+ getUtils().writeAttribute(writer, "onclick", "shuttle.moveSelectedItems('down');" );
+
+writer.writeText(convertToString("down"),null);
+
+writer.endElement("a");
+writer.startElement("br", component);
+
+writer.endElement("br");
+writer.startElement("a", component);
+ getUtils().writeAttribute(writer, "href", "#" );
+ getUtils().writeAttribute(writer, "onclick", "shuttle.moveSelectedItems('first');" );
+
+writer.writeText(convertToString("first"),null);
+
+writer.endElement("a");
+writer.startElement("br", component);
+
+writer.endElement("br");
+writer.startElement("a", component);
+ getUtils().writeAttribute(writer, "href", "#" );
+ getUtils().writeAttribute(writer, "onclick", "shuttle.moveSelectedItems('last');" );
+
+writer.writeText(convertToString("last"),null);
+
+writer.endElement("a");
+writer.startElement("script", component);
+ getUtils().writeAttribute(writer, "type", "text/javascript" );
+
+writer.writeText(convertToString(convertToString(initJSShuttleObject(context,component)) + "\n document.body.onselectstart = function() {return false;};\n document.body.className = \"body\";"),null);
+
+writer.endElement("script");
+
+ }
+
+ public void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ ComponentVariables variables = ComponentsVariableResolver.getVariables(this, component);
+ doEncodeEnd(writer, context, (org.richfaces.component.UISelectOrderShuttle)component, variables );
+
+ ComponentsVariableResolver.removeVariables(this, component);
+ }
+
+
+}
Added: trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/taglib/SelectOrderShuttleTag.java
===================================================================
--- trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/taglib/SelectOrderShuttleTag.java (rev 0)
+++ trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/taglib/SelectOrderShuttleTag.java 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,52 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+package org.richfaces.taglib;
+
+import java.lang.String ;
+import org.ajax4jsf.webapp.taglib.HtmlComponentTagBase ;
+import javax.faces.component.UIComponent;
+import org.richfaces.component.html.HtmlSelectOrderShuttle;
+
+public class SelectOrderShuttleTag extends org.ajax4jsf.webapp.taglib.HtmlComponentTagBase {
+
+// Fields
+ // Setters
+ // Release
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.components.taglib.html.HtmlCommandButtonTagBase#release()
+ */
+ public void release()
+ {
+ // TODO Auto-generated method stub
+ super.release();
+ }
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.components.taglib.html.HtmlCommandButtonTagBase#setProperties(javax.faces.component.UIComponent)
+ */
+ protected void setProperties(UIComponent component)
+ {
+ // TODO Auto-generated method stub
+ super.setProperties(component);
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.webapp.UIComponentTag#getComponentType()
+ */
+ public String getComponentType() {
+ // TODO Auto-generated method stub
+ return "org.richfaces.SelectOrderShuttle";
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.webapp.UIComponentTag#getRendererType()
+ */
+ public String getRendererType() {
+ return "org.richfaces.SelectOrderShuttleRenderer";
+ }
+
+}
Added: trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/taglib/SelectOrderShuttleTagHandler.java
===================================================================
--- trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/taglib/SelectOrderShuttleTagHandler.java (rev 0)
+++ trunk/sandbox/ui/orderingList/target/generated-component/java/org/richfaces/taglib/SelectOrderShuttleTagHandler.java 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,60 @@
+/**
+ * GENERATED FILE - DO NOT EDIT
+ *
+ */
+
+package org.richfaces.taglib;
+
+import java.lang.String ;
+import com.sun.facelets.tag.jsf.ComponentHandler ;
+import javax.faces.component.UIComponent;
+import org.richfaces.component.html.HtmlSelectOrderShuttle;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+
+import com.sun.facelets.*;
+import com.sun.facelets.el.*;
+import com.sun.facelets.tag.*;
+/**
+ * @author shura (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.4 $ $Date: 2007/02/20 20:58:03 $
+ *
+ */
+public class SelectOrderShuttleTagHandler extends com.sun.facelets.tag.jsf.ComponentHandler {
+
+
+ private static final SelectOrderShuttleTagHandlerMetaRule metaRule = new SelectOrderShuttleTagHandlerMetaRule();
+
+
+
+ public SelectOrderShuttleTagHandler(ComponentConfig config)
+ {
+ super(config);
+ }
+// Metarule
+ protected MetaRuleset createMetaRuleset(Class type)
+ {
+ MetaRuleset m = super.createMetaRuleset(type);
+ m.addRule(metaRule);
+ return m;
+ }
+
+ /**
+ * @author shura (latest modification by $Author: ishabalov $)
+ * @version $Revision: 1.1.2.4 $ $Date: 2007/02/20 20:58:03 $
+ *
+ */
+ static class SelectOrderShuttleTagHandlerMetaRule extends MetaRule{
+
+ /* (non-Javadoc)
+ * @see com.sun.facelets.tag.MetaRule#applyRule(java.lang.String, com.sun.facelets.tag.TagAttribute, com.sun.facelets.tag.MetadataTarget)
+ */
+ public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(HtmlSelectOrderShuttle.class)) {
+ }
+ return null;
+ }
+
+ }
+
+ }
Added: trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/faces-config.xml
===================================================================
--- trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/faces-config.xml (rev 0)
+++ trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/faces-config.xml 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+
+
+
+
+
+
+
+ <component>
+ <description></description>
+ <component-type>org.richfaces.SelectOrderShuttle</component-type>
+ <component-class>org.richfaces.component.html.HtmlSelectOrderShuttle</component-class>
+
+ <component-extension>
+ <component-family>org.richfaces.SelectOrderShuttle</component-family>
+ <renderer-type>org.richfaces.SelectOrderShuttleRenderer</renderer-type>
+ </component-extension>
+ </component>
+
+ <render-kit>
+ <render-kit-id>HTML_BASIC</render-kit-id>
+ <renderer>
+ <component-family>org.richfaces.SelectOrderShuttle</component-family>
+ <renderer-type>
+ org.richfaces.SelectOrderShuttleRenderer
+ </renderer-type>
+ <renderer-class>
+ org.richfaces.renderkit.html.SelectOrderShuttleRenderer
+ </renderer-class>
+ </renderer>
+ </render-kit>
+
+
+</faces-config>
Added: trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/orderingList.taglib.xml
===================================================================
--- trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/orderingList.taglib.xml (rev 0)
+++ trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/orderingList.taglib.xml 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE facelet-taglib PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+ "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+<facelet-taglib xmlns="http://java.sun.com/JSF/Facelet">
+ <namespace>http://labs.jboss.com/jbossrichfaces/ui/ui/orderingList</namespace>
+
+
+
+ <tag>
+ <tag-name>selectOrderShuttle</tag-name>
+ <component>
+ <component-type>org.richfaces.SelectOrderShuttle</component-type>
+ <renderer-type>
+ org.richfaces.SelectOrderShuttleRenderer
+ </renderer-type>
+ <handler-class>
+ org.richfaces.taglib.SelectOrderShuttleTagHandler
+ </handler-class>
+ </component>
+
+ </tag>
+
+
+
+</facelet-taglib>
\ No newline at end of file
Added: trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/orderingList.tld
===================================================================
--- trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/orderingList.tld (rev 0)
+++ trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/orderingList.tld 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+ "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+ <tlib-version>1.2</tlib-version>
+ <jsp-version>1.2</jsp-version>
+ <short-name>orderingList</short-name>
+ <uri>http://labs.jboss.com/jbossrichfaces/ui/ui/orderingList</uri>
+
+
+ <tag>
+ <name>selectOrderShuttle</name>
+ <tag-class>org.richfaces.taglib.SelectOrderShuttleTag</tag-class>
+ <body-content>JSP</body-content>
+ <description></description>
+ <attribute>
+ <name>rendered</name>
+ <rtexprvalue>false</rtexprvalue>
+ <description>If "false", this component is not rendered</description>
+ </attribute>
+ <attribute>
+ <name>binding</name>
+ <rtexprvalue>false</rtexprvalue>
+ <description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+ </attribute>
+ <attribute>
+ <name>onmousemove</name>
+ <rtexprvalue>false</rtexprvalue>
+ <description>HTML: script expression; a pointer was moved within.</description>
+ </attribute>
+ <attribute>
+ <name>id</name>
+ <rtexprvalue>false</rtexprvalue>
+ <description>Every component may have a unique id that is automatically created if omitted</description>
+ </attribute>
+ </tag>
+
+
+
+
+
+</taglib>
\ No newline at end of file
Added: trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/resources-config.xml
===================================================================
--- trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/resources-config.xml (rev 0)
+++ trunk/sandbox/ui/orderingList/target/generated-component/resources/META-INF/resources-config.xml 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resource-config>
+<!-- Include manual created resource -->
+
+
+
+ <resource>
+ <name>css/selectOrderShuttle.xcss</name>
+ <path>org/richfaces/renderkit/html/css/selectOrderShuttle.xcss</path>
+ </resource>
+ <resource>
+ <name>scripts/SelectOrderShuttle.js</name>
+ <path>org/richfaces/renderkit/html/scripts/SelectOrderShuttle.js</path>
+ </resource>
+ <resource>
+ <name>scripts/SelectItem.js</name>
+ <path>org/richfaces/renderkit/html/scripts/SelectItem.js</path>
+ </resource>
+ <resource>
+ <name>scripts/StringBuilder.js</name>
+ <path>org/richfaces/renderkit/html/scripts/StringBuilder.js</path>
+ </resource>
+</resource-config>
Added: trunk/sandbox/ui/orderingList/target/mvn-eclipse-cache.properties
===================================================================
--- trunk/sandbox/ui/orderingList/target/mvn-eclipse-cache.properties (rev 0)
+++ trunk/sandbox/ui/orderingList/target/mvn-eclipse-cache.properties 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,2 @@
+#Temporary index for unavailable sources and javadocs
+#Fri Oct 26 16:05:36 EEST 2007
Added: trunk/sandbox/ui/orderingList/target/orderingList-1.0-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/orderingList/target/orderingList-1.0-SNAPSHOT-sources.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/orderingList/target/orderingList-1.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/orderingList/target/orderingList-1.0-SNAPSHOT.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox/ui/orderingList/target/surefire-reports/TEST-org.richfaces.component.JSFComponentTest.xml
===================================================================
--- trunk/sandbox/ui/orderingList/target/surefire-reports/TEST-org.richfaces.component.JSFComponentTest.xml (rev 0)
+++ trunk/sandbox/ui/orderingList/target/surefire-reports/TEST-org.richfaces.component.JSFComponentTest.xml 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="0" skipped="0" tests="1" time="0.031" failures="0" name="org.richfaces.component.JSFComponentTest">
+ <properties>
+ <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
+ <property value="C:\Program Files\Java\jdk1.5.0_06\jre\bin" name="sun.boot.library.path"/>
+ <property value="1.5.0_06-b05" name="java.vm.version"/>
+ <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
+ <property value="http://java.sun.com/" name="java.vendor.url"/>
+ <property value=";" name="path.separator"/>
+ <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
+ <property value="sun.io" name="file.encoding.pkg"/>
+ <property value="RU" name="user.country"/>
+ <property value="Service Pack 2" name="sun.os.patch.level"/>
+ <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
+ <property value="D:\RichFaces\trunk\sandbox\ui\orderingList" name="user.dir"/>
+ <property value="1.5.0_06-b05" name="java.runtime.version"/>
+ <property value="sun.awt.Win32GraphicsEnvironment" name="java.awt.graphicsenv"/>
+ <property value="D:\RichFaces\trunk\sandbox\ui\orderingList" name="basedir"/>
+ <property value="C:\Program Files\Java\jdk1.5.0_06\jre\lib\endorsed" name="java.endorsed.dirs"/>
+ <property value="x86" name="os.arch"/>
+ <property value="C:\DOCUME~1\STRIPT~1\LOCALS~1\Temp\" name="java.io.tmpdir"/>
+ <property value="
+" name="line.separator"/>
+ <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
+ <property value="" name="user.variant"/>
+ <property value="Windows XP" name="os.name"/>
+ <property value="Cp1251" name="sun.jnu.encoding"/>
+ <property value="C:\Program Files\Java\jdk1.5.0_06\jre\bin;.;C:\WINDOWS\system32;C:\WINDOWS;"C:\maven-2.0.7\bin"" name="java.library.path"/>
+ <property value="Java Platform API Specification" name="java.specification.name"/>
+ <property value="49.0" name="java.class.version"/>
+ <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
+ <property value="5.1" name="os.version"/>
+ <property value="C:\Documents and Settings\striptocid" name="user.home"/>
+ <property value="" name="user.timezone"/>
+ <property value="sun.awt.windows.WPrinterJob" name="java.awt.printerjob"/>
+ <property value="Cp1251" name="file.encoding"/>
+ <property value="1.5" name="java.specification.version"/>
+ <property value="striptocid" name="user.name"/>
+ <property value="C:\Documents and Settings\striptocid\.m2\repository\org\codehaus\plexus\plexus-archiver\1.0-alpha-7\plexus-archiver-1.0-alpha-7.jar;C:\Documents and Settings\striptocid\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar;C:\Documents and Settings\striptocid\.m2\repository\org\apache\maven\surefire\surefire-api\2.3\surefire-api-2.3.jar;C:\Documents and Settings\striptocid\.m2\repository\org\codehaus\plexus\plexus-container-default\1.0-alpha-8\plexus-container-default-1.0-alpha-8.jar;C:\Documents and Settings\striptocid\.m2\repository\classworlds\classworlds\1.1-alpha-2\classworlds-1.1-alpha-2.jar;C:\Documents and Settings\striptocid\.m2\repository\org\codehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar;C:\Documents and Settings\striptocid\.m2\repository\commons-lang\commons-lang\2.1\commons-lang-2.1.jar;C:\Documents and Settings\striptocid\.m2\repository\org\apache\maven\surefire\surefire-booter\2.3\surefire-booter-2.3.jar" name="java.class.path"/>
+ <property value="1.0" name="java.vm.specification.version"/>
+ <property value="32" name="sun.arch.data.model"/>
+ <property value="C:\Program Files\Java\jdk1.5.0_06\jre" name="java.home"/>
+ <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
+ <property value="ru" name="user.language"/>
+ <property value="sun.awt.windows.WToolkit" name="awt.toolkit"/>
+ <property value="mixed mode, sharing" name="java.vm.info"/>
+ <property value="1.5.0_06" name="java.version"/>
+ <property value="C:\Program Files\Java\jdk1.5.0_06\jre\lib\ext" name="java.ext.dirs"/>
+ <property value="C:\Program Files\Java\jdk1.5.0_06\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_06\jre\lib\i18n.jar;C:\Program Files\Java\jdk1.5.0_06\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.5.0_06\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.5.0_06\jre\lib\jce.jar;C:\Program Files\Java\jdk1.5.0_06\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.5.0_06\jre\classes" name="sun.boot.class.path"/>
+ <property value="Sun Microsystems Inc." name="java.vendor"/>
+ <property value="C:\Documents and Settings\striptocid\.m2\repository" name="localRepository"/>
+ <property value="\" name="file.separator"/>
+ <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
+ <property value="little" name="sun.cpu.endian"/>
+ <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
+ <property value="windows" name="sun.desktop"/>
+ <property value="" name="sun.cpu.isalist"/>
+ </properties>
+ <testcase time="0" name="testComponent"/>
+</testsuite>
\ No newline at end of file
Added: trunk/sandbox/ui/orderingList/target/surefire-reports/org.richfaces.component.JSFComponentTest.txt
===================================================================
--- trunk/sandbox/ui/orderingList/target/surefire-reports/org.richfaces.component.JSFComponentTest.txt (rev 0)
+++ trunk/sandbox/ui/orderingList/target/surefire-reports/org.richfaces.component.JSFComponentTest.txt 2007-10-26 13:22:55 UTC (rev 3562)
@@ -0,0 +1,4 @@
+-------------------------------------------------------------------------------
+Test set: org.richfaces.component.JSFComponentTest
+-------------------------------------------------------------------------------
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.062 sec
Added: trunk/sandbox/ui/orderingList/target/test-classes/org/richfaces/component/JSFComponentTest.class
===================================================================
(Binary files differ)
Property changes on: trunk/sandbox/ui/orderingList/target/test-classes/org/richfaces/component/JSFComponentTest.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 2 months
JBoss Rich Faces SVN: r3561 - trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-10-26 08:56:48 -0400 (Fri, 26 Oct 2007)
New Revision: 3561
Modified:
trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java
Log:
small fix
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 2007-10-26 12:56:32 UTC (rev 3560)
+++ trunk/ui/scrollableDataTable/src/main/java/org/richfaces/renderkit/html/ScrollableDataTableBaseRenderer.java 2007-10-26 12:56:48 UTC (rev 3561)
@@ -592,7 +592,9 @@
if(parameters.containsKey(s_id)){
String options = (String)parameters.get(s_id);
grid.setScrollPos(options);
- grid.setFirst(Integer.parseInt(options.split(",")[1]));
+ if(options.length() > 0){
+ grid.setFirst(Integer.parseInt(options.split(",")[1]));
+ }
}
17 years, 2 months
JBoss Rich Faces SVN: r3560 - in branches/3.1.x/ui/spacer/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-10-26 08:56:32 -0400 (Fri, 26 Oct 2007)
New Revision: 3560
Removed:
branches/3.1.x/ui/spacer/src/main/resources/org/richfaces/renderkit/html/css/spacer.xcss
Modified:
branches/3.1.x/ui/spacer/src/main/templates/spacer.jspx
Log:
http://jira.jboss.com/jira/browse/RF-1150
Deleted: branches/3.1.x/ui/spacer/src/main/resources/org/richfaces/renderkit/html/css/spacer.xcss
===================================================================
--- branches/3.1.x/ui/spacer/src/main/resources/org/richfaces/renderkit/html/css/spacer.xcss 2007-10-26 10:20:38 UTC (rev 3559)
+++ branches/3.1.x/ui/spacer/src/main/resources/org/richfaces/renderkit/html/css/spacer.xcss 2007-10-26 12:56:32 UTC (rev 3560)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:template xmlns:f='http:/jsf.exadel.com/template'
- xmlns:u='http:/jsf.exadel.com/template/util'
- xmlns="http://www.w3.org/1999/xhtml" >
- <f:verbatim><![CDATA[
-.dr-spr{
- display: block;
-}
-]]>
-</f:verbatim>
-</f:template>
Modified: branches/3.1.x/ui/spacer/src/main/templates/spacer.jspx
===================================================================
--- branches/3.1.x/ui/spacer/src/main/templates/spacer.jspx 2007-10-26 10:20:38 UTC (rev 3559)
+++ branches/3.1.x/ui/spacer/src/main/templates/spacer.jspx 2007-10-26 12:56:32 UTC (rev 3560)
@@ -10,7 +10,6 @@
baseclass="org.ajax4jsf.renderkit.HeaderResourcesRendererBase"
component="org.richfaces.component.UISpacer"
>
- <h:styles>css/spacer.xcss</h:styles>
<f:clientid var="clientId"/>
<f:resource var="spacer" name="images/spacer.gif"/>
<img id="#{clientId}"
@@ -18,8 +17,8 @@
height="#{component.attributes['height']}"
alt="#{component.attributes['title']}"
src="#{spacer}"
- class="dr_spr rich-spacer #{component.attributes['styleClass']}"
+ class="rich-spacer #{component.attributes['styleClass']}"
x:passThruWithExclusions="id,width,height,title,styleClass,class"
>
</img>
-</f:root>
\ No newline at end of file
+</f:root>
17 years, 2 months
JBoss Rich Faces SVN: r3559 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2007-10-26 06:20:38 -0400 (Fri, 26 Oct 2007)
New Revision: 3559
Modified:
trunk/docs/userguide/en/src/main/docbook/included/simpleTogglePanel.xml
Log:
http://jira.jboss.com/jira/browse/RF-1008 - replacing the screenshot from .gif on .png
Modified: trunk/docs/userguide/en/src/main/docbook/included/simpleTogglePanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/simpleTogglePanel.xml 2007-10-26 10:08:47 UTC (rev 3558)
+++ trunk/docs/userguide/en/src/main/docbook/included/simpleTogglePanel.xml 2007-10-26 10:20:38 UTC (rev 3559)
@@ -221,7 +221,7 @@
<title>Style classes of simpleTogglePanel</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/simpleTogglePanel3.gif"/>
+ <imagedata fileref="images/simpleTogglePanel3.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -248,7 +248,7 @@
<entry>Defines styles for header element of a simpleTogglePanel</entry>
</row>
<row>
- <entry>rich-stglpanel-marker</entry>
+ <entry>rich-stglpnl-marker</entry>
<entry>Defines styles for a wrapper <div> element for a marker</entry>
</row>
17 years, 2 months
JBoss Rich Faces SVN: r3558 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2007-10-26 06:08:47 -0400 (Fri, 26 Oct 2007)
New Revision: 3558
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tab.xml
Log:
http://jira.jboss.com/jira/browse/RF-920 -adding the screenshot
Modified: trunk/docs/userguide/en/src/main/docbook/included/tab.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tab.xml 2007-10-26 09:33:50 UTC (rev 3557)
+++ trunk/docs/userguide/en/src/main/docbook/included/tab.xml 2007-10-26 10:08:47 UTC (rev 3558)
@@ -175,6 +175,16 @@
<section>
<title>Definition of Custom Style Classes</title>
+ <figure>
+ <title>Classes names</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tab1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
<table>
<title>Classes names that define a tab</title>
<tgroup cols="2">
17 years, 2 months