JBoss Rich Faces SVN: r6828 - branches/3.1.x/ui/inputnumber-slider/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-03-14 13:53:12 -0400 (Fri, 14 Mar 2008)
New Revision: 6828
Modified:
branches/3.1.x/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2520
Modified: branches/3.1.x/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
===================================================================
--- branches/3.1.x/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2008-03-14 17:41:02 UTC (rev 6827)
+++ branches/3.1.x/ui/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2008-03-14 17:53:12 UTC (rev 6828)
@@ -18,7 +18,10 @@
<f:resource name="org.richfaces.renderkit.html.images.SliderArrowSelectedImage" var="arrowSelected" />
<jsp:scriptlet><![CDATA[
- String inputPosition = (String)component.getAttributes().get("inputPosition");
+ String inputPosition = (String)component.getAttributes().get("inputPosition");
+ if (!"left".equals(inputPosition) && !"right".equals(inputPosition)) {
+ inputPosition = "right";
+ }
boolean disabled = attributeToBoolean(component, "disabled");
boolean showInput = attributeToBoolean(component, "showInput");
16 years, 10 months
JBoss Rich Faces SVN: r6827 - trunk/ui/combobox/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-14 13:41:02 -0400 (Fri, 14 Mar 2008)
New Revision: 6827
Modified:
trunk/ui/combobox/src/main/config/component/combobox.xml
Log:
remove inputSize
Modified: trunk/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/ui/combobox/src/main/config/component/combobox.xml 2008-03-14 17:29:41 UTC (rev 6826)
+++ trunk/ui/combobox/src/main/config/component/combobox.xml 2008-03-14 17:41:02 UTC (rev 6827)
@@ -93,11 +93,6 @@
<defaultvalue>"200px"</defaultvalue>
</property>
<property>
- <name>inputSize</name>
- <classname>java.lang.String</classname>
- <description></description>
- </property>
- <property>
<name>onchange</name>
<classname>java.lang.String</classname>
<description></description>
16 years, 10 months
JBoss Rich Faces SVN: r6826 - trunk/ui/combobox/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2008-03-14 13:29:41 -0400 (Fri, 14 Mar 2008)
New Revision: 6826
Modified:
trunk/ui/combobox/src/main/config/component/combobox.xml
Log:
http://jira.jboss.com/jira/browse/RF-1216
added the necessary attributes
Modified: trunk/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/ui/combobox/src/main/config/component/combobox.xml 2008-03-14 15:56:20 UTC (rev 6825)
+++ trunk/ui/combobox/src/main/config/component/combobox.xml 2008-03-14 17:29:41 UTC (rev 6826)
@@ -25,14 +25,13 @@
<classname>org.richfaces.taglib.ComboBoxTag</classname>
<superclass>
org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
- </superclass>
- <test/>
+ </superclass>
+ <test/>
</tag>
<properties>
<property>
<name>suggestionValues</name>
<classname>java.lang.Object</classname>
- <description>Defines the suggestion collection</description>
</property>
<property>
<name>enableManualInput</name>
@@ -43,57 +42,77 @@
<property>
<name>filterNewValues</name>
<classname>java.lang.Boolean</classname>
- <description>defines the appearance of values in the list</description>
+ <description></description>
<defaultvalue>true</defaultvalue>
</property>
- <property >
+ <property>
<name>directInputSuggestions</name>
<classname>java.lang.Boolean</classname>
- <description>Defines the first value from the suggested in input field</description>
+ <description>not implemented</description>
<defaultvalue>false</defaultvalue>
</property>
<property>
<name>selectFirstOnUpdate</name>
<classname>java.lang.Boolean</classname>
- <description>Defines of the first value from suggested is selected in popup list</description>
+ <description></description>
<defaultvalue>true</defaultvalue>
</property>
<property>
<name>showDelay</name>
<classname>java.lang.Integer</classname>
- <description>Delay between event and popup list showing</description>
+ <description></description>
<defaultvalue><![CDATA[0]]></defaultvalue>
</property>
<property>
<name>hideDelay</name>
<classname>java.lang.Integer</classname>
- <description>Delay between losing focus and popup list closing</description>
+ <description></description>
<defaultvalue><![CDATA[0]]></defaultvalue>
</property>
<property>
<name>width</name>
<classname>java.lang.String</classname>
- <description>Width of the popup list</description>
+ <description></description>
<defaultvalue><![CDATA["150"]]></defaultvalue>
</property>
-
-
<property>
+ <name>width</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA["150"]]></defaultvalue>
+ </property>
+ <property>
+ <name>listWidth</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ </property>
+ <property>
+ <name>listHeight</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue>"200px"</defaultvalue>
+ </property>
+ <property>
+ <name>inputSize</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ </property>
+ <property>
<name>onchange</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; an item is selected</description>
+ <description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>onlistcall</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; a list is called</description>
+ <description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>onitemselected</name>
<classname>java.lang.String</classname>
- <description>HTML: a script expression; an item is selected</description>
+ <description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
@@ -105,114 +124,113 @@
<property>
<name>buttonIcon</name>
<classname>java.lang.String</classname>
- <description>Defines icon for the button element</description>
+ <description>URI</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>buttonIconDisabled</name>
<classname>java.lang.String</classname>
- <description>Defines disabled icon for the button element</description>
+ <description>URI</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>buttonIconInactive</name>
<classname>java.lang.String</classname>
- <description>Defines inactive icon for the button element</description>
+ <description>URI</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>defaultLabel</name>
<classname>java.lang.String</classname>
- <description>Defines default label for the input field element</description>
+ <description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>listStyle</name>
<classname>java.lang.String</classname>
- <description>CSS style rules to be applied to popup list</description>
+ <description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>listClass</name>
<classname>java.lang.String</classname>
- <description>Style Class attribute for the popup list</description>
+ <description></description>
</property>
-
<property>
<name>inputStyle</name>
<classname>java.lang.String</classname>
- <description>CSS style rules to be applied to input field</description>
+ <description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>inputClass</name>
<classname>java.lang.String</classname>
- <description>Style Class attribute for the input field</description>
+ <description></description>
</property>
<property>
<name>inputDisabledStyle</name>
<classname>java.lang.String</classname>
- <description>CSS style rules to be applied to disabled input</description>
+ <description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>inputDisabledClass</name>
<classname>java.lang.String</classname>
- <description>Style Class attribute for the disabled input</description>
+ <description></description>
</property>
<property>
<name>inputInactiveStyle</name>
<classname>java.lang.String</classname>
- <description>CSS style rules to be applied to inactive input</description>
+ <description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>inputInactiveClass</name>
<classname>java.lang.String</classname>
- <description>Style Class attribute for the inactive input</description>
+ <description></description>
</property>
<property>
<name>itemClass</name>
<classname>java.lang.String</classname>
- <description>Style Class attribute for the items</description>
+ <description></description>
</property>
<property>
<name>buttonStyle</name>
<classname>java.lang.String</classname>
- <description>CSS style rules to be applied to button</description>
+ <description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>buttonClass</name>
<classname>java.lang.String</classname>
- <description>Style Class attribute for the button</description>
+ <description></description>
</property>
<property>
<name>buttonDisabledStyle</name>
<classname>java.lang.String</classname>
- <description>CSS style rules to be applied to disabled button</description>
+ <description></description>
</property>
<property>
<name>buttonDisabledClass</name>
<classname>java.lang.String</classname>
- <description>Style Class attribute for the disabled button</description>
+ <description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>buttonInactiveStyle</name>
<classname>java.lang.String</classname>
- <description>CSS style rules to be applied to inactive button</description>
+ <description></description>
</property>
<property>
<name>buttonInactiveClass</name>
<classname>java.lang.String</classname>
- <description>Style Class attribute for the inactive button</description>
+ <description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>style</name>
<classname>java.lang.String</classname>
- <description>CSS style(s) is/are to be applied when this component is rendered</description>
+ <description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property hidden="true">
@@ -222,36 +240,9 @@
<property>
<name>styleClass</name>
<classname>java.lang.String</classname>
- <description>Corresponds to the HTML class attribute</description>
+ <description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>converterMessage</name>
- <classname>java.lang.String</classname>
- <description>A ValueExpression enabled attribute that, if present,
- will be used as the text of the converter message, replacing any message that comes from the converter</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>localValueSet</name>
- <classname>boolean</classname>
- <description>A ValueExpression enabled attribute that, if present,
- will be used as the text of the converter message, replacing any message that comes from the converter</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>validatorMessage</name>
- <classname>java.lang.String</classname>
- <description>A ValueExpression enabled attribute that,
- if present, will be used as the text of the validator message, replacing any message that comes from the validator</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>requiredMessage</name>
- <classname>java.lang.String</classname>
- <description>A ValueExpression enabled attribute that, if present,
- will be used as the text of the validation message for the "required" facility, if the "required" facility is used</description>
- </property>
+ </property>
&html_input_attributes;
&html_input_events;
16 years, 10 months
JBoss Rich Faces SVN: r6825 - trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-03-14 11:56:20 -0400 (Fri, 14 Mar 2008)
New Revision: 6825
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
Log:
RF-2511
Modified: trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
===================================================================
--- trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-03-14 15:50:36 UTC (rev 6824)
+++ trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-03-14 15:56:20 UTC (rev 6825)
@@ -34,8 +34,6 @@
import org.ajax4jsf.resource.CountingOutputWriter;
import org.richfaces.component.UIProgressBar;
-import com.sun.facelets.FaceletException;
-
/**
* Abstract progress bar renderer
*
16 years, 10 months
JBoss Rich Faces SVN: r6824 - in trunk/ui/inputnumber-slider/src/main/java/org/richfaces: renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-03-14 11:50:36 -0400 (Fri, 14 Mar 2008)
New Revision: 6824
Modified:
trunk/ui/inputnumber-slider/src/main/java/org/richfaces/component/UIInputNumberSlider.java
trunk/ui/inputnumber-slider/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java
Log:
Input number slider: move rendering logic to the renderer class from the component class.
Modified: trunk/ui/inputnumber-slider/src/main/java/org/richfaces/component/UIInputNumberSlider.java
===================================================================
--- trunk/ui/inputnumber-slider/src/main/java/org/richfaces/component/UIInputNumberSlider.java 2008-03-14 15:40:15 UTC (rev 6823)
+++ trunk/ui/inputnumber-slider/src/main/java/org/richfaces/component/UIInputNumberSlider.java 2008-03-14 15:50:36 UTC (rev 6824)
@@ -41,25 +41,4 @@
public abstract String getStyle();
public abstract void setStyle(String style);
- public String getStyleValue() {
- StringBuffer buf = new StringBuffer();
- String width = getWidth();
- String height = getHeight();
- String style = getStyle();
- if (width != null && width.length() > 0) {
- buf.append("width:" + HtmlUtil.qualifySize(width));
- buf.append(";");
- }
-
- if (height !=null && height.length() > 0) {
- buf.append("height:" + HtmlUtil.qualifySize(height));
- buf.append(";");
- }
- if (style !=null && style.length() > 0) {
- buf.append(style);
- }
-
- return buf.toString();
- }
-
}
Modified: trunk/ui/inputnumber-slider/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java
===================================================================
--- trunk/ui/inputnumber-slider/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java 2008-03-14 15:40:15 UTC (rev 6823)
+++ trunk/ui/inputnumber-slider/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java 2008-03-14 15:50:36 UTC (rev 6824)
@@ -31,6 +31,7 @@
import org.ajax4jsf.renderkit.ComponentsVariableResolver;
import org.ajax4jsf.renderkit.RendererUtils;
import org.richfaces.component.UIInputNumberSlider;
+import org.richfaces.component.util.HtmlUtil;
/**
* @author Nick - mailto:nbelaevski@exadel.com
@@ -76,7 +77,28 @@
}
variables.setVariable("inputSize", slider.getAttributes().get("inputSize"));
- variables.setVariable("style", slider.getStyle());
+ variables.setVariable("style", getStyleValue(slider));
}
+
+ public String getStyleValue(UIInputNumberSlider slider) {
+ StringBuffer buf = new StringBuffer();
+ String width = slider.getWidth();
+ String height = slider.getHeight();
+ String style = slider.getStyle();
+ if (width != null && width.length() > 0) {
+ buf.append("width:" + HtmlUtil.qualifySize(width));
+ buf.append(";");
+ }
+ if (height !=null && height.length() > 0) {
+ buf.append("height:" + HtmlUtil.qualifySize(height));
+ buf.append(";");
+ }
+ if (style !=null && style.length() > 0) {
+ buf.append(style);
+ }
+
+ return buf.toString();
+ }
+
}
16 years, 10 months
JBoss Rich Faces SVN: r6823 - trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-14 11:40:15 -0400 (Fri, 14 Mar 2008)
New Revision: 6823
Modified:
trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-2508
Modified: trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
===================================================================
--- trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-03-14 14:47:49 UTC (rev 6822)
+++ trunk/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-03-14 15:40:15 UTC (rev 6823)
@@ -117,7 +117,13 @@
attributes.append("var attributes = ");
ScriptOptions options = new ScriptOptions(component);
- options.addOption("defaultLabel");
+
+ String defaultLabel = (String)component.getAttributes().get("defaultLabel");
+ if (defaultLabel == null || defaultLabel.equals("")) {
+ defaultLabel = "\u00a0\u00a0\u00a0";
+ }
+
+ options.addOption("defaultLabel", defaultLabel);
options.addOption("showControls");
options.addOption("editEvent");
options.addOption("selectOnEdit");
16 years, 10 months
JBoss Rich Faces SVN: r6822 - trunk/ui/inplaceSelect/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-14 10:47:49 -0400 (Fri, 14 Mar 2008)
New Revision: 6822
Modified:
trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
on case of the http://jira.jboss.com/jira/browse/RF-2508
Modified: trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-03-14 14:46:51 UTC (rev 6821)
+++ trunk/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-03-14 14:47:49 UTC (rev 6822)
@@ -30,13 +30,15 @@
Object value = component.getAttributes().get("value");
Object fieldValue = component.getAttributes().get("value");
value = getConvertedStringValue(context, component,value);
- if (value == null) {
+
+ if (value == null || value.equals("")) {
fieldValue = "";
- value = component.getAttributes().get("defaultLabel");
+ String defaultValue = (String)component.getAttributes().get("defaultLabel");
+ if(defaultValue == null || defaultValue.equals("")) {
+ defaultValue = "\u00a0\u00a0\u00a0";
+ }
+ value = defaultValue;
}
- if (value.equals("")) {
- value = component.getAttributes().get("defaultLabel");
- }
variables.setVariable("value", value);
variables.setVariable("fieldValue", fieldValue);
16 years, 10 months
JBoss Rich Faces SVN: r6821 - trunk/ui/inplaceInput/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-14 10:46:51 -0400 (Fri, 14 Mar 2008)
New Revision: 6821
Modified:
trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2508
Modified: trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-03-14 14:33:04 UTC (rev 6820)
+++ trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-03-14 14:46:51 UTC (rev 6821)
@@ -28,13 +28,15 @@
Object value = component.getValue();
Object fieldValue = value;
value = getConvertedStringValue(context, component,value);
- if (value == null) {
+ if (value == null || value.equals("")) {
fieldValue = "";
- value = component.getAttributes().get("defaultLabel");
+ String defaultValue = (String)component.getAttributes().get("defaultLabel");
+ if(defaultValue == null || defaultValue.equals("")) {
+ defaultValue = "\u00a0\u00a0\u00a0";
+ }
+ value = defaultValue;
}
- if (value.equals("")) {
- value = component.getAttributes().get("defaultLabel");
- }
+
variables.setVariable("value", value);
variables.setVariable("fieldValue", fieldValue);
16 years, 10 months
JBoss Rich Faces SVN: r6820 - in trunk/ui/suggestionbox/src/main: java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-03-14 10:33:04 -0400 (Fri, 14 Mar 2008)
New Revision: 6820
Modified:
trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java
trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-1774
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java 2008-03-14 14:31:43 UTC (rev 6819)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/component/UISuggestionBox.java 2008-03-14 14:33:04 UTC (rev 6820)
@@ -23,6 +23,7 @@
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -318,6 +319,35 @@
private int rowNumber = -1;
+ private Object getModelValuesData() {
+ int first = getFirst();
+ int rows = getRows();
+ int rowIndex = getRowIndex();
+
+ setFirst(0);
+ setRows(0);
+ setRowIndex(-1);
+
+ List<Object> results = new ArrayList<Object>();
+ int j = 0;
+ boolean stop = false;
+
+ while (!stop) {
+ setRowIndex(j++);
+ if (isRowAvailable()) {
+ results.add(getRowData());
+ } else {
+ stop = true;
+ }
+ }
+
+ setFirst(first);
+ setRows(rows);
+ setRowIndex(rowIndex);
+
+ return results;
+ }
+
private Object getRequestedValuesData() {
MethodExpression suggestingAction = getSuggestionAction();
SubmittedValue valueHolder = (SubmittedValue) getSubmitedValue();
@@ -329,10 +359,12 @@
int first = getFirst();
int rows = getRows();
int rowIndex = getRowIndex();
+ Object value = getValue();
+
setFirst(0);
setRows(0);
- List results = new ArrayList();
+ Map<String, Object> results = new HashMap<String, Object>();
for (int i = 0; i < requestedValues.length; i++) {
String requestedValue = requestedValues[i];
if (requestedValue != null) {
@@ -350,27 +382,23 @@
Object fetchValue = getFetchValue();
if (fetchValue != null) {
if (requestedValue.equalsIgnoreCase(fetchValue.toString())) {
- results.add(getRowData());
+ results.put(requestedValue, getRowData());
stop = true;
}
}
} else {
- results.add(null);
stop = true;
}
}
- } else {
- results.add(null);
}
}
- setData(results);
-
setFirst(first);
setRows(rows);
setRowIndex(rowIndex);
-
- return results;
+ setValue(value);
+
+ return results;
}
}
@@ -390,10 +418,16 @@
super.broadcast(event);
if (event instanceof AjaxEvent) {
FacesContext context = getFacesContext();
- Object data = getRequestedValuesData();
+ setupValue(context);
+
+ Object modelValues = getModelValuesData();
+ Object requestedData = getRequestedValuesData();
AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
- if (null != data) {
- ajaxContext.setResponseData(data);
+ if (null != modelValues || null != requestedData) {
+ Map<String,Object> map = new HashMap<String, Object>();
+ map.put("suggestionObjects", modelValues);
+ map.put("requestedObjects", requestedData);
+ ajaxContext.setResponseData(map);
}
AjaxRendererUtils.addRegionsFromComponent(this, context);
AjaxRendererUtils.addRegionByName(context, this, this.getId());
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2008-03-14 14:31:43 UTC (rev 6819)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2008-03-14 14:33:04 UTC (rev 6820)
@@ -292,7 +292,6 @@
throws IOException {
UISuggestionBox suggestionBox = (UISuggestionBox) component;
if (suggestionBox.isSubmitted()) {
- suggestionBox.setupValue(context);
body.encode(getTemplateContext(context, suggestionBox));
// Replace rendered area ID from component to suggestion table
suggestionBox.setRowIndex(-1);
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-03-14 14:31:43 UTC (rev 6819)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-03-14 14:33:04 UTC (rev 6820)
@@ -686,9 +686,9 @@
var tokens = this.options.tokens.join('');
this.startPosition = this.endPosition = Richfaces.Selection.getStart(this.element);
- while (this.endPosition<oldValue.length && tokens.indexOf(oldValue[this.endPosition])==-1) this.endPosition++;
+ while (this.endPosition<oldValue.length && tokens.indexOf(oldValue.charAt(this.endPosition))==-1) this.endPosition++;
- while (this.startPosition>0 && tokens.indexOf(oldValue[this.startPosition-1])==-1) this.startPosition--;
+ while (this.startPosition>0 && tokens.indexOf(oldValue.charAt(this.startPosition-1))==-1) this.startPosition--;
}
this.updateItems(oldValue);
@@ -823,7 +823,7 @@
getUpdatedChoices: function(event) {
this.options.parameters[this.options.param] = this.getToken();
// TODO-done: add string list parameter for the values that need object from server
- this.options.parameters["inputvaluerequest"] = this.getItemListForUpdate();
+ this.options.parameters[this.options.param + "request"] = this.getItemListForUpdate();
if (this.onsubmitFunction && ! this.onsubmitFunction()) {
return;
}
@@ -840,10 +840,13 @@
RichFaces.Position.smartClone(this.element, this.update, this.options);
}
this.updateChoices();
- this.fetchValues = data; // use data.suggestionObjects
- // TODO-done: add update item objects from data
- this.updateSelectedItems(data); // use data.requestedObjects
- LOG.debug("Choices updated");
+ if (data) {
+ this.fetchValues = data.suggestionObjects; // use data.suggestionObjects
+ // TODO-done: add update item objects from data
+ this.updateSelectedItems(data.requestedObjects); // use data.requestedObjects
+
+ LOG.debug("Choices updated");
+ }
if (this.options.onajaxcomplete) {
this.options.onajaxcomplete(request, event);
}
16 years, 10 months
JBoss Rich Faces SVN: r6819 - trunk/ui/fileUpload/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-03-14 10:31:43 -0400 (Fri, 14 Mar 2008)
New Revision: 6819
Modified:
trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java
Log:
RF-2514
Modified: trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java
===================================================================
--- trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java 2008-03-14 14:13:25 UTC (rev 6818)
+++ trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java 2008-03-14 14:31:43 UTC (rev 6819)
@@ -144,7 +144,7 @@
public void broadcast(FacesEvent e) {
- super.broadcast(e);
+ //super.broadcast(e);
if (e instanceof UploadEvent) {
// XXX BTW, why doesn't UploadEvent accept any listeners?
16 years, 10 months