JBoss Rich Faces SVN: r5715 - in trunk/sandbox/ui/pickList/src/main: resources/org/richfaces/renderkit/html/css and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-01-29 14:21:45 -0500 (Tue, 29 Jan 2008)
New Revision: 5715
Modified:
trunk/sandbox/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/css/picklist.xcss
trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/PickList.js
trunk/sandbox/ui/pickList/src/main/templates/htmlPickList.jspx
Log:
css classes are changed
Modified: trunk/sandbox/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
===================================================================
--- trunk/sandbox/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2008-01-29 19:19:34 UTC (rev 5714)
+++ trunk/sandbox/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2008-01-29 19:21:45 UTC (rev 5715)
@@ -191,11 +191,11 @@
StringBuffer rowClassName = new StringBuffer();
StringBuffer cellClassName = new StringBuffer();
if (source) {
- rowClassName.append("rich-shuttle-source-row");
- cellClassName.append("rich-shuttle-source-cell");
+ rowClassName.append("rich-pickList-source-row");
+ cellClassName.append("rich-pickList-source-cell");
} else {
- rowClassName.append("rich-shuttle-target-row");
- cellClassName.append("rich-shuttle-target-cell");
+ rowClassName.append("rich-pickList-target-row");
+ cellClassName.append("rich-pickList-target-cell");
}
/*
@@ -297,41 +297,6 @@
writer.endElement(HTML.IMG_ELEMENT);
}
- private void encodeSwapButton(FacesContext context, UIComponent component, String javaScriptFunction,
- boolean isRight,ResponseWriter writer) throws IOException {
-
- writer.startElement(HTML.BUTTON, component);
- String buttonStyle = (String)component.getAttributes().get("buttonStyle");
- String buttonStyleClass = (String)component.getAttributes().get("buttonStyleClass");
-
- writer.writeAttribute(HTML.class_ATTRIBUTE, "rich-pick-button" , null);
- writer.writeAttribute(HTML.style_ATTRIBUTE, buttonStyle, null);
- writer.writeAttribute(HTML.STYLE_CLASS_ATTR, buttonStyleClass, null);
-
- writer.writeAttribute("onmouseout", "this.className='rich-pick-button'", null);
- writer.writeAttribute("onmouseup", "this.className='rich-pick-button'", null);
- writer.writeAttribute("onmousedown", "this.className='rich-pick-button-press'", null);
- writer.writeAttribute("onmouseover", "this.className='rich-pick-button-light'", null);
-
- writer.writeAttribute(HTML.onclick_ATTRIBUTE, javaScriptFunction + "; return false;", null);
- writer.startElement(HTML.IMG_ELEMENT, component);
- String arrowURI = null;
-
- if(isRight) {
- arrowURI = getResource("org.richfaces.renderkit.images.PickListRightArrowImage").getUri(context, component);
- } else {
- arrowURI = getResource("org.richfaces.renderkit.images.PickListLeftArrowImage").getUri(context, component);
- }
-
- writer.writeAttribute(HTML.src_ATTRIBUTE, arrowURI, null);
- writer.writeAttribute(HTML.width_ATTRIBUTE, "15", null);
- writer.writeAttribute(HTML.height_ATTRIBUTE, "15", null);
- writer.writeAttribute(HTML.alt_ATTRIBUTE, "", null);
- writer.writeAttribute(HTML.border_ATTRIBUTE, "0", null);
- writer.endElement(HTML.IMG_ELEMENT);
- writer.endElement(HTML.BUTTON);
- }
-
public void encodeHiddenField(FacesContext context, UIComponent component) throws IOException {
UIPickList pl = (UIPickList) component;
ResponseWriter writer = context.getResponseWriter();
@@ -414,40 +379,40 @@
for (int i = 0; i < SHUTTLE_HELPERS.length; i++) {
encodeControlFacet(context, component, SHUTTLE_HELPERS[i], clientId, writer, true,
- "rich-list-shuttle-button", " rich-shuttle-control");
+ "rich-list-pickList-button", " rich-pickList-control");
}
}
protected void encodeControlFacet(FacesContext context,
- UIComponent component, OrderingComponentRendererBase.ControlsHelper helper,
- String clientId, ResponseWriter writer, boolean enabled, String baseStyle,
- String baseControlStyle) throws IOException {
- Locale locale = null;
-
- UIViewRoot viewRoot = context.getViewRoot();
- if (viewRoot != null) {
- locale = viewRoot.getLocale();
+ UIComponent component, OrderingComponentRendererBase.ControlsHelper helper,
+ String clientId, ResponseWriter writer, boolean enabled, String baseStyle,
+ String baseControlStyle) throws IOException {
+ Locale locale = null;
+
+ UIViewRoot viewRoot = context.getViewRoot();
+ if (viewRoot != null) {
+ locale = viewRoot.getLocale();
+ }
+
+ ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
+ ResourceBundle bundle = null;
+
+ if (locale != null) {
+ try {
+ bundle = ResourceBundle.getBundle(bundleName, locale, contextClassLoader);
+ } catch (MissingResourceException e) {
+
+ }
+ }
+
+ Map attributes = component.getAttributes();
+ UIComponent facet = component.getFacet(helper.getFacetName());
+ boolean useFacet = (facet != null && facet.isRendered());
+
+ renderDefaultControl(context, component, writer, useFacet,
+ helper, clientId, bundle ,enabled, baseStyle, baseControlStyle);
}
- ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
- ResourceBundle bundle = null;
-
- if (locale != null) {
- try {
- bundle = ResourceBundle.getBundle(bundleName, locale, contextClassLoader);
- } catch (MissingResourceException e) {
-
- }
- }
-
- Map attributes = component.getAttributes();
- UIComponent facet = component.getFacet(helper.getFacetName());
- boolean useFacet = (facet != null && facet.isRendered());
-
- renderDefaultControl(context, component, writer, useFacet,
- helper, clientId, bundle ,enabled, baseStyle, baseControlStyle);
- }
-
protected void renderDefaultControl(FacesContext context,
UIComponent orderingList, ResponseWriter writer,
boolean useFacet, OrderingComponentRendererBase.ControlsHelper helper, String clientId, ResourceBundle bundle,
Modified: trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/css/picklist.xcss
===================================================================
--- trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/css/picklist.xcss 2008-01-29 19:19:34 UTC (rev 5714)
+++ trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/css/picklist.xcss 2008-01-29 19:21:45 UTC (rev 5715)
@@ -5,19 +5,19 @@
<f:verbatim><![CDATA[
-.rich-shuttle-controls {
+.rich-pickList-controls {
padding : 0px 8px 5px 8px;
}
-.rich-shuttle-list-content {
+.rich-pickList-list-content {
overflow: auto;
}
-.rich-shuttle-list-header {
+.rich-pickList-list-header {
overflow: hidden;
}
-.rich-shuttle-header-tab-cell, .rich-shuttle-header-tab-cell-last {
+.rich-pickList-header-tab-cell, .rich-pickList-header-tab-cell-last {
padding : 2px;
border-style: solid;
font-weight: normal;
@@ -27,7 +27,7 @@
border-left: 0px;
}
-.rich-shuttle-internal-tab {
+.rich-pickList-internal-tab {
width:100%;
}
@@ -37,13 +37,13 @@
]]>
</f:verbatim>
-<u:selector name=".rich-shuttle-list">
+<u:selector name=".rich-pickList-list">
<u:style name="background-color" skin="tableBackgroundColor"/>
<u:style name="border-width" value="0px" />
<u:style name="border-style" value="none" />
</u:selector>
-<u:selector name=".rich-shuttle-source-cell, .rich-shuttle-target-cell, .rich-shuttle-source-cell *, .rich-shuttle-target-cell *">
+<u:selector name=".rich-pickList-source-cell, .rich-pickList-target-cell, .rich-pickList-source-cell *, .rich-pickList-target-cell *">
<u:style name="color" skin="generalTextColor"/>
<u:style name="font-size" skin="generalSizeFont"/>
<u:style name="font-family" skin="generalFamilyFont"/>
@@ -52,105 +52,105 @@
<f:verbatim><![CDATA[
-.rich-shuttle-control-disabled, .rich-shuttle-control-top, .rich-shuttle-control-bottom,
-.rich-shuttle-control-up, .rich-shuttle-control-down, .rich-shuttle-control-copyall,
-.rich-shuttle-control-copy, .rich-shuttle-control-remove, .rich-shuttle-control-removeall {
+.rich-pickList-control-disabled, .rich-pickList-control-top, .rich-pickList-control-bottom,
+.rich-pickList-control-up, .rich-pickList-control-down, .rich-pickList-control-copyall,
+.rich-pickList-control-copy, .rich-pickList-control-remove, .rich-pickList-control-removeall {
border : 1px solid;
margin-bottom : 3px;
}
-.rich-list-shuttle-button, .rich-list-shuttle-button-disabled {
+.rich-list-pickList-button, .rich-list-pickList-button-disabled {
background : top left repeat-x;
padding : 2px;
}
-.rich-list-shuttle-button {
+.rich-list-pickList-button {
cursor : pointer;
}
-.rich-list-shuttle-button-light {
+.rich-list-pickList-button-light {
background : top left repeat-x;
border-style: solid;
cursor : pointer;
padding: 1px;
}
-.rich-list-shuttle-button-press {
+.rich-list-pickList-button-press {
background : top left repeat-x;
border-style: solid;
padding : 2px 0px 0px 2px;
}
-.rich-list-shuttle-button-valign {
+.rich-list-pickList-button-valign {
vertical-align : middle;
}
-.rich-list-shuttle-button-layout {
+.rich-list-pickList-button-layout {
padding : 15px 8px 15px 0px;
}
-.rich-list-shuttle-button-content {
+.rich-list-pickList-button-content {
padding : 0px 4px 0px 1px;
text-align : left;
white-space: nowrap;
}
-.rich-list-shuttle-button-content img {
+.rich-list-pickList-button-content img {
margin-right: 2px;
vertical-align: middle;
}
-a.rich-list-shuttle-button-selection:visited,
-a.rich-list-shuttle-button-selection:link {
+a.rich-list-pickList-button-selection:visited,
+a.rich-list-pickList-button-selection:link {
color: inherit;
}
-.rich-list-shuttle-button-a-disabled {
+.rich-list-pickList-button-a-disabled {
cursor: default;
text-decoration: none;
}
-.rich-list-shuttle-caption {
+.rich-list-pickList-caption {
text-align: left;
padding : 1px;
}
-.rich-shuttle-source-caption {
+.rich-pickList-source-caption {
padding: 3px 3px 3px 8px;
}
-.rich-shuttle-target-caption {
+.rich-pickList-target-caption {
padding: 3px 3px 3px 0px;
}
-.rich-shuttle-source-items {
+.rich-pickList-source-items {
margin: 0px 0px 8px 8px;
}
-.rich-shuttle-target-items {
+.rich-pickList-target-items {
margin: 0px 0px 8px 0px;
}
-.rich-shuttle-source-row-active, .rich-shuttle-target-row-active {
+.rich-pickList-source-row-active, .rich-pickList-target-row-active {
background : transparent none repeat-x scroll left top;
}
-.rich-shuttle-source-row-selected, .rich-shuttle-target-row-selected {
+.rich-pickList-source-row-selected, .rich-pickList-target-row-selected {
background : transparent none repeat-x scroll left top;
}
-.rich-shuttle-source-cell, .rich-shuttle-target-cell {
+.rich-pickList-source-cell, .rich-pickList-target-cell {
padding : 2px;
white-space: nowrap;
border: 0px;
}
-.rich-shuttle-source-cell-selected, .rich-shuttle-target-cell-selected {
+.rich-pickList-source-cell-selected, .rich-pickList-target-cell-selected {
padding : 2px;
white-space: nowrap;
}
-.rich-shuttle-source-cell-active, .rich-shuttle-target-cell-active {
+.rich-pickList-source-cell-active, .rich-pickList-target-cell-active {
padding: 1px 2px;
white-space: nowrap;
border-top: 1px dotted;
@@ -160,7 +160,7 @@
]]>
</f:verbatim>
- <u:selector name=".rich-list-shuttle">
+ <u:selector name=".rich-list-pickList">
<!--u:style name="background-color" skin="additionalBackgroundColor" />
<u:style name="border-color" skin="tableBorderColor" />
<u:style name="border-width" skin="tableBorderWidth" />
@@ -168,7 +168,7 @@
<u:style name="-moz-user-select" value="-moz-none" />
</u:selector>
- <u:selector name=".rich-shuttle-header-tab-cell, .rich-shuttle-header-tab-cell-last">
+ <u:selector name=".rich-pickList-header-tab-cell, .rich-pickList-header-tab-cell-last">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.gradientimages.OrderingListHeaderGradient" />
</u:style>
@@ -184,11 +184,11 @@
<u:style name="border-bottom-color" skin="tableBorderColor" />
</u:selector>
- <u:selector name=".rich-shuttle-header-tab-cell-last">
+ <u:selector name=".rich-pickList-header-tab-cell-last">
<u:style name="border-right-width" value="0px" />
</u:selector>
-<u:selector name=".rich-list-shuttle-button">
+<u:selector name=".rich-list-pickList-button">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.gradientimages.OrderingListButtonGradient" />
</u:style>
@@ -198,7 +198,7 @@
<u:style name="font-size" skin="headerSizeFont"/>
</u:selector>
-<u:selector name=".rich-list-shuttle-button-disabled">
+<u:selector name=".rich-list-pickList-button-disabled">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.gradientimages.OrderingListButtonGradient" />
</u:style>
@@ -208,7 +208,7 @@
<u:style name="font-size" skin="headerSizeFont"/>
</u:selector>
- <u:selector name=".rich-list-shuttle-button-light">
+ <u:selector name=".rich-list-pickList-button-light">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.gradientimages.OrderingListButtonGradient" />
</u:style>
@@ -220,7 +220,7 @@
<u:style name="color" skin="generalTextColor"/>
</u:selector>
- <u:selector name=".rich-list-shuttle-button-press">
+ <u:selector name=".rich-list-pickList-button-press">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.html.gradientimages.OrderingListClickedGradient" />
</u:style>
@@ -232,24 +232,24 @@
<u:style name="color" skin="generalTextColor"/>
</u:selector>
- <u:selector name=".rich-shuttle-source-cell-last, .rich-shuttle-target-cell-last">
+ <u:selector name=".rich-pickList-source-cell-last, .rich-pickList-target-cell-last">
<u:style name="border-right-color" skin="selectControlColor" />
</u:selector>
- <u:selector name=".rich-shuttle-source-items, .rich-shuttle-target-items">
+ <u:selector name=".rich-pickList-source-items, .rich-pickList-target-items">
<u:style name="background-color" skin="generalBackgroundColor" />
<u:style name="border-color" skin="tableBorderColor" />
<u:style name="border-width" skin="tableBorderWidth" />
<u:style name="border-style" value="solid" />
</u:selector>
- <u:selector name=".rich-shuttle-source-cell-selected, .rich-shuttle-target-cell-selected, .rich-shuttle-source-cell-selected *, .rich-shuttle-target-cell-selected *">
+ <u:selector name=".rich-pickList-source-cell-selected, .rich-pickList-target-cell-selected, .rich-pickList-source-cell-selected *, .rich-pickList-target-cell-selected *">
<u:style name="color" skin="generalTextColor"/>
<u:style name="font-family" skin="generalFamilyFont" />
<u:style name="font-size" skin="generalSizeFont" />
</u:selector>
- <u:selector name=".rich-shuttle-source-cell-active, .rich-shuttle-target-cell-active, .rich-shuttle-source-cell-active *, .rich-shuttle-target-cell-active *">
+ <u:selector name=".rich-pickList-source-cell-active, .rich-pickList-target-cell-active, .rich-pickList-source-cell-active *, .rich-pickList-target-cell-active *">
<u:style name="font-size" skin="generalSizeFont" />
<u:style name="font-family" skin="generalFamilyFont" />
</u:selector>
@@ -258,32 +258,32 @@
<u:style name="border-bottom-color" skin="generalTextColor" />
</u:selector>
- <u:selector name=".rich-shuttle-control-disabled, .rich-shuttle-control-top, .rich-shuttle-control-bottom, .rich-shuttle-control-up, .rich-shuttle-control-down, .rich-shuttle-control-copyall, .rich-shuttle-control-copy, .rich-shuttle-control-remove, .rich-shuttle-control-removeall">
+ <u:selector name=".rich-pickList-control-disabled, .rich-pickList-control-top, .rich-pickList-control-bottom, .rich-pickList-control-up, .rich-pickList-control-down, .rich-pickList-control-copyall, .rich-pickList-control-copy, .rich-pickList-control-remove, .rich-pickList-control-removeall">
<u:style name="border-color" skin="tableBorderColor" />
</u:selector>
- <u:selector name=".rich-list-shuttle-button-content">
+ <u:selector name=".rich-list-pickList-button-content">
<u:style name="font-family" skin="headerFamilyFont" />
<u:style name="font-size" skin="headerSizeFont" />
</u:selector>
- <u:selector name=".rich-list-shuttle-button-selection">
+ <u:selector name=".rich-list-pickList-button-selection">
<u:style name="color" skin="generalTextColor" />
<u:style name="text-decoration" value="none" />
<u:style name="display" value="block" />
</u:selector>
- <u:selector name="a.rich-list-shuttle-button-a-disabled a">
+ <u:selector name="a.rich-list-pickList-button-a-disabled a">
<u:style name="color" skin="tabDisabledTextColor"/>
</u:selector>
- <u:selector name=".rich-shuttle-source-caption, .rich-shuttle-target-caption">
+ <u:selector name=".rich-pickList-source-caption, .rich-pickList-target-caption">
<u:style name="font-family" skin="headerFamilyFont" />
<u:style name="font-size" skin="headerSizeFont" />
<u:style name="font-weight" skin="headerWeightFont" />
</u:selector>
- <u:selector name=".rich-shuttle-source-row-selected, .rich-shuttle-target-row-selected">
+ <u:selector name=".rich-pickList-source-row-selected, .rich-pickList-target-row-selected">
<u:style name="background-color" skin="additionalBackgroundColor" />
</u:selector>
}
Modified: trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/PickList.js
===================================================================
--- trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/PickList.js 2008-01-29 19:19:34 UTC (rev 5714)
+++ trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/PickList.js 2008-01-29 19:21:45 UTC (rev 5715)
@@ -64,36 +64,36 @@
Richfaces.PickList.Source.SelectItem = Class.create(Richfaces.PickListSI);
Richfaces.PickList.Source.SelectItem.prototype.CLASSES = {
ROW : {
- ACTIVE : "rich-shuttle-source-row-active",
- SELECTED : "rich-shuttle-source-row-selected",
- DISABLED : "rich-shuttle-source-row-disabled",
- NORMAL : "rich-shuttle-source-row"
+ ACTIVE : "rich-pickList-source-row-active",
+ SELECTED : "rich-pickList-source-row-selected",
+ DISABLED : "rich-pickList-source-row-disabled",
+ NORMAL : "rich-pickList-source-row"
},
CELL : {
- ACTIVE : "rich-shuttle-source-cell-active",
- SELECTED : "rich-shuttle-source-cell-selected",
- DISABLED : "rich-shuttle-source-cell-disabled",
- NORMAL : "rich-shuttle-source-cell",
- BEGIN: " rich-shuttle-source-cell-first",
- END: " rich-shuttle-source-cell-last"
+ ACTIVE : "rich-pickList-source-cell-active",
+ SELECTED : "rich-pickList-source-cell-selected",
+ DISABLED : "rich-pickList-source-cell-disabled",
+ NORMAL : "rich-pickList-source-cell",
+ BEGIN: " rich-pickList-source-cell-first",
+ END: " rich-pickList-source-cell-last"
}
};
Richfaces.PickList.Target.SelectItem = Class.create(Richfaces.PickListSI);
Richfaces.PickList.Target.SelectItem.prototype.CLASSES = {
ROW : {
- ACTIVE : "rich-shuttle-target-row-active",
- SELECTED : "rich-shuttle-target-row-selected",
- DISABLED : "rich-shuttle-target-row-disabled",
- NORMAL : "rich-shuttle-target-row"
+ ACTIVE : "rich-pickList-target-row-active",
+ SELECTED : "rich-pickList-target-row-selected",
+ DISABLED : "rich-pickList-target-row-disabled",
+ NORMAL : "rich-pickList-target-row"
},
CELL : {
- ACTIVE : "rich-shuttle-target-cell-active",
- SELECTED : "rich-shuttle-target-cell-selected",
- DISABLED : "rich-shuttle-target-cell-disabled",
- NORMAL : "rich-shuttle-target-cell",
- BEGIN: " rich-shuttle-target-cell-first",
- END: " rich-shuttle-target-cell-last"
+ ACTIVE : "rich-pickList-target-cell-active",
+ SELECTED : "rich-pickList-target-cell-selected",
+ DISABLED : "rich-pickList-target-cell-disabled",
+ NORMAL : "rich-pickList-target-cell",
+ BEGIN: " rich-pickList-target-cell-first",
+ END: " rich-pickList-target-cell-last"
}
};
Modified: trunk/sandbox/ui/pickList/src/main/templates/htmlPickList.jspx
===================================================================
--- trunk/sandbox/ui/pickList/src/main/templates/htmlPickList.jspx 2008-01-29 19:19:34 UTC (rev 5714)
+++ trunk/sandbox/ui/pickList/src/main/templates/htmlPickList.jspx 2008-01-29 19:21:45 UTC (rev 5715)
@@ -29,7 +29,7 @@
<f:clientId var="clientId"/>
- <table id="#{clientId}" class="rich-list-shuttle #{component.attributes['styleClass']}"
+ <table id="#{clientId}" class="rich-list-pickList #{component.attributes['styleClass']}"
cellspacing="0" cellpadding="0"
x:passThruWithExclusions="id, class, styleClass">
<tbody>
@@ -55,10 +55,10 @@
<tr>
<td>
- <div class="rich-shuttle-source-items #{component.listClass}">
+ <div class="rich-pickList-source-items #{component.listClass}">
<input id="#{clientId}focusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;"/>
- <table id="#{clientId}table" cellpadding="0" cellspacing="0" class="rich-shuttle-body">
+ <table id="#{clientId}table" cellpadding="0" cellspacing="0" class="rich-pickList-body">
<tbody>
<tr>
<td style="border:0px;padding : 0px;">
@@ -82,8 +82,8 @@
}
]]>
</jsp:scriptlet>
- <div id="#{clientId}contentBox" class="rich-shuttle-list-content" style="#{contentContainerStyle}">
- <table id="#{clientId}internal_tab" class="rich-shuttle-internal-tab" cellpadding="0" cellspacing="0">
+ <div id="#{clientId}contentBox" class="rich-pickList-list-content" style="#{contentContainerStyle}">
+ <table id="#{clientId}internal_tab" class="rich-pickList-internal-tab" cellpadding="0" cellspacing="0">
<tbody id="#{clientId}tbody">
<f:call name="encodeSourceRows" />
</tbody>
@@ -97,7 +97,7 @@
</div>
</td>
<td style="vertical-align: #{component.moveControlsVerticalAlign};" >
- <div class="rich-shuttle-controls">
+ <div class="rich-pickList-controls">
<jsp:scriptlet><![CDATA[
encodePickListControlsFacets(context, component);
]]></jsp:scriptlet>
@@ -105,16 +105,16 @@
</td>
<td>
- <div class="rich-shuttle-target-items #{component.listClass}" >
+ <div class="rich-pickList-target-items #{component.listClass}" >
<input type="hidden" value=":" style="display: none;" name="#{baseClientId}" />
<f:call name="encodeHiddenField" />
<input id="#{clientId}tlFocusKeeper" type="button" value="" style="width: 1px; position: absolute; left: -32767px;"/>
- <table id="#{clientId}tlTable" cellpadding="0" cellspacing="0" class="rich-shuttle-body">
+ <table id="#{clientId}tlTable" cellpadding="0" cellspacing="0" class="rich-pickList-body">
<tbody>
<tr>
<td style="border:0px;padding : 0px;">
- <div id="#{clientId}tlHeaderBox" class="rich-shuttle-list">
+ <div id="#{clientId}tlHeaderBox" class="rich-pickList-list">
<jsp:scriptlet>
<![CDATA[
String trContentContainerStyle = "";
@@ -133,8 +133,8 @@
}
]]>
</jsp:scriptlet>
- <div id="#{clientId}tlContentBox" class="rich-shuttle-list-content" style="#{trContentContainerStyle}">
- <table id="#{clientId}tlInternal_tab" class="rich-shuttle-internal-tab" cellpadding="0" cellspacing="0">
+ <div id="#{clientId}tlContentBox" class="rich-pickList-list-content" style="#{trContentContainerStyle}">
+ <table id="#{clientId}tlInternal_tab" class="rich-pickList-internal-tab" cellpadding="0" cellspacing="0">
<tbody id="#{clientId}tlTbody">
<f:call name="encodeTargetRows" />
</tbody>
16 years, 11 months
JBoss Rich Faces SVN: r5714 - trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-01-29 14:19:34 -0500 (Tue, 29 Jan 2008)
New Revision: 5714
Modified:
trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
Log:
http://jira.jboss.com/jira/browse/RF-2069
Modified: trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
===================================================================
--- trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2008-01-29 19:17:18 UTC (rev 5713)
+++ trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2008-01-29 19:19:34 UTC (rev 5714)
@@ -211,10 +211,13 @@
// this.header.style.overflowX="hidden";
// this.header.style.overflowY="visible";
// this.header.style.cursor="pointer";
- this.header.onclick=this.headerOnClick.bindAsEventListener(this);
- this.header.onselectstart=this.headerOnSelectStart.bindAsEventListener(this);
- this.header_act.onclick=this.headerOnClick.bindAsEventListener(this);
- this.header_act.onselectstart=this.headerOnSelectStart.bindAsEventListener(this);
+
+ Event.observe(this.header, "click", this.headerOnClick.bindAsEventListener(this));
+ Event.observe(this.header, "selectstart", this.headerOnSelectStart.bindAsEventListener(this));
+
+ Event.observe(this.header_act, "click", this.headerOnClick.bindAsEventListener(this));
+ Event.observe(this.header_act, "selectstart", this.headerOnSelectStart.bindAsEventListener(this));
+
this.content.style.display="none";
this.content.style.overflow="auto";
this.content.style.height="0px";
16 years, 11 months
JBoss Rich Faces SVN: r5713 - trunk/framework/impl/src/main/java/org/ajax4jsf/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-01-29 14:17:18 -0500 (Tue, 29 Jan 2008)
New Revision: 5713
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
Log:
http://jira.jboss.com/jira/browse/RF-2072
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2008-01-29 18:50:41 UTC (rev 5712)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2008-01-29 19:17:18 UTC (rev 5713)
@@ -23,12 +23,10 @@
import java.io.IOException;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
-import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -277,8 +275,8 @@
// for compability, complex models must provide values map between
// integer and key value.
localModel.setRowIndex(index);
- rowAvailable = isRowAvailable();
+ rowAvailable = isRowAvailable();
this._rowKey = localModel.getRowKey();
this._clientId = null;
@@ -339,8 +337,8 @@
this._clientId = null;
localModel.setRowKey(key);
- rowAvailable = isRowAvailable();
+ rowAvailable = isRowAvailable();
boolean rowSelected = key != null && rowAvailable;
//XXX check for row availability
@@ -808,11 +806,7 @@
* Saved values of {@link EditableValueHolder} fields per iterations.
*/
private Map childState;
-
- private List allDataChildren = null;
- private List editableDataChildren = null;
-
/**
* @param faces
* @return Saved values of {@link EditableValueHolder} fields per
@@ -832,30 +826,19 @@
}
/**
- * Save values of {@link EditableValueHolder} fields before change
- * current row.
+ * Save values of {@link EditableValueHolder} fields before change current
+ * row.
*
* @param faces
*/
- protected void saveChildState(FacesContext faces) {
- Map childState = this.getChildState(faces);
- if (null == editableDataChildren) {
- allDataChildren = new ArrayList();
- editableDataChildren = new ArrayList();
- Iterator itr = dataChildren();
- while (itr.hasNext()) {
- this
- .saveChildState(faces, (UIComponent) itr.next(),
- childState);
- }
+ protected void saveChildState(FacesContext faces) {
- } else {
- for (Iterator c = editableDataChildren.iterator(); c.hasNext();) {
- UIComponent child = (UIComponent) c.next();
- populateChildState(faces, child, childState);
- }
+ Iterator itr = dataChildren();
+ while (itr.hasNext()) {
+ Map childState = this.getChildState(faces);
+ this.saveChildState(faces, (UIComponent) itr.next(), childState);
+ }
}
- }
/**
* Recursive method for Iterate on children for save
@@ -867,10 +850,15 @@
*/
private void saveChildState(FacesContext faces, UIComponent c,
Map childState) {
- allDataChildren.add(c);
- if (c instanceof EditableValueHolder ) {
- populateChildState(faces, c, childState);
- editableDataChildren.add(c);
+
+ if (c instanceof EditableValueHolder && !c.isTransient()) {
+ String clientId = c.getClientId(faces);
+ SavedState ss = (SavedState) childState.get(clientId);
+ if (ss == null) {
+ ss = new SavedState();
+ childState.put(clientId, ss);
+ }
+ ss.populate((EditableValueHolder) c);
}
// continue hack
@@ -885,52 +873,19 @@
}
/**
- * @param faces
- * @param c
- * @param childState
- */
- private void populateChildState(FacesContext faces, UIComponent c,
- Map childState) {
- String clientId = c.getClientId(faces);
- SavedState ss = (SavedState) childState.get(clientId);
- if (ss == null) {
- ss = new SavedState();
- childState.put(clientId, ss);
- }
- ss.populate((EditableValueHolder) c);
- }
-
- /**
- * Restore values of {@link EditableValueHolder} fields after change
- * current row.
+ * Restore values of {@link EditableValueHolder} fields after change current
+ * row.
*
* @param faces
*/
- protected void restoreChildState(FacesContext faces) {
- Map childState = this.getChildState(faces);
+ protected void restoreChildState(FacesContext faces) {
- if (null == editableDataChildren) {
- allDataChildren = new ArrayList();
- editableDataChildren = new ArrayList();
- Iterator itr = dataChildren();
- while (itr.hasNext()) {
- this.restoreChildState(faces, (UIComponent) itr.next(),
- childState);
- }
-
- } else {
- for (Iterator c = allDataChildren.iterator(); c.hasNext();) {
- UIComponent child = (UIComponent) c.next();
- // reset id
- String id = child.getId();
- child.setId(id);
- }
- for (Iterator c = editableDataChildren.iterator(); c.hasNext();) {
- UIComponent child = (UIComponent) c.next();
- applyChildState(faces, child, childState);
- }
+ Iterator itr = dataChildren();
+ while (itr.hasNext()) {
+ Map childState = this.getChildState(faces);
+ this.restoreChildState(faces, (UIComponent) itr.next(), childState);
+ }
}
- }
/**
* Recursive part of
@@ -946,11 +901,17 @@
// reset id
String id = c.getId();
c.setId(id);
- allDataChildren.add(c);
+
// hack
if (c instanceof EditableValueHolder) {
- applyChildState(faces, c, childState);
- editableDataChildren.add(c);
+ EditableValueHolder evh = (EditableValueHolder) c;
+ String clientId = c.getClientId(faces);
+ SavedState ss = (SavedState) childState.get(clientId);
+ if (ss != null) {
+ ss.apply(evh);
+ } else {
+ NullState.apply(evh);
+ }
}
// continue hack
@@ -965,23 +926,6 @@
}
/**
- * @param faces
- * @param c
- * @param childState
- */
- private void applyChildState(FacesContext faces, UIComponent c,
- Map childState) {
- EditableValueHolder evh = (EditableValueHolder) c;
- String clientId = c.getClientId(faces);
- SavedState ss = (SavedState) childState.get(clientId);
- if (ss != null) {
- ss.apply(evh);
- } else {
- NullState.apply(evh);
- }
- }
-
- /**
* Check for validation errors on children components. If true, saved values
* must be keep on render phase
*
@@ -1112,8 +1056,6 @@
public void encodeBegin(FacesContext context) throws IOException {
resetDataModel();
- this.editableDataChildren = null;
- this.allDataChildren = null;
if (!keepSaved(context)) {
childState.remove(getBaseClientId(context));
}
@@ -1509,19 +1451,13 @@
public void clearRequestKeysSet() {
_ajaxRequestKeys = null;
}
-
- /**
- * Getter for value
- */
+
public Object getValue() {
return super.getValue();
}
- /**
- * Setter for value resetting local model
- */
public void setValue(Object value) {
setExtendedDataModel(null);
super.setValue(value);
- }
+ }
}
16 years, 11 months
JBoss Rich Faces SVN: r5712 - branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-01-29 13:50:41 -0500 (Tue, 29 Jan 2008)
New Revision: 5712
Modified:
branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
Log:
http://jira.jboss.com/jira/browse/RF-2108
Modified: branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
--- branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-01-29 18:20:03 UTC (rev 5711)
+++ branches/3.1.x/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-01-29 18:50:41 UTC (rev 5712)
@@ -206,9 +206,10 @@
tableUpdate : function(component) {
var table = component.shuttleTable;
- table.removeChild(table.tBodies[0]);
- var tbody = document.createElement("tbody");
- table.appendChild(tbody);
+ var tbody = table.tBodies[0];
+ var newTbody = tbody.cloneNode(false);
+ table.removeChild(tbody);
+ table.appendChild(newTbody);
component.shuttleTbody = table.tBodies[0];
},
16 years, 11 months
JBoss Rich Faces SVN: r5711 - in trunk/sandbox/ui/combobox/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-01-29 13:20:03 -0500 (Tue, 29 Jan 2008)
New Revision: 5711
Modified:
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
new valueKepeer is added
Modified: trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-29 17:11:48 UTC (rev 5710)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-29 18:20:03 UTC (rev 5711)
@@ -4,7 +4,7 @@
Richfaces.ComboBox.prototype = {
- initialize: function(combobox, listId, parentListId, fieldId, buttonId, buttonBGId, classes,
+ initialize: function(combobox, listId, parentListId, valueFieldId, fieldId, buttonId, buttonBGId, classes,
listWidth, listHeight, itemsText, directInputSuggestions, filterNewValue,
selectFirstOnUpdate, onlistcall, onselected, defaultMessage, isDisabled, value,
showDelay, hideDelay) {
@@ -13,6 +13,7 @@
this.filterNewValue = filterNewValue;
this.combobox = $(combobox);
+ this.comboValue = $(valueFieldId);
this.field = $(fieldId);
//this.field.prevValue = null;
@@ -271,10 +272,12 @@
if (oV == value) {
if (Prototype.Browser.Gecko) {
this.field.value = "";
+ this.comboValue.value = "";
}
}
this.field.prevValue = value;
this.field.value = value;
+ this.comboValue.value = value;
this.comboList.doSelectItem(this.comboList.activeItem);
this.combobox.fire("rich:onitemselected", {});
/*if (oV != value) {
@@ -293,6 +296,7 @@
applyDefaultText : function() {
this.field.value = this.defaultMessage;
+ this.comboValue.value = "";
},
isActive : function() {
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-29 17:11:48 UTC (rev 5710)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-29 18:20:03 UTC (rev 5711)
@@ -205,6 +205,7 @@
<div id="control#{clientId}" class="rich-combobox-list-width rich-combobox-font rich-combobox #{styleClass}" style="width:#{listWidth};#{style}"
x:passThruWithExclusions="value,name,type,id,styleClass,class,style,size,autocomplete,disabled,onchange">
+ <input id="comboboxValue#{clientId}" name="comboboxValue#{clientId}" type="hidden"/>
<div class="rich-combobox-list-cord"></div>
<div class="rich-combobox-input-width rich-combobox-font rich-combobox-shell" style="width:#{width};z-index:1;">
<input id="comboboxField#{clientId}"
@@ -299,6 +300,7 @@
var combobox = new Richfaces.ComboBox( "control#{clientId}",
"list#{clientId}",
"listParent#{clientId}",
+ "comboboxValue#{clientId}",
"comboboxField#{clientId}",
"comboboxButton#{clientId}",
"comboBoxButtonBG#{clientId}",
16 years, 11 months
JBoss Rich Faces SVN: r5710 - in trunk: ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-01-29 12:11:48 -0500 (Tue, 29 Jan 2008)
New Revision: 5710
Modified:
trunk/samples/tooltip-sample/src/main/webapp/pages/demo.jsp
trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
RF-2007
Modified: trunk/samples/tooltip-sample/src/main/webapp/pages/demo.jsp
===================================================================
--- trunk/samples/tooltip-sample/src/main/webapp/pages/demo.jsp 2008-01-29 16:21:54 UTC (rev 5709)
+++ trunk/samples/tooltip-sample/src/main/webapp/pages/demo.jsp 2008-01-29 17:11:48 UTC (rev 5710)
@@ -34,11 +34,11 @@
<a4j:outputPanel layout="block" style="width:350px;height:75px;cursor:arrow;border-width:2px;text-align:center;border:2px solid red">
<f:verbatim>
<p>
- This tool-tip will <b>follow mouse</b>. Also this tool-tip has a <b>delay 0.5 sec</b>, so be patient!
+ This tool-tip will <b>follow mouse</b>. Also this tool-tip has a <b>delay 0.5 sec</b> and <b>hide delay 0.5 sec</b>, so be patient!
</p>
</f:verbatim>
- <rich:toolTip followMouse="true" direction="top-right" showDelay="500" styleClass="tooltip" style="width:250px">
+ <rich:toolTip followMouse="true" direction="top-right" showDelay="500" hideDelay="500" styleClass="tooltip" style="width:250px">
<f:verbatim>
<span>
This tool-tip content also <strong>pre-rendered</strong> to the page.
Modified: trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2008-01-29 16:21:54 UTC (rev 5709)
+++ trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2008-01-29 17:11:48 UTC (rev 5710)
@@ -68,12 +68,6 @@
this.attachOnLoadEventsListner = this.attachOnLoadEvents.bindAsEventListener(this);
this.setToolTipPositionListner = this.setToolTipPosition.bindAsEventListener(this);
- if (this.hideDelay > 0) {
- this.doHideListner = this.customHideHandler.bindAsEventListener(this);
- } else {
- this.doHideListner = this.doHide.bindAsEventListener(this);
- }
-
this.leaveToolTipListner = this.leaveToolTip.bindAsEventListener(this);
// if (Richfaces.tooltips[parentId])
@@ -103,7 +97,7 @@
{
if (this.followMouse) Event.stopObserving(this.parent, 'mousemove', this.setToolTipPositionListner, false);
- Event.stopObserving(this.parent, this.event, this.customEventHandlerListner, false);
+ Event.stopObserving(this.parent, this.event, this.doShowListner, false);
if (this.showEvent != "focus") {
if(this.hideEvent != null){
@@ -145,43 +139,15 @@
}
},
- customEventHandler: function(event) {
- if (this.activationTimerHandle) {
- return ;
- }
-
- this.eventCopy = A4J.AJAX.CloneObject(event, false);
-
- this.activationTimerHandle = window.setTimeout(function() {
- this.doShow(this.eventCopy);
- }.bindAsEventListener(this), this.delay);
- },
-
- customHideHandler: function(event) {
- if (this.hidingTimerHandle) {
- return ;
- }
-
- this.eventCopy = A4J.AJAX.CloneObject(event, false);
-
- this.hidingTimerHandle = window.setTimeout(function() {
- this.doHide(this.eventCopy);
- }.bindAsEventListener(this), this.hideDelay);
- },
-
attachParentEvents: function(){
if(this.followMouse){
Event.observe(this.parent, 'mousemove', this.setToolTipPositionListner, false);
}
- var eventHandler;
- if (this.delay > 0) {
- this.customEventHandlerListner = this.customEventHandler.bindAsEventListener(this);
- } else {
- this.customEventHandlerListner = this.doShow.bindAsEventListener(this);
- }
+ this.doShowListner = this.doShow.bindAsEventListener(this);
+ this.doHideListner = this.doHide.bindAsEventListener(this);
- Event.observe(this.parent, this.showEvent, this.customEventHandlerListner, false);
+ Event.observe(this.parent, this.showEvent, this.doShowListner, false);
//TODO handle onfocus and onblur show/hide events
if (this.showEvent != "focus") {
if(this.hideEvent != null){
@@ -260,6 +226,8 @@
},
doShow: function(e){
+ if (this.activationTimerHandle) return;
+
this.setScrollDelta();
var obj;
@@ -279,11 +247,6 @@
} catch (e) {;}
}
- if(this.onshow!=null)
- {
- this.onshow(e);
- }
-
this.isMouseOvered = true;
if (e.target)
this.hintParentElement = e.target;
@@ -319,7 +282,19 @@
eval(this.ajaxExecuteString);
} else {
this.setToolTipPosition(e);
- this.displayDiv();
+ if (this.hidingTimerHandle)
+ {
+ window.clearTimeout(this.hidingTimerHandle);
+ this.hidingTimerHandle = undefined;
+ }
+ if (this.delay>0)
+ {
+ this.activationTimerHandle = window.setTimeout(function()
+ {
+ this.displayDiv();
+ }.bindAsEventListener(this), this.delay);
+ }
+ else this.displayDiv();
}
// if(this.delay > 0){
@@ -329,8 +304,30 @@
// }
//
},
-
+
+ hideDiv:function(e)
+ {
+ this.isMouseOvered = false;
+ this.toolTip.style.visibility = "hidden";
+ this.toolTip.style.display = "none";
+
+ if(this.iframe){
+ this.iframe.style.display = "none";
+ }
+ this.hintParentElement = null;
+ this.isMouseOvered = false;
+ if(this.onhide!=null)
+ {
+ this.onhide(e);
+ }
+
+
+ this.scrollDelta = undefined;
+ },
+
doHide: function(e){
+ if (this.hidingTimerHandle) return;
+
this.eventCopy = null;
if (!e) var e = window.event;
@@ -353,27 +350,21 @@
if (this.detectAncestorNode(relTarg,this.toolTip)) return;
} catch (e) {;}
}
-
- this.isMouseOvered = false;
- this.toolTip.style.visibility = "hidden";
- this.toolTip.style.display = "none";
-
- if(this.iframe){
- this.iframe.style.display = "none";
+
+ if (this.activationTimerHandle)
+ {
+ window.clearTimeout(this.activationTimerHandle);
+ this.activationTimerHandle = undefined;
}
- this.hintParentElement = null;
- this.isMouseOvered = false;
- if(this.onhide!=null)
+ if (this.hideDelay>0)
{
- this.onhide(e);
+ var event = A4J.AJAX.CloneObject(e, false);
+ this.hidingTimerHandle = window.setTimeout(function()
+ {
+ this.hideDiv(event);
+ }.bindAsEventListener(this), this.hideDelay);
}
-
- if (this.hidingTimerHandle) {
- window.clearTimeout(this.hidingTimerHandle);
- this.hidingTimerHandle = undefined;
- }
-
- this.scrollDelta = undefined;
+ else this.hideDiv();
},
doEnable: function(){
@@ -579,6 +570,11 @@
this.setToolTipPosition((this.eventCopy ? this.eventCopy : obj));
}
}
+
+ if(this.onshow!=null)
+ {
+ this.onshow(this.eventCopy);
+ }
this.setToolTipVisible(true);
16 years, 11 months
JBoss Rich Faces SVN: r5709 - trunk/sandbox/ui/pickList/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-01-29 11:21:54 -0500 (Tue, 29 Jan 2008)
New Revision: 5709
Modified:
trunk/sandbox/ui/pickList/src/main/templates/htmlPickList.jspx
Log:
pickList component
Modified: trunk/sandbox/ui/pickList/src/main/templates/htmlPickList.jspx
===================================================================
--- trunk/sandbox/ui/pickList/src/main/templates/htmlPickList.jspx 2008-01-29 16:21:15 UTC (rev 5708)
+++ trunk/sandbox/ui/pickList/src/main/templates/htmlPickList.jspx 2008-01-29 16:21:54 UTC (rev 5709)
@@ -22,6 +22,7 @@
scripts/LayoutManager.js
scripts/Control.js,
scripts/ListBase.js,
+ scripts/OrderingList.js,
scripts/ListShuttle.js,
scripts/PickList.js
</h:scripts>
@@ -160,8 +161,6 @@
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");
- var sourceLayoutManager = new LayoutManager('#{clientId}internal_header_tab', '#{clientId}internal_tab');
- var targetLayoutManager = new LayoutManager('#{clientId}tlInternal_header_tab', '#{clientId}tlInternal_tab');
sourceLayoutManager.widthSynchronization();
targetLayoutManager.widthSynchronization();
});
16 years, 11 months
JBoss Rich Faces SVN: r5708 - trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-01-29 11:21:15 -0500 (Tue, 29 Jan 2008)
New Revision: 5708
Removed:
trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/picklist.js
Log:
Deleted: trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/picklist.js
===================================================================
--- trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/picklist.js 2008-01-29 16:13:01 UTC (rev 5707)
+++ trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/picklist.js 2008-01-29 16:21:15 UTC (rev 5708)
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- /**
- * @author Bruno Aranda (latest modification by $Author$)
- * @version $Revision$ $Date$
- */
-
-// moves an item to the selected list
-function myfaces_picklist_addToSelected(availableListId, selectedListId, hiddenId)
-{
- var availableList = document.getElementById(availableListId);
- var selectedList = document.getElementById(selectedListId);
-
- myfaces_picklist_move(availableList, selectedList, hiddenId);
- myfaces_picklist_updateHidden(selectedList, hiddenId);
-}
-
-// removes an item from the selected list
-function myfaces_picklist_removeFromSelected(availableListId, selectedListId, hiddenId)
-{
- var availableList = document.getElementById(availableListId);
- var selectedList = document.getElementById(selectedListId);
-
- myfaces_picklist_move(selectedList, availableList, hiddenId);
- myfaces_picklist_updateHidden(selectedList, hiddenId);
-}
-
-function myfaces_picklist_move(fromList, toList, hiddenId) {
- // Return, if no items selected
- var selectedIndex = fromList.selectedIndex;
- if(selectedIndex < 0) { return; }
-
- // Decremental loop, so the index is not affected in the moves
- for(var i = fromList.length - 1; i >= 0; i--) {
- if(fromList.options.item(i).selected) {
- toList.appendChild(fromList.options.item(i));
- }
- }
-
-}
-
-// Selection - invoked on submit
-function myfaces_picklist_updateHidden(selectedList, hiddenId) {
- var hiddenField = document.getElementById(hiddenId);
-
- var arrValues = new Array(selectedList.options.length);
- for (var i = 0; i<selectedList.options.length; i++) {
- arrValues[i] = selectedList.options[i].value;
- }
-
- hiddenField.value = arrValues.join();
-}
\ No newline at end of file
16 years, 11 months
JBoss Rich Faces SVN: r5707 - trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-01-29 11:13:01 -0500 (Tue, 29 Jan 2008)
New Revision: 5707
Removed:
trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/picklist_.js
Log:
pickList component
Deleted: trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/picklist_.js
===================================================================
--- trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/picklist_.js 2008-01-29 15:43:44 UTC (rev 5706)
+++ trunk/sandbox/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/picklist_.js 2008-01-29 16:13:01 UTC (rev 5707)
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- /**
- * @author Bruno Aranda (latest modification by $Author$)
- * @version $Revision$ $Date$
- */
-
-// moves an item to the selected list
-function myfaces_picklist_addToSelected(availableListId, selectedListId, hiddenId)
-{
- var availableList = document.getElementById(availableListId);
- var selectedList = document.getElementById(selectedListId);
-
- myfaces_picklist_move(availableList, selectedList, hiddenId);
- myfaces_picklist_updateHidden(selectedList, hiddenId);
-}
-
-// removes an item from the selected list
-function myfaces_picklist_removeFromSelected(availableListId, selectedListId, hiddenId)
-{
- var availableList = document.getElementById(availableListId);
- var selectedList = document.getElementById(selectedListId);
-
- myfaces_picklist_move(selectedList, availableList, hiddenId);
- myfaces_picklist_updateHidden(selectedList, hiddenId);
-}
-
-function myfaces_picklist_move(fromList, toList, hiddenId) {
- // Return, if no items selected
- var selectedIndex = fromList.selectedIndex;
- if(selectedIndex < 0) { return; }
-
- // Decremental loop, so the index is not affected in the moves
- for(var i = fromList.length - 1; i >= 0; i--) {
- if(fromList.options.item(i).selected) {
- toList.appendChild(fromList.options.item(i));
- }
- }
-
-}
-
-// Selection - invoked on submit
-function myfaces_picklist_updateHidden(selectedList, hiddenId) {
- var hiddenField = document.getElementById(hiddenId);
-
- var arrValues = new Array(selectedList.options.length);
- for (var i = 0; i<selectedList.options.length; i++) {
- arrValues[i] = selectedList.options[i].value;
- }
-
- hiddenField.value = arrValues.join();
-}
\ No newline at end of file
16 years, 11 months
JBoss Rich Faces SVN: r5706 - trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-01-29 10:43:44 -0500 (Tue, 29 Jan 2008)
New Revision: 5706
Modified:
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
Log:
pickList component
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-01-29 15:17:26 UTC (rev 5705)
+++ trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-01-29 15:43:44 UTC (rev 5706)
@@ -155,7 +155,9 @@
this.moveItem(sourceComponent, targetComponent, item);
}
this.controlListManager();
- this.targetList.controlListManager();
+ if (this.targetList.controlListManager) {
+ this.targetList.controlListManager();
+ }
//this.saveState();
this.targetLayoutManager.widthSynchronization();
@@ -222,7 +224,9 @@
this.moveItem(sourceComponent, targetComponent, item);
this.controlListManager();
- this.targetList.controlListManager();
+ if (this.targetList.controlListManager) {
+ this.targetList.controlListManager();
+ }
//this.saveState();
this.targetLayoutManager.widthSynchronization();
@@ -231,7 +235,7 @@
this.container.fire("rich:onlistchanged", {});
}
-}
+};
Richfaces.ListShuttle.HANDLERS = {
copy: function (e) { this.moveItems(this.sourceList, this.targetList, this.sourceList.selectedItems); return false; },
16 years, 11 months