JBoss Rich Faces SVN: r7670 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-04-08 12:26:00 -0400 (Tue, 08 Apr 2008)
New Revision: 7670
Added:
trunk/docs/userguide/en/src/main/resources/images/inplaceInputFacet.png
Log:
http://jira.jboss.com/jira/browse/RF-1226 - screenshot added while new attribute appears
Added: trunk/docs/userguide/en/src/main/resources/images/inplaceInputFacet.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/inplaceInputFacet.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 9 months
JBoss Rich Faces SVN: r7669 - trunk/ui/calendar/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-04-08 12:17:21 -0400 (Tue, 08 Apr 2008)
New Revision: 7669
Modified:
trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
Log:
State processing added to new calendar attributes.
Modified: trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java
===================================================================
--- trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2008-04-08 16:00:51 UTC (rev 7668)
+++ trunk/ui/calendar/src/main/java/org/richfaces/component/UICalendar.java 2008-04-08 16:17:21 UTC (rev 7669)
@@ -688,5 +688,21 @@
this.minDaysInFirstWeek = minDaysInFirstWeek;
this.minDaysInFirstWeekSet = true;
}
+
+ public Object saveState(FacesContext context) {
+ Object[] state = new Object[3];
+ state[0] = super.saveState(context);
+ state[1] = new Integer(this.firstWeekDay);
+ state[2] = new Integer(this.minDaysInFirstWeek);
+
+ return state;
+ }
+ public void restoreState(FacesContext context, Object state) {
+ Object[] _state = (Object[]) state;
+ super.restoreState(context, _state[0]);
+ this.firstWeekDay = ((Integer)_state[1]).intValue();
+ this.minDaysInFirstWeek = ((Integer)_state[2]).intValue();
+ }
+
}
16 years, 9 months
JBoss Rich Faces SVN: r7668 - branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-04-08 12:00:51 -0400 (Tue, 08 Apr 2008)
New Revision: 7668
Modified:
branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
http://jira.jboss.com/jira/browse/RF-3001
Modified: branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-04-08 14:36:30 UTC (rev 7667)
+++ branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-04-08 16:00:51 UTC (rev 7668)
@@ -639,8 +639,11 @@
this.TIME_EDITOR_LAYOUT_ID = this.id+'TimeEditorLayout';
this.DATE_EDITOR_LAYOUT_ID = this.id+'DateEditorLayout';
this.EDITOR_LAYOUT_SHADOW_ID = this.id+'EditorLayoutShadow';
+ this.TIME_EDITOR_BUTTON_OK = this.id+'TimeEditorButtonOk';
+ this.TIME_EDITOR_BUTTON_CANCEL = this.id+'TimeEditorButtonCancel';
+ this.DATE_EDITOR_BUTTON_OK = this.id+'DateEditorButtonOk';
+ this.DATE_EDITOR_BUTTON_CANCEL = this.id+'DateEditorButtonCancel';
-
//this.popupIntervalId=null;
this.firstDateIndex = 0;
@@ -891,9 +894,10 @@
editor.style.zIndex = parseInt(zindex,10)+1;
this.isEditorCreated = true;
+ return editor;
},
- createTimeEditorLayout: function()
+ createTimeEditorLayout: function(editor)
{
Element.insert(this.EDITOR_LAYOUT_SHADOW_ID, {after:this.evaluateMarkup(this.calendarContext.timeEditorLayout, this.calendarContext)});
@@ -912,9 +916,30 @@
}
sbjQuery(tm).SpinButton({digits:2,min:0,max:59});
+ this.correctEditorButtons(editor, this.TIME_EDITOR_BUTTON_OK, this.TIME_EDITOR_BUTTON_CANCEL);
+
this.isTimeEditorLayoutCreated = true;
},
+ correctEditorButtons: function(editor, buttonID1, buttonID2)
+ {
+ var button1 = $(buttonID1);
+ var button2 = $(buttonID2);
+ editor.style.visibility = "hidden";
+ editor.style.display = "";
+ var width1 = Richfaces.Calendar.getOffsetDimensions(button1.firstChild).width;
+ var width2 = Richfaces.Calendar.getOffsetDimensions(button2.firstChild).width;
+ editor.style.display = "none";
+ editor.style.visibility = "";
+
+ var styleWidth = Richfaces.getComputedStyleSize(button1,'width')
+
+ if (width1>styleWidth || width2>styleWidth)
+ {
+ button1.style.width = button2.style.width = (width1>width2 ? width1 : width2)+"px";
+ }
+ },
+
createDECell: function(id, value, buttonType, param, className)
{
if (buttonType==0)
@@ -931,25 +956,25 @@
}
},
- createDateEditorLayout: function()
+ createDateEditorLayout: function(editor)
{
var htmlBegin = '<table id="'+this.DATE_EDITOR_LAYOUT_ID+'" class="rich-calendar-date-layout" border="0" cellpadding="0" cellspacing="0"><tbody><tr id="'+this.DATE_EDITOR_LAYOUT_ID+'TR">';
var htmlEnd = '</tr></tbody></table>';
var month = 0;
this.dateEditorYear = this.getCurrentYear();
var year = this.dateEditorStartYear = this.dateEditorYear-4;
- var htmlContent = '<td>'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+month, this.params.monthLabelsShort[month], 1, month)+'</td>'
- +'<td class="rich-calendar-date-layout-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.params.monthLabelsShort[month+6], 1, month+6)+'</td>'
- +'<td>'+this.createDECell('','<', 0, -1)+'</td>'
- +'<td>'+this.createDECell('','>', 0, 1)+'</td>';
+ var htmlContent = '<td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+month, this.params.monthLabelsShort[month], 1, month)+'</td>'
+ +'<td align="center" class="rich-calendar-date-layout-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.params.monthLabelsShort[month+6], 1, month+6)+'</td>'
+ +'<td align="center">'+this.createDECell('','<', 0, -1)+'</td>'
+ +'<td align="center">'+this.createDECell('','>', 0, 1)+'</td>';
month++;
for (var i=0;i<5;i++)
{
- htmlContent+='</tr><tr><td>'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+month, this.params.monthLabelsShort[month], 1, month)+'</td>'
- +'<td class="rich-calendar-date-layout-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.params.monthLabelsShort[month+6], 1, month+6)+'</td>'
- +'<td>'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+i, year, 2, i, (i==4 ? 'rich-calendar-editor-btn-selected' : ''))+'</td>'
- +'<td>'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+(i+5), year+5, 2, i+5)+'</td>';
+ htmlContent+='</tr><tr><td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+month, this.params.monthLabelsShort[month], 1, month)+'</td>'
+ +'<td align="center" class="rich-calendar-date-layout-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.params.monthLabelsShort[month+6], 1, month+6)+'</td>'
+ +'<td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+i, year, 2, i, (i==4 ? 'rich-calendar-editor-btn-selected' : ''))+'</td>'
+ +'<td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+(i+5), year+5, 2, i+5)+'</td>';
month++;
year++;
}
@@ -958,16 +983,18 @@
this.dateEditorMonthID = this.DATE_EDITOR_LAYOUT_ID+'M'+this.dateEditorMonth;
htmlContent+='</tr><tr><td colspan="2" class="rich-calendar-date-layout-ok">'+
- '<div class="rich-calendar-time-btn" style="float:right;" onmousedown="Element.addClassName(this, \'rich-calendar-time-btn-press\');" onmouseout="Element.removeClassName(this, \'rich-calendar-time-btn-press\');" onmouseup="Element.removeClassName(this, \'rich-calendar-time-btn-press\');" onclick="$(\''+this.id+'\').component.hideDateEditor(true);">'+this.params.labels.ok+'</div>'+
+ '<div id="'+this.DATE_EDITOR_BUTTON_OK+'" class="rich-calendar-time-btn" style="float:right;" onmousedown="Element.addClassName(this, \'rich-calendar-time-btn-press\');" onmouseout="Element.removeClassName(this, \'rich-calendar-time-btn-press\');" onmouseup="Element.removeClassName(this, \'rich-calendar-time-btn-press\');" onclick="$(\''+this.id+'\').component.hideDateEditor(true);"><span>'+this.params.labels.ok+'</span></div>'+
'</td><td colspan="2" class="rich-calendar-date-layout-cancel">'+
- '<div class="rich-calendar-time-btn" style="float:left;" onmousedown="Element.addClassName(this, \'rich-calendar-time-btn-press\');" onmouseout="Element.removeClassName(this, \'rich-calendar-time-btn-press\');" onmouseup="Element.removeClassName(this, \'rich-calendar-time-btn-press\');" onclick="$(\''+this.id+'\').component.hideDateEditor(false);">'+this.params.labels.cancel+'</div>'+
+ '<div id="'+this.DATE_EDITOR_BUTTON_CANCEL+'" class="rich-calendar-time-btn" style="float:left;" onmousedown="Element.addClassName(this, \'rich-calendar-time-btn-press\');" onmouseout="Element.removeClassName(this, \'rich-calendar-time-btn-press\');" onmouseup="Element.removeClassName(this, \'rich-calendar-time-btn-press\');" onclick="$(\''+this.id+'\').component.hideDateEditor(false);"><span>'+this.params.labels.cancel+'</span></div>'+
'</td>';
Element.insert(this.EDITOR_LAYOUT_SHADOW_ID, {after:htmlBegin+htmlContent+htmlEnd});
Element.addClassName(this.dateEditorMonthID, 'rich-calendar-editor-btn-selected');
-
+
+ this.correctEditorButtons(editor, this.DATE_EDITOR_BUTTON_OK, this.DATE_EDITOR_BUTTON_CANCEL);
+
this.isDateEditorLayoutCreated = true;
},
@@ -1981,13 +2008,14 @@
showTimeEditor: function()
{
+ var editor;
if (this.timeType==0) return;
- if (!this.isEditorCreated) this.createEditor();
- if (!this.isTimeEditorLayoutCreated) this.createTimeEditorLayout();
+ if (!this.isEditorCreated) editor = this.createEditor();
+ else editor = $(this.EDITOR_ID);
+ if (!this.isTimeEditorLayoutCreated) this.createTimeEditorLayout(editor);
$(this.TIME_EDITOR_LAYOUT_ID).show();
- var editor = $(this.EDITOR_ID);
var editor_shadow = $(this.EDITOR_SHADOW_ID);
this.setEditorPosition($(this.id), editor, editor_shadow);
@@ -2042,13 +2070,14 @@
showDateEditor: function()
{
- if (!this.isEditorCreated) this.createEditor();
- if (!this.isDateEditorLayoutCreated) this.createDateEditorLayout();
+ var editor;
+ if (!this.isEditorCreated) editor = this.createEditor();
+ else editor = $(this.EDITOR_ID);
+ if (!this.isDateEditorLayoutCreated) this.createDateEditorLayout(editor);
else this.updateDateEditor();
$(this.DATE_EDITOR_LAYOUT_ID).show();
- var editor = $(this.EDITOR_ID);
var editor_shadow = $(this.EDITOR_SHADOW_ID);
this.setEditorPosition($(this.id), editor, editor_shadow);
@@ -2206,17 +2235,23 @@
[
new E('td',{'class': 'rich-calendar-time-layout-ok'},
[
- new E('div',{'class': 'rich-calendar-time-btn', 'style': 'float:right;', 'onmousedown': "Element.addClassName(this, 'rich-calendar-time-btn-press');", 'onmouseout': "Element.removeClassName(this, 'rich-calendar-time-btn-press');", 'onmouseup': "Element.removeClassName(this, 'rich-calendar-time-btn-press');", 'onclick': function(context){return "$('"+context.calendar.id+"').component.hideTimeEditor(true)";}},
+ new E('div',{'id': function(context){return context.calendar.TIME_EDITOR_BUTTON_OK}, 'class': 'rich-calendar-time-btn', 'style': 'float:right;', 'onmousedown': "Element.addClassName(this, 'rich-calendar-time-btn-press');", 'onmouseout': "Element.removeClassName(this, 'rich-calendar-time-btn-press');", 'onmouseup': "Element.removeClassName(this, 'rich-calendar-time-btn-press');", 'onclick': function(context){return "$('"+context.calendar.id+"').component.hideTimeEditor(true)";}},
[
- new ET(function (context) { return context.controlLabels.ok; })
+ new E('span',{},
+ [
+ new ET(function (context) { return context.controlLabels.ok; })
+ ])
])
])
,
new E('td',{'class': 'rich-calendar-time-layout-cancel'},
[
- new E('div',{'class': 'rich-calendar-time-btn', 'style': 'float:left;', 'onmousedown': "Element.addClassName(this, 'rich-calendar-time-btn-press');", 'onmouseout': "Element.removeClassName(this, 'rich-calendar-time-btn-press');", 'onmouseup': "Element.removeClassName(this, 'rich-calendar-time-btn-press');", 'onclick': function(context){return "$('"+context.calendar.id+"').component.hideTimeEditor(false)";}},
+ new E('div',{'id': function(context){return context.calendar.TIME_EDITOR_BUTTON_CANCEL}, 'class': 'rich-calendar-time-btn', 'style': 'float:left;', 'onmousedown': "Element.addClassName(this, 'rich-calendar-time-btn-press');", 'onmouseout': "Element.removeClassName(this, 'rich-calendar-time-btn-press');", 'onmouseup': "Element.removeClassName(this, 'rich-calendar-time-btn-press');", 'onclick': function(context){return "$('"+context.calendar.id+"').component.hideTimeEditor(false)";}},
[
- new ET(function (context) { return context.controlLabels.cancel; })
+ new E('span',{},
+ [
+ new ET(function (context) { return context.controlLabels.cancel; })
+ ])
])
])
])
16 years, 9 months
JBoss Rich Faces SVN: r7667 - in branches/3.2.x/ui/inplaceInput/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-04-08 10:36:30 -0400 (Tue, 08 Apr 2008)
New Revision: 7667
Modified:
branches/3.2.x/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
branches/3.2.x/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2981
Modified: branches/3.2.x/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
===================================================================
--- branches/3.2.x/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-04-08 14:16:32 UTC (rev 7666)
+++ branches/3.2.x/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-04-08 14:36:30 UTC (rev 7667)
@@ -53,8 +53,9 @@
private static final String INPLACE_CSS_CHANGE = "changed";
private static final String INPLACE_CSS_HOVER = "hover";
+
+ private static final String EMPTY_DEFAULT_LABEL = "   ";
-
protected Class<UIInplaceInput> getComponentClass() {
return UIInplaceInput.class;
@@ -120,7 +121,7 @@
String defaultLabel = (String)component.getAttributes().get("defaultLabel");
if (defaultLabel == null || defaultLabel.equals("")) {
- defaultLabel = "   ";
+ defaultLabel = EMPTY_DEFAULT_LABEL;
}
options.addOption("defaultLabel", defaultLabel);
@@ -150,7 +151,7 @@
return events.toString();
}
-
+
public String encodeInplaceInputCss(FacesContext context, UIComponent component) {
StringBuffer cssMap = new StringBuffer();
cssMap.append("var classes = ");
@@ -239,4 +240,11 @@
protected String getConvertedStringValue(FacesContext context, UIInplaceInput component, Object value) {
return InputUtils.getConvertedStringValue(context, component, value);
}
+
+ protected boolean isEmptyDefaultLabel(String defaultLabel) {
+ if (defaultLabel != null && EMPTY_DEFAULT_LABEL.equals(defaultLabel)) {
+ return true;
+ }
+ return false;
+ }
}
Modified: branches/3.2.x/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- branches/3.2.x/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-04-08 14:16:32 UTC (rev 7666)
+++ branches/3.2.x/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-04-08 14:36:30 UTC (rev 7667)
@@ -30,8 +30,8 @@
if (value == null) {
value = component.getValue();
}
+ value = getConvertedStringValue(context, component,value);
Object fieldValue = value;
- value = getConvertedStringValue(context, component,value);
if (value == null || value.equals("")) {
fieldValue = "";
String defaultValue = (String)component.getAttributes().get("defaultLabel");
@@ -174,8 +174,12 @@
</div>
<jsp:scriptlet>
- writer.write(convertToString(variables.getVariable("value")));
- if (!layout.equals("inline")) {
+ if(isEmptyDefaultLabel(convertToString(variables.getVariable("value")))) {
+ writer.write(convertToString(variables.getVariable("value")));
+ } else {
+ writer.writeText(convertToString(variables.getVariable("value")),null);
+ }
+ if (!layout.equals("inline")) {
</jsp:scriptlet>
</div>
<jsp:scriptlet>
16 years, 9 months
JBoss Rich Faces SVN: r7666 - in branches/3.2.x/ui/inplaceSelect/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-04-08 10:16:32 -0400 (Tue, 08 Apr 2008)
New Revision: 7666
Modified:
branches/3.2.x/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
branches/3.2.x/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
merge with trunk http://jira.jboss.com/jira/browse/RF-2967
Modified: branches/3.2.x/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
===================================================================
--- branches/3.2.x/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2008-04-08 14:16:05 UTC (rev 7665)
+++ branches/3.2.x/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2008-04-08 14:16:32 UTC (rev 7666)
@@ -19,7 +19,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.richfaces.component.UIInplaceSelect;
-import org.richfaces.json.JSONArray;
/**
* InplaceSelect base renderer implementation
@@ -31,127 +30,139 @@
private static Log logger = LogFactory.getLog(InplaceSelectBaseRenderer.class);
private static final String RICH_INPLACE_SELECT_CLASSES = "rich-inplace-select-item rich-inplace-select-font";
private static final String CONTROLS_FACET = "controls";
+ private static final String EMPTY_DEFAULT_LABEL = "   ";
+
- private JSONArray jsonParentArray;
-
-
@Override
protected void doDecode(FacesContext context, UIComponent component) {
- UIInplaceSelect inplaceInput = null;
-
- if (component instanceof UIInplaceSelect) {
- inplaceInput = (UIInplaceSelect) component;
- } else {
- if (logger.isDebugEnabled()) {
- logger.debug("No decoding necessary since the component " + component.getId() + " is not an instance or a sub class of UIInplaceSelect");
- }
- return;
- }
-
- if (InputUtils.isDisabled(inplaceInput) || InputUtils.isReadOnly(inplaceInput)) {
- if (logger.isDebugEnabled()) {
- logger.debug(("No decoding necessary since the component " + component.getId() + " is disabled"));
- }
- }
-
- String clientId = component.getClientId(context);
- if (clientId == null) {
- throw new NullPointerException("component " + inplaceInput.getClientId(context) + " client id is NULL");
- }
-
- clientId = clientId + "inplaceValue";
- Map request = context.getExternalContext().getRequestParameterMap();
- if (request.containsKey(clientId)) {
- String newValue = (String) request.get(clientId);
- if(newValue != null) {
- inplaceInput.setSubmittedValue(newValue);
- }
- }
+ UIInplaceSelect inplaceInput = null;
+
+ if (component instanceof UIInplaceSelect) {
+ inplaceInput = (UIInplaceSelect) component;
+ } else {
+ if (logger.isDebugEnabled()) {
+ logger.debug("No decoding necessary since the component " + component.getId() + " is not an instance or a sub class of UIInplaceSelect");
+ }
+ return;
+ }
+
+ if (InputUtils.isDisabled(inplaceInput) || InputUtils.isReadOnly(inplaceInput)) {
+ if (logger.isDebugEnabled()) {
+ logger.debug(("No decoding necessary since the component " + component.getId() + " is disabled"));
+ }
+ }
+
+ String clientId = component.getClientId(context);
+ if (clientId == null) {
+ throw new NullPointerException("component " + inplaceInput.getClientId(context) + " client id is NULL");
+ }
+
+ clientId = clientId + "inplaceValue";
+ Map request = context.getExternalContext().getRequestParameterMap();
+ if (request.containsKey(clientId)) {
+ String newValue = (String) request.get(clientId);
+ if(newValue != null) {
+ inplaceInput.setSubmittedValue(newValue);
+ }
+ }
}
- public void encodeItems(FacesContext context, UIComponent component) throws IOException {
- List <String> labels = new ArrayList<String>();
- ResponseWriter writer = context.getResponseWriter();
- jsonParentArray = new JSONArray();
-
- List<SelectItem> selectItems = SelectUtils.getSelectItems(context, component);
- if (!selectItems.isEmpty()) {
- for (Iterator<SelectItem> iterator = selectItems.iterator(); iterator.hasNext();) {
- SelectItem selectItem = iterator.next();
- String value = getConvertedStringValue(context, component, selectItem.getValue());
- String label = selectItem.getLabel();
- labels.add(label);
-
- encodeSuggestion(writer, component, label, RICH_INPLACE_SELECT_CLASSES);
-
- JSONArray jsonChildArray = new JSONArray();
- jsonChildArray.put(label);
- jsonChildArray.put(value);
- jsonParentArray.put(jsonChildArray);
- }
- }
- setValuesList(labels);
+ protected boolean isAcceptableComponent(UIComponent component) {
+ if (component instanceof UIInplaceSelect) {
+ return true;
+ }
+ return false;
}
+
+ public List encodeItems(FacesContext context, UIComponent component) throws IOException {
+
+ if (!isAcceptableComponent(component)) {
+ return null;
+ }
+
+ List parentList = new ArrayList();
+ UIInplaceSelect inplaceSelect = (UIInplaceSelect)component;
+ List <String> labels = new ArrayList<String>();
+ ResponseWriter writer = context.getResponseWriter();
+ List<SelectItem> selectItems = SelectUtils.getSelectItems(context, inplaceSelect);
+ if (!selectItems.isEmpty()) {
+ for (Iterator<SelectItem> iterator = selectItems.iterator(); iterator.hasNext();) {
+ SelectItem selectItem = iterator.next();
+ String value = getConvertedStringValue(context, inplaceSelect, selectItem.getValue());
+ String label = selectItem.getLabel();
+ labels.add(label);
+
+ encodeSuggestion(writer, inplaceSelect, label, RICH_INPLACE_SELECT_CLASSES);
+
+ List childList = new ArrayList();
+ childList.add(label);
+ childList.add(value);
+ parentList.add(childList);
+ }
+ }
+ return parentList;
+ }
public void encodeControlsFacet(FacesContext context, UIComponent component) throws IOException {
- UIComponent facet = component.getFacet(CONTROLS_FACET);
- if ((facet != null) && (facet.isRendered())) {
- renderChild(context, facet);
- }
+ UIComponent facet = component.getFacet(CONTROLS_FACET);
+ if ((facet != null) && (facet.isRendered())) {
+ renderChild(context, facet);
+ }
}
public boolean isControlsFacetExists(FacesContext context, UIComponent component) {
- UIComponent facet = component.getFacet(CONTROLS_FACET);
- if (facet != null && facet.isRendered()) {
- return true;
- }
- return false;
+ UIComponent facet = component.getFacet(CONTROLS_FACET);
+ if (facet != null && facet.isRendered()) {
+ return true;
+ }
+ return false;
}
protected Class<? extends UIComponent> getComponentClass() {
- return UIInplaceSelect.class;
+ return UIInplaceSelect.class;
}
- public String getItemsTextAsJSArray(FacesContext context, UIComponent component) {
- StringBuffer attributes = new StringBuffer();
- attributes.append(jsonParentArray.toString());
- return attributes.toString();
- }
-
public String getSelectedItemLabel(FacesContext context, UIInplaceSelect component) {
- String defaultLabel = null;
- Object value = component.getSubmittedValue();
- if (value == null) {
- value = component.getAttributes().get("value");
- }
- if (value == null) {
- return createDefaultLabel(component);
- }
- defaultLabel = getItemLabel(context, component, value);
- if (defaultLabel == null) {
- return createDefaultLabel(component);
- }
- return defaultLabel;
+ String defaultLabel = null;
+ Object value = component.getSubmittedValue();
+ if (value == null) {
+ value = component.getAttributes().get("value");
+ }
+ if (value == null) {
+ return createDefaultLabel(component);
+ }
+ defaultLabel = getItemLabel(context, component, value);
+ if (defaultLabel == null) {
+ return createDefaultLabel(component);
+ }
+ return defaultLabel;
}
protected String getItemLabel(FacesContext context, UIComponent component, Object value) {
- String itemLabel = null;
- List<SelectItem> selectItems = SelectUtils.getSelectItems(context, component);
- if (!selectItems.isEmpty()) {
- for(SelectItem item : selectItems) {
- if (value.equals(item.getValue())) {
- itemLabel = item.getLabel();
+ String itemLabel = null;
+ List<SelectItem> selectItems = SelectUtils.getSelectItems(context, component);
+ if (!selectItems.isEmpty()) {
+ for(SelectItem item : selectItems) {
+ if (value.equals(item.getValue())) {
+ itemLabel = item.getLabel();
+ }
+ }
}
- }
- }
- return itemLabel;
+ return itemLabel;
}
protected String createDefaultLabel(UIComponent component) {
- String defaultLabel = (String) component.getAttributes().get("defaultLabel");
- if (defaultLabel == null || defaultLabel.equals("")) {
- defaultLabel = "   ";
- }
- return defaultLabel;
+ String defaultLabel = (String) component.getAttributes().get("defaultLabel");
+ if (defaultLabel == null || defaultLabel.equals("")) {
+ defaultLabel = EMPTY_DEFAULT_LABEL;
+ }
+ return defaultLabel;
}
+
+ protected boolean isEmptyDefaultLabel(String defaultLabel) {
+ if (defaultLabel != null && EMPTY_DEFAULT_LABEL.equals(defaultLabel)) {
+ return true;
+ }
+ return false;
+ }
}
Modified: branches/3.2.x/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- branches/3.2.x/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-04-08 14:16:05 UTC (rev 7665)
+++ branches/3.2.x/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-04-08 14:16:32 UTC (rev 7666)
@@ -9,6 +9,8 @@
baseclass="org.richfaces.renderkit.InplaceSelectBaseRenderer"
class="org.richfaces.renderkit.html.InplaceSelectRenderer"
component="org.richfaces.component.UIInplaceSelect">
+
+
<h:styles>css/inplaceselect.xcss</h:styles>
@@ -32,10 +34,10 @@
if(value == null) {
value = component.getAttributes().get("value");
}
- Object fieldValue = value;
- String fieldLabel = getSelectedItemLabel(context, component);
+ String fieldLabel = getSelectedItemLabel(context, component);
value = getConvertedStringValue(context, component,value);
-
+ Object fieldValue = value;
+
if (value == null || value.equals("")) {
fieldValue = "";
}
@@ -158,7 +160,8 @@
<div id="listPosition#{clientId}" class="rich-inplace-select-list-position">
<div id="listDecoration#{clientId}" class="rich-inplace-select-list-decoration">
<div id="list#{clientId}" class="rich-inplace-select-list-scroll">
- <f:call name="encodeItems"/>
+ <c:object type="java.util.List" var="items" value="#{this:encodeItems(context,component)}">
+ </c:object>
</div>
</div>
</div>
@@ -179,7 +182,7 @@
};
new Richfaces.InplaceSelect(new Richfaces.InplaceSelectList('list#{clientId}', 'listParent#{clientId}', true,
- Richfaces.InplaceSelect.CLASSES.COMBO_LIST, '#{component.attributes["listWidth"]}', '#{component.attributes["listHeight"]}', #{this:getItemsTextAsJSArray(context, component)}, null,
+ Richfaces.InplaceSelect.CLASSES.COMBO_LIST, '#{component.attributes["listWidth"]}', '#{component.attributes["listHeight"]}', #{this:getItemsTextAsJSArray(context, component,items)}, null,
'#{clientId}inplaceTmpValue', 'shadow#{clientId}', 0, 0, '#{fieldValue}'),
'#{clientId}', '#{clientId}inplaceTmpValue',
'#{clientId}inplaceValue', '#{clientId}tabber',
@@ -191,7 +194,8 @@
inputWidth : '#{component.attributes["selectWidth"]}',
minInputWidth : '#{component.attributes["minSelectWidth"]}',
maxInputWidth : '#{component.attributes["maxSelectWidth"]}',
- openOnEdit:#{component.attributes["openOnEdit"]}},
+ openOnEdit: #{component.attributes["openOnEdit"]},
+ closeOnSelect: true},
{oneditactivation : #{this:getAsEventHandler(context, component, "oneditactivation")},
onviewactivation : #{this:getAsEventHandler(context, component, "onviewactivation")},
oneditactivated : #{this:getAsEventHandler(context, component, "oneditactivated")},
@@ -202,7 +206,11 @@
</div>
<jsp:scriptlet>
- writer.write(convertToString(variables.getVariable("fieldLabel")));
+ if(isEmptyDefaultLabel(convertToString(variables.getVariable("fieldLabel")))) {
+ writer.write(convertToString(variables.getVariable("fieldLabel")));
+ } else {
+ writer.writeText(convertToString(variables.getVariable("fieldLabel")),null);
+ }
if (layout.equals("block")) {
</jsp:scriptlet>
</div>
16 years, 9 months
JBoss Rich Faces SVN: r7665 - in branches/3.2.x/ui/combobox/src: main/templates and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-04-08 10:16:05 -0400 (Tue, 08 Apr 2008)
New Revision: 7665
Modified:
branches/3.2.x/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java
branches/3.2.x/ui/combobox/src/main/templates/combobox.jspx
branches/3.2.x/ui/combobox/src/test/java/org/richfaces/renderkit/ComboBoxRendererTest.java
Log:
merge with trunk http://jira.jboss.com/jira/browse/RF-2967
Modified: branches/3.2.x/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java
===================================================================
--- branches/3.2.x/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java 2008-04-08 13:59:37 UTC (rev 7664)
+++ branches/3.2.x/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java 2008-04-08 14:16:05 UTC (rev 7665)
@@ -33,12 +33,11 @@
*/
public class ComboBoxBaseRenderer extends HeaderResourcesRendererBase {
- private List valuesList = null;
- private final String RICH_COMBOBOX_ITEM_CLASSES = "rich-combobox-item rich-combobox-item-normal";
+ private static final String RICH_COMBOBOX_ITEM_CLASSES = "rich-combobox-item rich-combobox-item-normal";
private static Log logger = LogFactory.getLog(ComboBoxBaseRenderer.class);
protected Class<? extends UIComponent> getComponentClass() {
- return UIComboBox.class;
+ return UIComboBox.class;
}
protected void doDecode(FacesContext context, UIComponent component) {
@@ -48,14 +47,14 @@
comboBox = (UIComboBox) component;
} else {
if (logger.isDebugEnabled()) {
- logger.debug("No decoding necessary since the component " + component.getId() + " is not an instance or a sub class of UIComboBox");
+ logger.debug("No decoding necessary since the component " + component.getId() + " is not an instance or a sub class of UIComboBox");
}
return;
}
if (InputUtils.isDisabled(comboBox) || InputUtils.isReadOnly(comboBox)) {
if (logger.isDebugEnabled()) {
- logger.debug(("No decoding necessary since the component " + component.getId() + " is disabled"));
+ logger.debug(("No decoding necessary since the component " + component.getId() + " is disabled"));
}
}
@@ -71,88 +70,91 @@
comboBox.setSubmittedValue(newValue);
}
}
+
+ public List encodeItems(FacesContext context, UIComponent component) throws IOException {
+ if (!isAcceptableComponent(component)) {
+ return null;
+ }
+
+ UIComboBox comboBox = (UIComboBox) component;
+ Object suggestionValues = comboBox.getSuggestionValues();
+ ResponseWriter writer = context.getResponseWriter();
- public void encodeItems(FacesContext context, UIComponent component) throws IOException {
- UIComboBox comboBox = (UIComboBox) component;
- Object suggestionValues = comboBox.getSuggestionValues();
- ResponseWriter writer = context.getResponseWriter();
+ List values = new ArrayList();
- List values = new ArrayList();
+ if (suggestionValues != null) {
+ if (suggestionValues instanceof Collection) {
+ for (Iterator iterator = ((Collection) suggestionValues).iterator(); iterator.hasNext();) {
+ String value = getConvertedStringValue(context, comboBox, iterator.next());
+ values.add(value);
+ encodeSuggestion(writer, comboBox, value, RICH_COMBOBOX_ITEM_CLASSES);
+ }
+ } else if (suggestionValues.getClass().isArray()) {
+ Object[] suggestions = (Object[]) suggestionValues;
+ for (int i = 0; i < suggestions.length; i++) {
+ String value = getConvertedStringValue(context, comboBox, suggestions[i]);
+ values.add(value);
+ encodeSuggestion(writer, comboBox, value, RICH_COMBOBOX_ITEM_CLASSES);
+ }
+ } else {
+ throw new IllegalArgumentException("suggestionValues should be Collection or array");
+ }
+
+ }
- if (suggestionValues != null) {
- if (suggestionValues instanceof Collection) {
- for (Iterator iterator = ((Collection) suggestionValues).iterator(); iterator.hasNext();) {
- String value = getConvertedStringValue(context, comboBox, iterator.next());
- values.add(value);
- encodeSuggestion(writer, comboBox, value, RICH_COMBOBOX_ITEM_CLASSES);
+ List<SelectItem> selectItems = SelectUtils.getSelectItems(context, component);
+ if (!selectItems.isEmpty()) {
+ for (Iterator<SelectItem> iterator = selectItems.iterator(); iterator.hasNext();) {
+ SelectItem selectItem = iterator.next();
+ String value = getConvertedStringValue(context, comboBox, selectItem.getValue());
+ values.add(value);
+ encodeSuggestion(writer, comboBox, value, RICH_COMBOBOX_ITEM_CLASSES);
+ }
}
- } else if (suggestionValues.getClass().isArray()) {
- Object[] suggestions = (Object[]) suggestionValues;
- for (int i = 0; i < suggestions.length; i++) {
- String value = getConvertedStringValue(context, comboBox, suggestions[i]);
- values.add(value);
- encodeSuggestion(writer, comboBox, value, RICH_COMBOBOX_ITEM_CLASSES);
- }
- } else {
- throw new IllegalArgumentException("suggestionValues should be Collection or array");
- }
-
- }
-
- List<SelectItem> selectItems = SelectUtils.getSelectItems(context, component);
- if (!selectItems.isEmpty()) {
- for (Iterator<SelectItem> iterator = selectItems.iterator(); iterator.hasNext();) {
- SelectItem selectItem = iterator.next();
- String value = getConvertedStringValue(context, comboBox, selectItem.getValue());
- values.add(value);
- encodeSuggestion(writer, comboBox, value, RICH_COMBOBOX_ITEM_CLASSES);
- }
- }
- setValuesList(values);
+ return values;
}
@Override
public Object getConvertedValue(FacesContext context, UIComponent component, Object submittedValue) throws ConverterException {
- return InputUtils.getConvertedValue(context, component, submittedValue);
+ return InputUtils.getConvertedValue(context, component, submittedValue);
+ }
- }
protected String getConvertedStringValue(FacesContext context, UIComponent component, Object value) {
- return InputUtils.getConvertedStringValue(context, component, value);
+ return InputUtils.getConvertedStringValue(context, component, value);
}
public void encodeSuggestion(ResponseWriter writer, UIComponent component, String value, String classes) throws IOException {
- writer.startElement(HTML.SPAN_ELEM, component);
- writer.writeAttribute(HTML.class_ATTRIBUTE, classes, null);
- writer.write(value);
- writer.endElement(HTML.SPAN_ELEM);
+ writer.startElement(HTML.SPAN_ELEM, component);
+ writer.writeAttribute(HTML.class_ATTRIBUTE, classes, null);
+ writer.writeText(value, null);
+ writer.endElement(HTML.SPAN_ELEM);
}
-
- public String getItemsTextAsJSArray(FacesContext context, UIComponent component) {
- return ScriptUtils.toScript(valuesList);
+
+ protected boolean isAcceptableComponent(UIComponent component) {
+ if (component instanceof UIComboBox) {
+ return true;
+ }
+ return false;
}
+
+ public String getItemsTextAsJSArray(FacesContext context, UIComponent component, List items) {
+ return ScriptUtils.toScript(items);
+ }
public String getAsEventHandler(FacesContext context, UIComponent component, String attributeName) {
- String event = (String) component.getAttributes().get(attributeName);
- ScriptString result = JSReference.NULL;
+ String event = (String) component.getAttributes().get(attributeName);
+ ScriptString result = JSReference.NULL;
- if (event != null) {
- event = event.trim();
- if (event.length() != 0) {
- JSFunctionDefinition function = new JSFunctionDefinition();
- function.addParameter("event");
- function.addToBody(event);
- result = function;
- }
- }
+ if (event != null) {
+ event = event.trim();
+ if (event.length() != 0) {
+ JSFunctionDefinition function = new JSFunctionDefinition();
+ function.addParameter("event");
+ function.addToBody(event);
+ result = function;
+ }
+ }
- return ScriptUtils.toScript(result);
+ return ScriptUtils.toScript(result);
}
-
- public List getValuesList() {
- return valuesList;
- }
-
- public void setValuesList(List valuesList) {
- this.valuesList = valuesList;
- }
}
Modified: branches/3.2.x/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- branches/3.2.x/ui/combobox/src/main/templates/combobox.jspx 2008-04-08 13:59:37 UTC (rev 7664)
+++ branches/3.2.x/ui/combobox/src/main/templates/combobox.jspx 2008-04-08 14:16:05 UTC (rev 7665)
@@ -11,6 +11,7 @@
component="org.richfaces.component.UIComboBox">
<jsp:directive.page import="org.richfaces.component.util.HtmlUtil" />
+ <jsp:directive.page import=" java.util.List"/>
<h:styles>css/combobox.xcss</h:styles>
<h:scripts>
@@ -248,7 +249,8 @@
<div id="#{clientId}listPosition" class="rich-combobox-list-position">
<div id="#{clientId}listDecoration" class="rich-combobox-list-decoration">
<div id="#{clientId}list" class="rich-combobox-list-scroll">
- <f:call name="encodeItems"/>
+ <c:object type="java.util.List" var="items" value="#{this:encodeItems(context,component)}">
+ </c:object>
</div>
</div>
</div>
@@ -306,7 +308,7 @@
"#{clientId}shadow",
Richfaces.ComboBox.CLASSES,
"#{listWidth}", "#{listHeight}",
- #{this:getItemsTextAsJSArray(context, component)},
+ #{this:getItemsTextAsJSArray(context, component,items)},
#{directInputSuggestions},
#{filterNewValues},
#{selectFirstOnUpdate},
Modified: branches/3.2.x/ui/combobox/src/test/java/org/richfaces/renderkit/ComboBoxRendererTest.java
===================================================================
--- branches/3.2.x/ui/combobox/src/test/java/org/richfaces/renderkit/ComboBoxRendererTest.java 2008-04-08 13:59:37 UTC (rev 7664)
+++ branches/3.2.x/ui/combobox/src/test/java/org/richfaces/renderkit/ComboBoxRendererTest.java 2008-04-08 14:16:05 UTC (rev 7665)
@@ -70,10 +70,10 @@
requestMap.put(id, "Pennsylvania");
}
- public void itemsTextAsJSArrayTest() {
- String script = renderer.getItemsTextAsJSArray(facesContext, comboBox);
- assertNotNull(script);
- }
+// public void itemsTextAsJSArrayTest() {
+// String script = renderer.getItemsTextAsJSArray(facesContext, comboBox);
+// assertNotNull(script);
+// }
public void testRender() throws Exception {
16 years, 9 months
JBoss Rich Faces SVN: r7664 - trunk/ui/tree/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-04-08 09:59:37 -0400 (Tue, 08 Apr 2008)
New Revision: 7664
Modified:
trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
Log:
http://jira.jboss.com/jira/browse/RF-1629
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2008-04-08 13:21:34 UTC (rev 7663)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2008-04-08 13:59:37 UTC (rev 7664)
@@ -125,6 +125,11 @@
*/
private String _treeNodeVar;
+ /**
+ * Stored state of "treeNodeVar" attribute
+ */
+ private Object treeNodeVarOrigValue = null;
+
public UITree() {
super();
@@ -570,6 +575,60 @@
public boolean hasAjaxSubmitSelection() {
return isAjaxSubmitSelection();
}
+
+ /**
+ * Save current state of data variable.
+ * Overrides the implementation in the base class for the case
+ * the base implementation will be changed.
+ */
+ @Override
+ public void captureOrigValue() {
+ this.captureOrigValue(FacesContext.getCurrentInstance());
+ }
+
+ /**
+ * Save current state of data variable.
+ *
+ * @param faces current faces context
+ */
+ @Override
+ public void captureOrigValue(FacesContext faces) {
+ super.captureOrigValue(faces);
+ String treeNodeVar = getTreeNodeVar();
+ if (treeNodeVar != null) {
+ Map<String, Object> attrs = faces.getExternalContext().getRequestMap();
+ this.treeNodeVarOrigValue = attrs.get(treeNodeVar);
+ }
+ }
+
+ /**
+ * Restore value of data variable after processing phase.
+ * Overrides the implementation in the base class for the case
+ * the base implementation will be changed.
+ */
+ @Override
+ public void restoreOrigValue() {
+ this.restoreOrigValue(FacesContext.getCurrentInstance());
+ }
+
+ /**
+ * Restore value of data variable after processing phase.
+ *
+ * @param faces current faces context
+ */
+ @Override
+ public void restoreOrigValue(FacesContext faces) {
+ super.restoreOrigValue(faces);
+ String treeNodeVar = getTreeNodeVar();
+ if (treeNodeVar != null) {
+ Map<String, Object> attrs = faces.getExternalContext().getRequestMap();
+ if (this.treeNodeVarOrigValue != null) {
+ attrs.put(treeNodeVar, this.treeNodeVarOrigValue);
+ } else {
+ attrs.remove(treeNodeVar);
+ }
+ }
+ }
private ExtendedDataModel createDataModel(boolean allowCached) {
Object value = this.getValue();
@@ -858,9 +917,10 @@
public Object saveState(FacesContext faces) {
- Object[] state = new Object[2];
+ Object[] state = new Object[3];
state[0] = super.saveState(faces);
state[1] = saveAttachedState(faces, defaultFacet);
+ state[2] = getTreeNodeVar();
return state;
}
@@ -875,6 +935,7 @@
defaultFacet.getChildren().add(createDefaultNodeFaceOutput(faces));
defaultFacet.setParent(this);
}
+ setTreeNodeVar((String) state[2]);
}
public String getResolvedDragIndicator(FacesContext facesContext) {
16 years, 9 months
JBoss Rich Faces SVN: r7662 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-04-08 09:09:43 -0400 (Tue, 08 Apr 2008)
New Revision: 7662
Modified:
trunk/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml
Log:
RF-1216 - updated "key features"
Modified: trunk/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml 2008-04-08 13:08:29 UTC (rev 7661)
+++ trunk/docs/userguide/en/src/main/docbook/included/comboBox.desc.xml 2008-04-08 13:09:43 UTC (rev 7662)
@@ -27,7 +27,6 @@
<listitem>Disablement support</listitem>
<listitem>Browser like selection</listitem>
<listitem>Smart user-defined positioning</listitem>
- <listitem>Multicolumn suggestion popup list</listitem>
<!--listitem>Possible to set the popup appearance delay through <emphasis><property>"showDelay"</property></emphasis>
or <emphasis><property>"minChars"</property></emphasis> attributes
</listitem-->
16 years, 9 months
JBoss Rich Faces SVN: r7661 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-04-08 09:08:29 -0400 (Tue, 08 Apr 2008)
New Revision: 7661
Modified:
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
Log:
RF-1207 - updated "key features" and information about 'maxFilesQuantity' attribute
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.desc.xml 2008-04-08 12:07:45 UTC (rev 7660)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.desc.xml 2008-04-08 13:08:29 UTC (rev 7661)
@@ -26,12 +26,13 @@
<section>
<title>Key Features</title>
<itemizedlist>
+ <listitem><para>ProgressBar shows the status of downloads</para></listitem>
<listitem><para>Highly customizable look and feel</para></listitem>
<listitem><para>File types and file sizes restrictions</para></listitem>
<listitem><para>Multiple files upload support</para></listitem>
<listitem><para>Possibility to cancel the request</para></listitem>
- <listitem><para>One request for every upload component</para></listitem>
- <listitem><para>Asynchronous mode</para></listitem>
+ <listitem><para>One request for every upload</para></listitem>
+ <listitem><para>Automatic uploads</para></listitem>
<listitem><para>Disablement support</para></listitem>
</itemizedlist>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-04-08 12:07:45 UTC (rev 7660)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-04-08 13:08:29 UTC (rev 7661)
@@ -125,8 +125,8 @@
<para>
- Immediately files uploading could be performed by means of the <emphasis><property> "immediateUpload"</property></emphasis> attribute.
- If the value of this attribute is "true" files are uploaded immediately once they have been added into the list.
+ Automatically files uploading could be performed by means of the <emphasis><property> "immediateUpload"</property></emphasis> attribute.
+ If the value of this attribute is "true" files are uploaded automatically once they have been added into the list.
All next files in the list are uploaded automatically one by one.
If you cancel uploading process next files aren't started to upload till you press the "Upload" button or clear the list.
</para>
@@ -183,7 +183,8 @@
<listitem>
<para>
By <property>max files quantity</property>, use the <emphasis><property> "maxFilesQuantity"</property></emphasis> attribute
- to define max number of files allowed to be uploaded. After a number of files in the list equals to the value of this attribute "Add" button is disabled.
+ to define max number of files allowed to be uploaded. After a number of files in the list equals to the value of this attribute "Add" button is disabled and nothing could be uploaded even if you clean the whole list.
+ In order to upload files again you should rerender the component.
As it could be seen in the example below, only 2 files are accepted for uploading.
</para>
<para>
16 years, 9 months