JBoss Rich Faces SVN: r13587 - trunk/framework/api/src/main/java/org/ajax4jsf.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-04-14 21:35:33 -0400 (Tue, 14 Apr 2009)
New Revision: 13587
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/Messages.java
Log:
Do not break on messages bundle loading errors.
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/Messages.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/Messages.java 2009-04-14 19:02:25 UTC (rev 13586)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/Messages.java 2009-04-15 01:35:33 UTC (rev 13587)
@@ -22,12 +22,39 @@
package org.ajax4jsf;
import java.text.MessageFormat;
+import java.util.Collections;
+import java.util.Enumeration;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
+import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class Messages {
+ /**
+ * @author asmirnov
+ *
+ */
+ public static final class EmptyResourceBundle extends ResourceBundle {
+
+ /* (non-Javadoc)
+ * @see java.util.ResourceBundle#getKeys()
+ */
+ @Override
+ public Enumeration<String> getKeys() {
+ return Collections.enumeration(Collections.<String>emptyList());
+ }
+
+ /* (non-Javadoc)
+ * @see java.util.ResourceBundle#handleGetObject(java.lang.String)
+ */
+ @Override
+ protected Object handleGetObject(String key) {
+ return null;
+ }
+
+ }
+
private static final String BUNDLE_NAME = "org.ajax4jsf.messages";
private static Map<ClassLoader, ResourceBundle> bundles = new HashMap<ClassLoader, ResourceBundle>();
@@ -36,7 +63,19 @@
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
ResourceBundle bundle = (ResourceBundle) bundles.get(contextClassLoader);
if (bundle == null) {
- bundle = ResourceBundle.getBundle(BUNDLE_NAME, Locale.getDefault(), contextClassLoader);
+ try {
+ bundle = ResourceBundle.getBundle(BUNDLE_NAME, Locale
+ .getDefault(), contextClassLoader);
+
+ } catch (MissingResourceException e) {
+ try {
+ bundle = ResourceBundle.getBundle(BUNDLE_NAME, Locale
+ .getDefault(), Messages.class.getClassLoader());
+
+ } catch (MissingResourceException e2) {
+ bundle = new EmptyResourceBundle();
+ }
+ }
bundles.put(contextClassLoader, bundle);
}
15 years, 2 months
JBoss Rich Faces SVN: r13586 - trunk/ui/columns/src/main/java/org/richfaces/taglib.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-14 15:02:25 -0400 (Tue, 14 Apr 2009)
New Revision: 13586
Modified:
trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java
Log:
https://jira.jboss.org/jira/browse/RF-6679
Modified: trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java 2009-04-14 18:43:50 UTC (rev 13585)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java 2009-04-14 19:02:25 UTC (rev 13586)
@@ -244,6 +244,12 @@
*/
private ValueExpression _rendered;
+ private ValueExpression _sortIcon;
+
+ private ValueExpression _sortIconAscending;
+
+ private ValueExpression _sortIconDescending;
+
/**
* SortOrder is an enumeration of the possible sort orderings. Setter for
* sortOrder
@@ -1126,4 +1132,28 @@
public void setRendered(ValueExpression __rendered) {
this._rendered = __rendered;
}
+
+ /**
+ * Defines sort icon. The value for the attribute is context related
+ * @param icon
+ */
+ public void setSortIcon(ValueExpression icon) {
+ _sortIcon = icon;
+ }
+
+ /**
+ * Defines sort icon for ascending order. The value for the attribute is context related
+ * @param iconAscending
+ */
+ public void setSortIconAscending(ValueExpression iconAscending) {
+ _sortIconAscending = iconAscending;
+ }
+
+ /**
+ * Defines sort icon for descending order. The value for the attribute is context related
+ * @param iconDescending
+ */
+ public void setSortIconDescending(ValueExpression iconDescending) {
+ _sortIconDescending = iconDescending;
+ }
}
15 years, 2 months
JBoss Rich Faces SVN: r13585 - trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-14 14:43:50 -0400 (Tue, 14 Apr 2009)
New Revision: 13585
Modified:
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
Log:
https://jira.jboss.org/jira/browse/RF-6684
Modified: trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
===================================================================
--- trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2009-04-14 18:31:33 UTC (rev 13584)
+++ trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2009-04-14 18:43:50 UTC (rev 13585)
@@ -99,16 +99,21 @@
if (ajaxUpdate && this.tree.showConnectingLines) {
var cell = element.rows[0].cells[0];
- if (cell.style && cell.style.removeExpression) {
- cell.style.backgroundImage = cell.currentStyle.backgroundImage;
- cell.style.removeExpression('backgroundImage');
- }
-
- if (childsTd) {
- if (childsTd.style && childsTd.style.removeExpression) {
- childsTd.style.backgroundImage = childsTd.currentStyle.backgroundImage;
- childsTd.style.removeExpression('backgroundImage');
+
+ try {
+ if (cell.style && cell.style.removeExpression) {
+ cell.style.backgroundImage = cell.currentStyle.backgroundImage;
+ cell.style.removeExpression('backgroundImage');
}
+
+ if (childsTd) {
+ if (childsTd.style && childsTd.style.removeExpression) {
+ childsTd.style.backgroundImage = childsTd.currentStyle.backgroundImage;
+ childsTd.style.removeExpression('backgroundImage');
+ }
+ }
+ } catch (e) {
+ //IE8 throws "not implemented" for expression-management functions
}
}
15 years, 2 months
JBoss Rich Faces SVN: r13584 - trunk/samples/richfaces-demo/src/main/webapp/templates.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-14 14:31:33 -0400 (Tue, 14 Apr 2009)
New Revision: 13584
Modified:
trunk/samples/richfaces-demo/src/main/webapp/templates/main.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-6025
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/main.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/main.xhtml 2009-04-14 17:59:25 UTC (rev 13583)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/main.xhtml 2009-04-14 18:31:33 UTC (rev 13584)
@@ -58,5 +58,14 @@
</tbody>
</table>
+<script type="text/javascript" src="http://www.google-analytics.com/urchin.js"></script>
+
+<script type="text/javascript">
+if (window.location.hostname.indexOf("livedemo.exadel.com") != -1) {
+ _uacct = "UA-7306415-1";
+ urchinTracker();
+}
+</script>
+
</body>
</html>
15 years, 2 months
JBoss Rich Faces SVN: r13583 - in trunk/ui/colorPicker/src: main/java/org/richfaces and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-14 13:59:25 -0400 (Tue, 14 Apr 2009)
New Revision: 13583
Added:
trunk/ui/colorPicker/src/main/java/org/richfaces/convert/
trunk/ui/colorPicker/src/main/java/org/richfaces/convert/AWTColorConverter.java
trunk/ui/colorPicker/src/main/java/org/richfaces/convert/IntegerColorConverter.java
trunk/ui/colorPicker/src/main/java/org/richfaces/convert/LongColorConverter.java
trunk/ui/colorPicker/src/test/java/org/richfaces/convert/
trunk/ui/colorPicker/src/test/java/org/richfaces/convert/AWTColorConverterTest.java
trunk/ui/colorPicker/src/test/java/org/richfaces/convert/IntegerColorConverterTest.java
trunk/ui/colorPicker/src/test/java/org/richfaces/convert/LongColorConverterTest.java
Modified:
trunk/ui/colorPicker/src/main/config/component/colorPicker.xml
trunk/ui/colorPicker/src/main/java/org/richfaces/component/UIColorPicker.java
trunk/ui/colorPicker/src/main/templates/org/richfaces/htmlColorPicker.jspx
Log:
https://jira.jboss.org/jira/browse/RF-6757
Modified: trunk/ui/colorPicker/src/main/config/component/colorPicker.xml
===================================================================
--- trunk/ui/colorPicker/src/main/config/component/colorPicker.xml 2009-04-14 17:32:33 UTC (rev 13582)
+++ trunk/ui/colorPicker/src/main/config/component/colorPicker.xml 2009-04-14 17:59:25 UTC (rev 13583)
@@ -96,5 +96,20 @@
</property>
</component>
+
+ <converter generate="false">
+ <id>org.richfaces.IntegerColor</id>
+ <classname>org.richfaces.convert.IntegerColorConverter</classname>
+ </converter>
+
+ <converter generate="false">
+ <id>org.richfaces.LongColor</id>
+ <classname>org.richfaces.convert.LongColorConverter</classname>
+ </converter>
+
+ <converter generate="false">
+ <id>org.richfaces.AWTColor</id>
+ <classname>org.richfaces.convert.AWTColorConverter</classname>
+ </converter>
</components>
\ No newline at end of file
Modified: trunk/ui/colorPicker/src/main/java/org/richfaces/component/UIColorPicker.java
===================================================================
--- trunk/ui/colorPicker/src/main/java/org/richfaces/component/UIColorPicker.java 2009-04-14 17:32:33 UTC (rev 13582)
+++ trunk/ui/colorPicker/src/main/java/org/richfaces/component/UIColorPicker.java 2009-04-14 17:59:25 UTC (rev 13583)
@@ -4,8 +4,18 @@
package org.richfaces.component;
+import java.awt.Color;
+
+import javax.el.ValueExpression;
+import javax.faces.application.Application;
import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import org.richfaces.convert.AWTColorConverter;
+import org.richfaces.convert.IntegerColorConverter;
+import org.richfaces.convert.LongColorConverter;
+
/**
* JSF component class
*
@@ -16,11 +26,43 @@
public static final String COMPONENT_FAMILY = "org.richfaces.ColorPicker";
- @Override
- public void setValue(Object value) {
- // TODO Remove it
- super.setValue(value);
- }
+ public static final String COLOR_MODE_RGB = "rgb";
+ public static final String COLOR_MODE_HEX = "hex";
+
+ public abstract String getColorMode();
+ public abstract void setColorMode(String colorMode);
+ @Override
+ public Converter getConverter() {
+ Converter converter = super.getConverter();
+ if (converter == null) {
+ ValueExpression valueExpression = this.getValueExpression("value");
+ if (valueExpression != null) {
+ FacesContext context = getFacesContext();
+
+ Class<?> converterType = valueExpression.getType(context.getELContext());
+ Application application = context.getApplication();
+ if (converterType != null && !String.class.equals(converterType) &&
+ !Object.class.equals(converterType) && !Integer.class.equals(converterType) &&
+ !Long.class.equals(converterType) /* standard integer or long converter won't suite our needs */) {
+
+ converter = application.createConverter(converterType);
+ }
+
+ if (converter == null) {
+ if (Long.class.equals(converterType)) {
+ converter = application.createConverter(LongColorConverter.CONVERTER_ID);
+ } else if (Integer.class.equals(converterType)) {
+ converter = application.createConverter(IntegerColorConverter.CONVERTER_ID);
+ } else if (Color.class.equals(converterType)) {
+ converter = application.createConverter(AWTColorConverter.CONVERTER_ID);
+ }
+ }
+ }
+ }
+
+ return converter;
+ }
+
}
Added: trunk/ui/colorPicker/src/main/java/org/richfaces/convert/AWTColorConverter.java
===================================================================
--- trunk/ui/colorPicker/src/main/java/org/richfaces/convert/AWTColorConverter.java (rev 0)
+++ trunk/ui/colorPicker/src/main/java/org/richfaces/convert/AWTColorConverter.java 2009-04-14 17:59:25 UTC (rev 13583)
@@ -0,0 +1,74 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.convert;
+
+import java.awt.Color;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author Nick Belaevski
+ * @since 3.3.1
+ */
+public class AWTColorConverter extends IntegerColorConverter {
+
+ public static final String CONVERTER_ID = "org.richfaces.AWTColor";
+
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String value) {
+
+ if (context == null) {
+ throw new NullPointerException("context");
+ }
+
+ if (component == null) {
+ throw new NullPointerException("component");
+ }
+
+ Integer convertedValue = (Integer) super.getAsObject(context, component, value);
+ if (convertedValue != null) {
+ return new Color(convertedValue.intValue());
+ } else {
+ return null;
+ }
+ }
+
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) {
+
+ if (context == null) {
+ throw new NullPointerException("context");
+ }
+
+ if (component == null) {
+ throw new NullPointerException("component");
+ }
+
+ Integer rgb = null;
+ if (value != null) {
+ rgb = 0xFFFFFF & ((Color) value).getRGB();
+ }
+
+ return super.getAsString(context, component, rgb);
+ }
+}
Added: trunk/ui/colorPicker/src/main/java/org/richfaces/convert/IntegerColorConverter.java
===================================================================
--- trunk/ui/colorPicker/src/main/java/org/richfaces/convert/IntegerColorConverter.java (rev 0)
+++ trunk/ui/colorPicker/src/main/java/org/richfaces/convert/IntegerColorConverter.java 2009-04-14 17:59:25 UTC (rev 13583)
@@ -0,0 +1,142 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.convert;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+
+import org.ajax4jsf.Messages;
+import org.richfaces.component.UIColorPicker;
+import org.richfaces.component.util.MessageUtil;
+
+/**
+ * @author Nick Belaevski
+ * @since 3.3.1
+ */
+public class IntegerColorConverter implements Converter {
+
+ private static final Pattern NUMBER = Pattern.compile("(\\d+)");
+
+ public static final String CONVERTER_ID = "org.richfaces.IntegerColor";
+
+ private int convertToInteger(String colorValue) {
+ int result = 0;
+
+ if (colorValue.charAt(0) == '#') {
+ result = Integer.parseInt(colorValue.substring(1), 16);
+ } else {
+ Matcher matcher = NUMBER.matcher(colorValue);
+ for (int i = 1; i <= 3; i++) {
+ if (!matcher.find()) {
+ throw new IllegalArgumentException(colorValue);
+ }
+
+ if (i != 1) {
+ result <<= 8;
+ }
+
+ result |= (0xFF & Short.parseShort(matcher.group(1)));
+ }
+ }
+
+ return result;
+ }
+
+ private String convertToString(int value, String colorMode) {
+ if (UIColorPicker.COLOR_MODE_RGB.equals(colorMode)) {
+ StringBuilder sb = new StringBuilder("rgb(");
+
+ sb.append((value & 0xFF0000) >> 16);
+ sb.append(", ");
+ sb.append((value & 0x00FF00) >> 8);
+ sb.append(", ");
+ sb.append(value & 0xFF);
+
+ sb.append(")");
+ return sb.toString();
+ } else {
+ StringBuilder sb = new StringBuilder("#");
+ String hexString = Integer.toHexString(value);
+ for (int i = 0; i < 6 - hexString.length(); i++) {
+ sb.append('0');
+ }
+ sb.append(hexString);
+ return sb.toString();
+ }
+ }
+
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String value) {
+
+ if (context == null) {
+ throw new NullPointerException("context");
+ }
+
+ if (component == null) {
+ throw new NullPointerException("component");
+ }
+
+ if (value != null && value.length() != 0) {
+ try {
+ return convertToInteger(value);
+ } catch (Exception e) {
+ Object label = MessageUtil.getLabel(context, component);
+ String summary = Messages.getMessage(Messages.COMPONENT_CONVERSION_ERROR, label, value);
+
+ throw new ConverterException(new FacesMessage(summary), e);
+ }
+ } else {
+ return null;
+ }
+ }
+
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) {
+
+ if (context == null) {
+ throw new NullPointerException("context");
+ }
+
+ if (component == null) {
+ throw new NullPointerException("component");
+ }
+
+ if (value != null) {
+ try {
+ return convertToString((Integer) value, ((UIColorPicker) component).getColorMode());
+ } catch (Exception e) {
+ Object label = MessageUtil.getLabel(context, component);
+ String summary = Messages.getMessage(Messages.COMPONENT_CONVERSION_ERROR, label, value);
+
+ throw new ConverterException(new FacesMessage(summary), e);
+ }
+ } else {
+ return "";
+ }
+ }
+}
Added: trunk/ui/colorPicker/src/main/java/org/richfaces/convert/LongColorConverter.java
===================================================================
--- trunk/ui/colorPicker/src/main/java/org/richfaces/convert/LongColorConverter.java (rev 0)
+++ trunk/ui/colorPicker/src/main/java/org/richfaces/convert/LongColorConverter.java 2009-04-14 17:59:25 UTC (rev 13583)
@@ -0,0 +1,71 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.convert;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author Nick Belaevski
+ * @since 3.3.1
+ */
+public class LongColorConverter extends IntegerColorConverter {
+
+ @Override
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String value) {
+ if (context == null) {
+ throw new NullPointerException("context");
+ }
+
+ if (component == null) {
+ throw new NullPointerException("component");
+ }
+
+ Integer integer = (Integer) super.getAsObject(context, component, value);
+ if (integer != null) {
+ return Long.valueOf(integer.intValue());
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) {
+
+ if (context == null) {
+ throw new NullPointerException("context");
+ }
+
+ if (component == null) {
+ throw new NullPointerException("component");
+ }
+
+ Integer intValue = null;
+ if (value != null) {
+ intValue = 0xFFFFFF & ((Long) value).intValue();
+ }
+
+ return super.getAsString(context, component, intValue);
+ }
+}
Modified: trunk/ui/colorPicker/src/main/templates/org/richfaces/htmlColorPicker.jspx
===================================================================
--- trunk/ui/colorPicker/src/main/templates/org/richfaces/htmlColorPicker.jspx 2009-04-14 17:32:33 UTC (rev 13582)
+++ trunk/ui/colorPicker/src/main/templates/org/richfaces/htmlColorPicker.jspx 2009-04-14 17:59:25 UTC (rev 13583)
@@ -10,6 +10,9 @@
baseclass="org.richfaces.renderkit.ColorPickerRendererBase"
component="org.richfaces.component.UIColorPicker"
>
+
+ <jsp:directive.page import="org.richfaces.component.UIColorPicker" />
+
<f:clientid var="clientId"/>
<h:scripts>/org/richfaces/renderkit/html/scripts/jquery/jquery.js, /org/richfaces/renderkit/html/scripts/jquery.utils.js, /org/richfaces/renderkit/html/scripts/pngFix.js, /org/richfaces/renderkit/html/scripts/ui.core.js, /org/richfaces/renderkit/html/scripts/ui.colorpicker.js</h:scripts>
<h:styles>/org/richfaces/renderkit/html/css/colorPicker.xcss</h:styles>
@@ -107,10 +110,8 @@
colorMode = (String) component.getAttributes().get("colorMode");
showEvent = (String) component.getAttributes().get("showEvent");
- boolean isRgbMode = "rgb".equals(colorMode);
-
if (value == null || value.length() == 0){
- if (isRgbMode) {
+ if (UIColorPicker.COLOR_MODE_RGB.equals(colorMode)) {
value = "rgb(255, 255, 255)";
} else {
value = "#ffffff";
Added: trunk/ui/colorPicker/src/test/java/org/richfaces/convert/AWTColorConverterTest.java
===================================================================
--- trunk/ui/colorPicker/src/test/java/org/richfaces/convert/AWTColorConverterTest.java (rev 0)
+++ trunk/ui/colorPicker/src/test/java/org/richfaces/convert/AWTColorConverterTest.java 2009-04-14 17:59:25 UTC (rev 13583)
@@ -0,0 +1,69 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.convert;
+
+import java.awt.Color;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIColorPicker;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class AWTColorConverterTest extends AbstractAjax4JsfTestCase {
+
+ public AWTColorConverterTest(String name) {
+ super(name);
+ }
+
+ private UIColorPicker colorPicker;
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+
+ colorPicker = (UIColorPicker) application.createComponent(UIColorPicker.COMPONENT_TYPE);
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+ colorPicker = null;
+ }
+
+ public void testConverterRegistration() throws Exception {
+ assertNotNull(facesContext.getApplication().createConverter(AWTColorConverter.CONVERTER_ID));
+ }
+
+ public void testConversion() throws Exception {
+ AWTColorConverter converter = new AWTColorConverter();
+
+ assertNull(converter.getAsObject(facesContext, colorPicker, null));
+ assertNull(converter.getAsObject(facesContext, colorPicker, ""));
+ assertEquals("", converter.getAsString(facesContext, colorPicker, null));
+
+ assertEquals(new Color(0x66, 0x33, 0xcc), converter.getAsObject(facesContext, colorPicker, "#6633cc"));
+ assertEquals("#6633cc", converter.getAsString(facesContext, colorPicker, new Color(0x66, 0x33, 0xcc)));
+ }
+}
Added: trunk/ui/colorPicker/src/test/java/org/richfaces/convert/IntegerColorConverterTest.java
===================================================================
--- trunk/ui/colorPicker/src/test/java/org/richfaces/convert/IntegerColorConverterTest.java (rev 0)
+++ trunk/ui/colorPicker/src/test/java/org/richfaces/convert/IntegerColorConverterTest.java 2009-04-14 17:59:25 UTC (rev 13583)
@@ -0,0 +1,131 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.convert;
+
+import javax.faces.convert.ConverterException;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIColorPicker;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class IntegerColorConverterTest extends AbstractAjax4JsfTestCase {
+
+ public IntegerColorConverterTest(String name) {
+ super(name);
+ }
+
+ private UIColorPicker colorPicker;
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+
+ colorPicker = (UIColorPicker) application.createComponent(UIColorPicker.COMPONENT_TYPE);
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+ colorPicker = null;
+ }
+
+ public void testConverterRegistration() throws Exception {
+ assertNotNull(facesContext.getApplication().createConverter(IntegerColorConverter.CONVERTER_ID));
+ }
+
+ public void testGetAsString() throws Exception {
+ IntegerColorConverter converter = new IntegerColorConverter();
+
+ assertEquals("", converter.getAsString(facesContext, colorPicker, null));
+
+ assertEquals("#ef0023", converter.getAsString(facesContext, colorPicker, 0xef0023));
+ assertEquals("#000000", converter.getAsString(facesContext, colorPicker, 0x0));
+ assertEquals("#012345", converter.getAsString(facesContext, colorPicker, 0x012345));
+ assertEquals("#6633cc", converter.getAsString(facesContext, colorPicker, 0x6633cc));
+ }
+
+ public void testGetAsStringRGB() throws Exception {
+ colorPicker.setColorMode(UIColorPicker.COLOR_MODE_RGB);
+ IntegerColorConverter converter = new IntegerColorConverter();
+
+ assertEquals("", converter.getAsString(facesContext, colorPicker, null));
+
+ assertEquals("rgb(239, 0, 35)", converter.getAsString(facesContext, colorPicker, 0xef0023));
+ assertEquals("rgb(0, 0, 0)", converter.getAsString(facesContext, colorPicker, 0x0));
+ assertEquals("rgb(255, 255, 255)", converter.getAsString(facesContext, colorPicker, 0xffffff));
+ assertEquals("rgb(1, 35, 69)", converter.getAsString(facesContext, colorPicker, 0x012345));
+ assertEquals("rgb(102, 51, 204)", converter.getAsString(facesContext, colorPicker, 0x6633cc));
+ }
+
+ public void testGetAsObject() throws Exception {
+ IntegerColorConverter converter = new IntegerColorConverter();
+
+ assertNull(converter.getAsObject(facesContext, colorPicker, null));
+ assertNull(converter.getAsObject(facesContext, colorPicker, ""));
+
+ assertEquals(0x0, converter.getAsObject(facesContext, colorPicker, "#000000"));
+ assertEquals(0x6633cc, converter.getAsObject(facesContext, colorPicker, "#6633cc"));
+ assertEquals(0x123456, converter.getAsObject(facesContext, colorPicker, "#123456"));
+ assertEquals(0x0fec, converter.getAsObject(facesContext, colorPicker, "#000fec"));
+ }
+
+ public void testGetAsObjectRGB() throws Exception {
+ colorPicker.setColorMode(UIColorPicker.COLOR_MODE_RGB);
+ IntegerColorConverter converter = new IntegerColorConverter();
+
+ assertNull(converter.getAsObject(facesContext, colorPicker, null));
+ assertNull(converter.getAsObject(facesContext, colorPicker, ""));
+
+ assertEquals(0xef0023, converter.getAsObject(facesContext, colorPicker, "rgb(239, 0, 35)"));
+ assertEquals(0x0, converter.getAsObject(facesContext, colorPicker, "rgb(0, 0, 0)"));
+ assertEquals(0xffffff, converter.getAsObject(facesContext, colorPicker, "rgb(255, 255, 255)"));
+ assertEquals(0x012345, converter.getAsObject(facesContext, colorPicker, "rgb(1, 35, 69)"));
+ assertEquals(0x6633cc, converter.getAsObject(facesContext, colorPicker, "rgb(102, 51, 204)"));
+ }
+
+ public void testConversionErrorsHex() throws Exception {
+ IntegerColorConverter converter = new IntegerColorConverter();
+
+ try {
+ converter.getAsObject(facesContext, colorPicker, "#12sq34");
+
+ fail();
+ } catch (ConverterException e) {
+ }
+ }
+
+ public void testConversionErrorsRGB() throws Exception {
+ colorPicker.setColorMode(UIColorPicker.COLOR_MODE_RGB);
+ IntegerColorConverter converter = new IntegerColorConverter();
+
+ try {
+ converter.getAsObject(facesContext, colorPicker, "rgb(1, 2)");
+
+ fail();
+ } catch (ConverterException e) {
+ }
+ }
+}
Added: trunk/ui/colorPicker/src/test/java/org/richfaces/convert/LongColorConverterTest.java
===================================================================
--- trunk/ui/colorPicker/src/test/java/org/richfaces/convert/LongColorConverterTest.java (rev 0)
+++ trunk/ui/colorPicker/src/test/java/org/richfaces/convert/LongColorConverterTest.java 2009-04-14 17:59:25 UTC (rev 13583)
@@ -0,0 +1,67 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.convert;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UIColorPicker;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class LongColorConverterTest extends AbstractAjax4JsfTestCase {
+
+ public LongColorConverterTest(String name) {
+ super(name);
+ }
+
+ private UIColorPicker colorPicker;
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+
+ colorPicker = (UIColorPicker) application.createComponent(UIColorPicker.COMPONENT_TYPE);
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+ colorPicker = null;
+ }
+
+ public void testConverterRegistration() throws Exception {
+ assertNotNull(facesContext.getApplication().createConverter(LongColorConverter.CONVERTER_ID));
+ }
+
+ public void testConversion() throws Exception {
+ LongColorConverter converter = new LongColorConverter();
+
+ assertNull(converter.getAsObject(facesContext, colorPicker, null));
+ assertNull(converter.getAsObject(facesContext, colorPicker, ""));
+ assertEquals("", converter.getAsString(facesContext, colorPicker, null));
+
+ assertEquals(0x6633ccL, converter.getAsObject(facesContext, colorPicker, "#6633cc"));
+ assertEquals("#6633cc", converter.getAsString(facesContext, colorPicker, 0x6633ccL));
+ }
+}
15 years, 2 months
JBoss Rich Faces SVN: r13582 - in trunk/docs: cdkguide and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-04-14 13:32:33 -0400 (Tue, 14 Apr 2009)
New Revision: 13582
Modified:
trunk/docs/cdkguide/pom.xml
trunk/docs/highlight/pom.xml
trunk/docs/migrationguide/pom.xml
trunk/docs/pom.xml
trunk/docs/realworld_app_guide/pom.xml
trunk/docs/userguide/pom.xml
Log:
https://jira.jboss.org/jira/browse/RF-6780 PDF version building problem is fixed.
Modified: trunk/docs/cdkguide/pom.xml
===================================================================
--- trunk/docs/cdkguide/pom.xml 2009-04-14 16:59:36 UTC (rev 13581)
+++ trunk/docs/cdkguide/pom.xml 2009-04-14 17:32:33 UTC (rev 13582)
@@ -115,6 +115,11 @@
<version>${project.version}</version>
<type>jar</type>
</dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>fop</artifactId>
+ <version>0.95</version>
+ </dependency>
</dependencies>
<configuration>
<sourceDirectory>
Modified: trunk/docs/highlight/pom.xml
===================================================================
--- trunk/docs/highlight/pom.xml 2009-04-14 16:59:36 UTC (rev 13581)
+++ trunk/docs/highlight/pom.xml 2009-04-14 17:32:33 UTC (rev 13582)
@@ -123,6 +123,11 @@
<artifactId>jhighlight</artifactId>
<version>1.0</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>fop</artifactId>
+ <version>0.95</version>
+ </dependency>
</dependencies>
<!--build>
<pluginManagement>
Modified: trunk/docs/migrationguide/pom.xml
===================================================================
--- trunk/docs/migrationguide/pom.xml 2009-04-14 16:59:36 UTC (rev 13581)
+++ trunk/docs/migrationguide/pom.xml 2009-04-14 17:32:33 UTC (rev 13582)
@@ -113,6 +113,11 @@
<version>${project.version}</version>
<type>jar</type>
</dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>fop</artifactId>
+ <version>0.95</version>
+ </dependency>
</dependencies>
<configuration>
<sourceDirectory>
Modified: trunk/docs/pom.xml
===================================================================
--- trunk/docs/pom.xml 2009-04-14 16:59:36 UTC (rev 13581)
+++ trunk/docs/pom.xml 2009-04-14 17:32:33 UTC (rev 13582)
@@ -51,6 +51,11 @@
<artifactId>jhighlight</artifactId>
<version>1.0</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>fop</artifactId>
+ <version>0.95</version>
+ </dependency>
</dependencies>
<profiles>
Modified: trunk/docs/realworld_app_guide/pom.xml
===================================================================
--- trunk/docs/realworld_app_guide/pom.xml 2009-04-14 16:59:36 UTC (rev 13581)
+++ trunk/docs/realworld_app_guide/pom.xml 2009-04-14 17:32:33 UTC (rev 13582)
@@ -115,6 +115,11 @@
<version>${project.version}</version>
<type>jar</type>
</dependency>
+ <dependency>
+ <groupId>org.apache.xmlgraphics</groupId>
+ <artifactId>fop</artifactId>
+ <version>0.95</version>
+ </dependency>
</dependencies>
<configuration>
<sourceDirectory>
Modified: trunk/docs/userguide/pom.xml
===================================================================
--- trunk/docs/userguide/pom.xml 2009-04-14 16:59:36 UTC (rev 13581)
+++ trunk/docs/userguide/pom.xml 2009-04-14 17:32:33 UTC (rev 13582)
@@ -667,7 +667,7 @@
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
- <version>0.94</version>
+ <version>0.95</version>
</dependency>
</dependencies>
<configuration>
@@ -866,7 +866,7 @@
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
- <version>0.94</version>
+ <version>0.95</version>
</dependency>
</dependencies>
<configuration>
15 years, 2 months
JBoss Rich Faces SVN: r13581 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-04-14 12:59:36 -0400 (Tue, 14 Apr 2009)
New Revision: 13581
Modified:
trunk/docs/userguide/en/src/main/docbook/included/a4j_page.xml
trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml
trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml
trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml
trunk/docs/userguide/en/src/main/docbook/included/componentControl.xml
trunk/docs/userguide/en/src/main/docbook/included/contextMenu.xml
trunk/docs/userguide/en/src/main/docbook/included/editor.xml
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml
trunk/docs/userguide/en/src/main/docbook/included/hotKey.xml
trunk/docs/userguide/en/src/main/docbook/included/htmlCommandLink.xml
trunk/docs/userguide/en/src/main/docbook/included/insert.xml
trunk/docs/userguide/en/src/main/docbook/included/jsFunction.xml
trunk/docs/userguide/en/src/main/docbook/included/layoutPanel.xml
trunk/docs/userguide/en/src/main/docbook/included/listShuttle.xml
trunk/docs/userguide/en/src/main/docbook/included/loadBundle.xml
trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml
trunk/docs/userguide/en/src/main/docbook/included/page.xml
trunk/docs/userguide/en/src/main/docbook/included/pickList.xml
trunk/docs/userguide/en/src/main/docbook/included/portlet.xml
trunk/docs/userguide/en/src/main/docbook/included/push.xml
trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
Log:
https://jira.jboss.org/jira/browse/RF-6023 Demonstrative pronouns as links. Pronoun "here" is replaced with phrase about demo page in order to show a user where we are redirecting him.
Modified: trunk/docs/userguide/en/src/main/docbook/included/a4j_page.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/a4j_page.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/a4j_page.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -134,7 +134,7 @@
<section>
<title>Relevant resources links</title>
<para>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/page.jsf?c=page">Here</ulink> you can found some additional information for <emphasis role="bold"
+ <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/page.jsf?c=page">On RichFaces LiveDemo page </ulink> you can found some additional information for <emphasis role="bold"
><property><a4j:page></property></emphasis> component usage.
</para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -233,7 +233,7 @@
<title>Relevant Resources Links</title>
<para><ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/ajaxValidator.jsf?c=a..."
- > Here</ulink> you can see an example of <emphasis
+ > On RichFaces LiveDemo page </ulink> you can see an example of <emphasis
role="bold">
<property><rich:ajaxValidator></property>
</emphasis> usage and sources for the given example. </para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -190,7 +190,7 @@
<section>
<title>Relevant Resources Links</title>
<para><ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/beanValidator.jsf?c=b...">
- Here</ulink> you can see an example of <emphasis role="bold"><property><rich:beanValidator></property>
+ On RichFaces LiveDemo page </ulink> you can see an example of <emphasis role="bold"><property><rich:beanValidator></property>
</emphasis> usage and sources for the given example. </para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/comboBox.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -944,7 +944,7 @@
<section>
<title>Relevant Resources Links</title>
<para>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/comboBox.jsf?c=comboBox">Here</ulink> you can see an example of <emphasis role="bold"><property><rich:comboBox></property></emphasis> usage
+ <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/comboBox.jsf?c=comboBox">On RichFaces LiveDemo page </ulink> you can see an example of <emphasis role="bold"><property><rich:comboBox></property></emphasis> usage
and sources for the given example.
</para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/componentControl.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/componentControl.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/componentControl.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -379,11 +379,11 @@
<title>Relevant Resources Links</title>
<para><ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/componentControl.jsf?..."
- >Here</ulink> you can see an example of <emphasis role="bold">
+ >On RichFaces LiveDemo page </ulink> you can see an example of <emphasis role="bold">
<property><rich:componentControl></property>
</emphasis> usage and sources for the given example. </para>
<para>
- <ulink url="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/param.html">Here</ulink> you can found some additional information about <emphasis role="bold"><property><f:param></property></emphasis> component.
+ <ulink url="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/param.html">On RichFaces LiveDemo page </ulink> you can found some additional information about <emphasis role="bold"><property><f:param></property></emphasis> component.
</para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/contextMenu.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/contextMenu.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/contextMenu.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -655,7 +655,7 @@
<title>Relevant Resources Links</title>
<para><ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/contextMenu.jsf?c=con..."
- >Here</ulink> you can see an example of <emphasis role="bold">
+ >On RichFaces LiveDemo page </ulink> you can see an example of <emphasis role="bold">
<property><rich:contextMenu></property>
</emphasis> usage and sources for the given example. </para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/editor.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/editor.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -1322,7 +1322,7 @@
<para><ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/editor.jsf?c=editor"
- >Here</ulink> you can see an example of <emphasis
+ >On RichFaces LiveDemo page </ulink> you can see an example of <emphasis
role="bold">
<property><rich:editor></property>
</emphasis> usage and sources for the given example. </para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -555,7 +555,7 @@
<property><rich:fileUpload></property>
</emphasis> component could work together with Seam framework. <ulink
url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."
- >Here</ulink> you can see how to configure filter for this framework in web.xml file
+ >On RichFaces LiveDemo page </ulink> you can see how to configure filter for this framework in web.xml file
in order to handle <emphasis role="bold">
<property><rich:fileUpload></property>
</emphasis> requests. </para>
@@ -1385,7 +1385,7 @@
<title>Relevant Resources Links</title>
<para><ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/fileUpload.jsf?c=file..."
- >Here</ulink> you can see an example of <emphasis role="bold">
+ >On RichFaces LiveDemo page </ulink> you can see an example of <emphasis role="bold">
<property><rich:fileUpload></property>
</emphasis> usage and sources for the given example. </para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -170,7 +170,7 @@
<section>
<title>Relevant Resources Links</title>
<para><ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/graphValidator.jsf?c=...">
- Here</ulink> you can see an example of <emphasis role="bold"><property><rich:graphValidator></property>
+ On RichFaces LiveDemo page </ulink> you can see an example of <emphasis role="bold"><property><rich:graphValidator></property>
</emphasis> usage and sources for the given example. </para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/hotKey.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/hotKey.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/hotKey.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -220,7 +220,7 @@
<section>
<title>Relevant Resources Links</title>
<para>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/hotKey.jsf?c=hotKey">Here</ulink> you can see an example of
+ <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/hotKey.jsf?c=hotKey">On RichFaces LiveDemo page </ulink> you can see an example of
<emphasis role="bold"><property><rich:hotKey></property></emphasis> usage and sources for the given example.
</para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/htmlCommandLink.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/htmlCommandLink.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/htmlCommandLink.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -84,11 +84,11 @@
<section>
<title>Relevant resources links</title>
<para>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/htmlCommandLink.jsf?c...">Here</ulink> you can found some additional information for <emphasis role="bold"
+ <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/htmlCommandLink.jsf?c...">On RichFaces LiveDemo page </ulink> you can found some additional information for <emphasis role="bold"
><property><a4j:htmlCommandLink></property></emphasis> component usage.
</para>
<para>
- <ulink url="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/param.html">Here</ulink> you can found some additional information about <emphasis role="bold"><property><f:param></property></emphasis> component.
+ <ulink url="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/param.html">On RichFaces LiveDemo page </ulink> you can found some additional information about <emphasis role="bold"><property><f:param></property></emphasis> component.
</para>
</section>
</chapter>
Modified: trunk/docs/userguide/en/src/main/docbook/included/insert.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/insert.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/insert.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -130,7 +130,7 @@
<section>
<title>Relevant Resources Links</title>
<para><ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/insert.jsf?c=insert"
- >Here</ulink> you can found some additional information for <emphasis role="bold"
+ >On RichFaces LiveDemo page </ulink> you can found some additional information for <emphasis role="bold"
><property><rich:insert></property></emphasis> component usage. </para>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/jsFunction.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/jsFunction.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/jsFunction.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -135,7 +135,7 @@
you can see the example of <emphasis role="bold"
><property><a4j:jsFunction></property></emphasis> usage and sources for the given example.</para>
<para>
- <ulink url="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/param.html">Here</ulink> you can found some additional information about <emphasis role="bold"><property><f:param></property></emphasis> component.
+ <ulink url="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/param.html">On RichFaces LiveDemo page </ulink> you can found some additional information about <emphasis role="bold"><property><f:param></property></emphasis> component.
</para>
</section>
</chapter>
Modified: trunk/docs/userguide/en/src/main/docbook/included/layoutPanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/layoutPanel.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/layoutPanel.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -80,7 +80,7 @@
<title>Relevant Resources Links</title>
<para><ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/layoutPanel.jsf?c=lay..."
- >Here</ulink> you can see an example of <emphasis role="bold">
+ >On RichFaces LiveDemo page </ulink> you can see an example of <emphasis role="bold">
<property><layoutPanel></property>
</emphasis> usage and sources for the given example. </para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/listShuttle.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/listShuttle.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/listShuttle.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -1264,7 +1264,7 @@
<section>
<title>Relevant Resources Links</title>
<para><ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/listShuttle.jsf?c=lis..."
- >Here</ulink> you can see an example of <emphasis role="bold">
+ >On RichFaces LiveDemo page </ulink> you can see an example of <emphasis role="bold">
<property><rich:listShuttle></property>
</emphasis> usage and sources for the given example. </para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/loadBundle.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/loadBundle.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/loadBundle.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -90,14 +90,14 @@
<section>
<title>Relevant resources links</title>
<para>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/bundle.jsf?c=loadBundle">Here</ulink> you can found some additional information for <emphasis role="bold"
+ <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/bundle.jsf?c=loadBundle">On RichFaces LiveDemo page </ulink> you can found some additional information for <emphasis role="bold"
><property><a4j:loadBundle></property></emphasis> component usage.
</para>
<para>
- <ulink url="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/loadBund...">Here</ulink> you can found some additional information about <emphasis role="bold"><property><f:loadBundle></property></emphasis> component.
+ <ulink url="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/loadBund...">On RichFaces LiveDemo page </ulink> you can found some additional information about <emphasis role="bold"><property><f:loadBundle></property></emphasis> component.
</para>
<para>
- <ulink url="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/view.html">Here</ulink> you can found some additional information about <emphasis role="bold"><property><f:view></property></emphasis> component.
+ <ulink url="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/view.html">On RichFaces LiveDemo page </ulink> you can found some additional information about <emphasis role="bold"><property><f:view></property></emphasis> component.
</para>
</section>
</chapter>
\ No newline at end of file
Modified: trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/orderingList.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -1230,7 +1230,7 @@
<title>Relevant Resources Links</title>
<para><ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/orderingList.jsf?c=or..."
- >Here</ulink> you can see an example of <emphasis role="bold">
+ >On RichFaces LiveDemo page </ulink> you can see an example of <emphasis role="bold">
<property><rich:orderingList></property>
</emphasis> usage and sources for the given example. </para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/page.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/page.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/page.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -137,7 +137,7 @@
<section>
<title>Relevant resources links</title>
<para>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/page.jsf?c=page">Here</ulink> you can found some additional information for <emphasis role="bold"
+ <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/page.jsf?c=page">On RichFaces LiveDemo page </ulink> you can found some additional information for <emphasis role="bold"
><property><a4j:page></property></emphasis> component usage.
</para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/pickList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/pickList.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/pickList.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -1032,7 +1032,7 @@
<title>Relevant Resources Links</title>
<para><ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/pickList.jsf?c=pickList"
- >Here</ulink> you can see an example of <emphasis role="bold">
+ >On RichFaces LiveDemo page </ulink> you can see an example of <emphasis role="bold">
<property><rich:pickList></property>
</emphasis> usage and sources for the given example. </para>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/portlet.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/portlet.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/portlet.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -67,7 +67,7 @@
<section>
<title>Relevant resources links</title>
<para><ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/portlet.jsf?c=portlet"
- >Here</ulink> you can found some additional information for <emphasis role="bold">
+ >On RichFaces LiveDemo page </ulink> you can found some additional information for <emphasis role="bold">
<property><a4j:portlet></property>
</emphasis> component usage. </para>
<para> The aditional information about component usage you can find here: <ulink
Modified: trunk/docs/userguide/en/src/main/docbook/included/push.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/push.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/push.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -195,7 +195,7 @@
<para>
<ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/push.jsf?c=push"
- >Here</ulink> you can found some additional information for
+ >On RichFaces LiveDemo page </ulink> you can found some additional information for
<emphasis role="bold">
<property><a4j:push></property>
</emphasis> component usage. </para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2009-04-14 16:32:50 UTC (rev 13580)
+++ trunk/docs/userguide/en/src/main/docbook/included/scrollableDataTable.xml 2009-04-14 16:59:36 UTC (rev 13581)
@@ -221,7 +221,7 @@
</figure>
<para><ulink
url="http://wiki.jboss.org/wiki/RichFacesCookbook/ScrollableDataTableSelection..."
- >Here</ulink> you can find fuller example of use of this
+ >On RichFaces LiveDemo page </ulink> you can find fuller example of use of this
attribute with example bean.</para>
<para> The <emphasis role="bold">
<property><rich:scrollableDataTable></property>
15 years, 2 months
JBoss Rich Faces SVN: r13580 - in trunk: samples/listShuttleDemo/src/main/webapp/pages and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-14 12:32:50 -0400 (Tue, 14 Apr 2009)
New Revision: 13580
Modified:
trunk/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java
trunk/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
trunk/samples/pickList-sample/src/main/java/org/richfaces/Bean.java
trunk/samples/pickList-sample/src/main/webapp/pages/index.jsp
trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
trunk/ui/pickList/src/main/config/component/picklist.xml
trunk/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/PickList.js
trunk/ui/pickList/src/main/templates/htmlPickList.jspx
Log:
https://jira.jboss.org/jira/browse/RF-4724
https://jira.jboss.org/jira/browse/RF-6769
Modified: trunk/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java
===================================================================
--- trunk/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java 2009-04-14 16:22:27 UTC (rev 13579)
+++ trunk/samples/listShuttleDemo/src/main/java/org/richfaces/ListShuttleDemoBean.java 2009-04-14 16:32:50 UTC (rev 13580)
@@ -34,15 +34,9 @@
private boolean fastOrderControlsVisible = true;
private boolean switchByClick = false;
+ private boolean switchByDblClick = true;
- public boolean isSwitchByClick() {
- return switchByClick;
- }
-
- public void setSwitchByClick(boolean switchByClick) {
- this.switchByClick = switchByClick;
- }
-
+
public ListShuttleDemoBean() {
super();
@@ -178,4 +172,21 @@
public void setZebraItems(String[] zebraItems) {
this.zebraItems = zebraItems;
}
+
+ public boolean isSwitchByClick() {
+ return switchByClick;
+ }
+
+ public void setSwitchByClick(boolean switchByClick) {
+ this.switchByClick = switchByClick;
+ }
+
+ public boolean isSwitchByDblClick() {
+ return switchByDblClick;
+ }
+
+ public void setSwitchByDblClick(boolean switchByDblClick) {
+ this.switchByDblClick = switchByDblClick;
+ }
+
}
Modified: trunk/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2009-04-14 16:22:27 UTC (rev 13579)
+++ trunk/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2009-04-14 16:32:50 UTC (rev 13580)
@@ -55,7 +55,8 @@
sourceSelection="#{listShuttleDemoBean.sourceSelection}"
targetSelection="#{listShuttleDemoBean.targetSelection}"
switchByClick="#{listShuttleDemoBean.switchByClick}"
-
+ switchByDblClick="#{listShuttleDemoBean.switchByDblClick}"
+
bottomControlLabel="test bottomControlLabel"
bottomTitle="test bottomTitle"
@@ -93,7 +94,7 @@
</script>
</f:verbatim>
- <h:panelGrid columns="2">
+ <h:panelGrid columns="4">
<h:outputText value="Order controls visible:" />
<h:selectBooleanCheckbox value="#{listShuttleDemoBean.orderControlsVisible}" />
@@ -108,6 +109,9 @@
<h:outputText value="Switch by click:" />
<h:selectBooleanCheckbox value="#{listShuttleDemoBean.switchByClick}" />
+
+ <h:outputText value="Switch by double click:" />
+ <h:selectBooleanCheckbox value="#{listShuttleDemoBean.switchByDblClick}" />
</h:panelGrid>
@@ -120,7 +124,8 @@
<ls:listShuttle onlistchanged="alert(event.type)" id="listShuttle2" var="item" sourceValue="#{listShuttleDemoBean.zebraItems}"
- columnClasses="zebraCell1, zebraCell2" rowClasses="zebraRow1, zebraRow2" downControlClass="downControlClass">
+ columnClasses="zebraCell1, zebraCell2" rowClasses="zebraRow1, zebraRow2" downControlClass="downControlClass"
+ switchByClick="#{listShuttleDemoBean.switchByClick}" switchByDblClick="#{listShuttleDemoBean.switchByDblClick}" >
<rich:column width="10px">
<f:facet name="header">
<h:outputText value="Name" />
Modified: trunk/samples/pickList-sample/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/samples/pickList-sample/src/main/java/org/richfaces/Bean.java 2009-04-14 16:22:27 UTC (rev 13579)
+++ trunk/samples/pickList-sample/src/main/java/org/richfaces/Bean.java 2009-04-14 16:32:50 UTC (rev 13580)
@@ -28,8 +28,10 @@
private boolean copyVisible = true;
private boolean removeVisible = true;
private boolean removeAllVisible = true;
-
-
+ private boolean switchByClick = false;
+ private boolean switchByDblClick = true;
+
+
private List <Animal> listValues = new ArrayList<Animal>();
// private List <String> listValues = new ArrayList<String>();
@@ -259,9 +261,23 @@
this.removeAllVisible = removeAllVisible;
}
-
-
+ public boolean isSwitchByClick() {
+ return switchByClick;
+ }
+ public void setSwitchByClick(boolean switchByClick) {
+ this.switchByClick = switchByClick;
+ }
+
+ public boolean isSwitchByDblClick() {
+ return switchByDblClick;
+ }
+
+ public void setSwitchByDblClick(boolean switchByDblClick) {
+ this.switchByDblClick = switchByDblClick;
+ }
+
+
// public List<String> getListValues() {
// return listValues;
// }
Modified: trunk/samples/pickList-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/pickList-sample/src/main/webapp/pages/index.jsp 2009-04-14 16:22:27 UTC (rev 13579)
+++ trunk/samples/pickList-sample/src/main/webapp/pages/index.jsp 2009-04-14 16:32:50 UTC (rev 13580)
@@ -50,8 +50,8 @@
<h:outputText value="remove control visible"></h:outputText>
<h:selectBooleanCheckbox value="#{pickBean.removeVisible}"></h:selectBooleanCheckbox>
- <h:outputText value=""></h:outputText>
- <h:outputText value=""></h:outputText>
+ <h:outputText value="switch By Click"></h:outputText>
+ <h:selectBooleanCheckbox value="#{pickBean.switchByClick}"></h:selectBooleanCheckbox>
<h:outputText value="set disabled"></h:outputText>
<h:selectBooleanCheckbox value="#{pickBean.disabled}"></h:selectBooleanCheckbox>
@@ -62,8 +62,8 @@
<h:outputText value="removeAll control visible"></h:outputText>
<h:selectBooleanCheckbox value="#{pickBean.removeAllVisible}"></h:selectBooleanCheckbox>
- <h:outputText value=""></h:outputText>
- <h:outputText value=""></h:outputText>
+ <h:outputText value="switch By DblClick"></h:outputText>
+ <h:selectBooleanCheckbox value="#{pickBean.switchByDblClick}"></h:selectBooleanCheckbox>
</h:panelGrid>
@@ -92,6 +92,8 @@
copyVisible="#{pickBean.copyVisible}"
removeVisible="#{pickBean.removeVisible}"
removeAllVisible="#{pickBean.removeAllVisible}"
+ switchByClick="#{pickBean.switchByClick}"
+ switchByDblClick="#{pickBean.switchByDblClick}"
disabled="#{pickBean.disabled}"
>
<f:selectItems value="#{pickBean.testList}"/>
Modified: trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-04-14 16:22:27 UTC (rev 13579)
+++ trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-04-14 16:32:50 UTC (rev 13580)
@@ -144,10 +144,16 @@
<property>
<name>switchByClick</name>
<classname>boolean</classname>
- <description>If "true", dragging between lists realized by click. Default value is "false". </description>
+ <description>If "true", items can be moved between the lists by clicking on them. Default value is "false". </description>
<defaultvalue>false</defaultvalue>
</property>
<property>
+ <name>switchByDblClick</name>
+ <classname>boolean</classname>
+ <description>If "true", items can be moved between the lists by double-clicking on them. Default value is "true". </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+ <property>
<name>sourceListWidth</name>
<classname>java.lang.String</classname>
<description>
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 2009-04-14 16:22:27 UTC (rev 13579)
+++ trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2009-04-14 16:32:50 UTC (rev 13580)
@@ -42,7 +42,7 @@
}
Richfaces.ListShuttle.prototype = {
- initialize: function(targetList, sourceList, clientId, controlIds, switchByClick, events) {
+ initialize: function(targetList, sourceList, clientId, controlIds, switchByClick, switchByDblClick, events) {
this.containerId = clientId;
this["rich:destructor"] = "destroy";
@@ -75,9 +75,10 @@
Event.stopObserving(this.sourceList.shuttleTable, "click", this.sourceList.clckHandler);
Event.stopObserving(this.targetList.shuttleTable, "click", this.targetList.clckHandler);
} else {
- this.targetList.shuttleTable.observe("dblclick", function(e) {this.moveItemByClick(window.event||e, this.targetList, this.sourceList)}.bindAsEventListener(this));
- this.sourceList.shuttleTable.observe("dblclick", function(e) {this.moveItemByClick(window.event||e, this.sourceList, this.targetList)}.bindAsEventListener(this));
-
+ if (switchByDblClick == "true"){
+ this.targetList.shuttleTable.observe("dblclick", function(e) {this.moveItemByClick(window.event||e, this.targetList, this.sourceList)}.bindAsEventListener(this));
+ this.sourceList.shuttleTable.observe("dblclick", function(e) {this.moveItemByClick(window.event||e, this.sourceList, this.targetList)}.bindAsEventListener(this));
+ }
sourceList._onclickHandler = sourceList.onclickHandler;
sourceList.onclickHandler = function(e) { this.onclickHandler(e, sourceList); }.bindAsEventListener(this);
targetList._onclickHandler = targetList.onclickHandler;
Modified: trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2009-04-14 16:22:27 UTC (rev 13579)
+++ trunk/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2009-04-14 16:32:50 UTC (rev 13580)
@@ -50,6 +50,9 @@
Boolean switchByClick = (Boolean) component.getAttributes().get("switchByClick");
variables.setVariable("switchByClick", switchByClick);
+ Boolean switchByDblClick = (Boolean) component.getAttributes().get("switchByDblClick");
+ variables.setVariable("switchByDblClick", switchByDblClick);
+
variables.setVariable("baseClientId", component.getBaseClientId(context));
]]>
</jsp:scriptlet>
@@ -215,6 +218,7 @@
"#{clientId}",
[['copy', 'discopy'], ['copyAll', 'discopyAll'], ['remove', 'disremove'], ['removeAll','disremoveAll']],
"#{switchByClick}",
+ "#{switchByDblClick}",
{onlistchanged:#{this:getAsEventHandler(context, component, "onlistchanged")},
onlistchange:#{this:getAsEventHandler(context, component, "onlistchange")},
oncopyallclick:#{this:getAsEventHandler(context, component, "oncopyallclick")},
Modified: trunk/ui/pickList/src/main/config/component/picklist.xml
===================================================================
--- trunk/ui/pickList/src/main/config/component/picklist.xml 2009-04-14 16:22:27 UTC (rev 13579)
+++ trunk/ui/pickList/src/main/config/component/picklist.xml 2009-04-14 16:32:50 UTC (rev 13580)
@@ -131,15 +131,21 @@
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
-
- <property>
+ <property>
<name>switchByClick</name>
<classname>boolean</classname>
- <description>If "true", dragging between lists realized by click. Default value is "false"</description>
+ <description>If "true", items can be moved between the lists by clicking on them. Default value is "false". </description>
<defaultvalue>false</defaultvalue>
</property>
<property>
+ <name>switchByDblClick</name>
+ <classname>boolean</classname>
+ <description>If "true", items can be moved between the lists by double-clicking on them. Default value is "true". </description>
+ <defaultvalue>true</defaultvalue>
+ </property>
+
+ <property>
<name>sourceListWidth</name>
<classname>java.lang.String</classname>
<description>
Modified: trunk/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/PickList.js
===================================================================
--- trunk/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/PickList.js 2009-04-14 16:22:27 UTC (rev 13579)
+++ trunk/ui/pickList/src/main/resources/org/richfaces/renderkit/html/scripts/PickList.js 2009-04-14 16:32:50 UTC (rev 13580)
@@ -1,8 +1,8 @@
if(!window.Richfaces) window.Richfaces = {};
Richfaces.PickList = Class.create(Richfaces.ListShuttle, {
- initialize : function($super, targetList, sourceList, clientId, controlIds, switchByClick, events, valueKeeperId) {
- $super(targetList, sourceList, clientId, controlIds, switchByClick, events);
+ initialize : function($super, targetList, sourceList, clientId, controlIds, switchByClick, switchByDblClick, events, valueKeeperId) {
+ $super(targetList, sourceList, clientId, controlIds, switchByClick, switchByDblClick, events);
this.valueKeeper = $(valueKeeperId);
//this.controlListManager();
},
Modified: trunk/ui/pickList/src/main/templates/htmlPickList.jspx
===================================================================
--- trunk/ui/pickList/src/main/templates/htmlPickList.jspx 2009-04-14 16:22:27 UTC (rev 13579)
+++ trunk/ui/pickList/src/main/templates/htmlPickList.jspx 2009-04-14 16:32:50 UTC (rev 13580)
@@ -72,6 +72,9 @@
Boolean switchByClick = (Boolean) component.getAttributes().get("switchByClick");
variables.setVariable("switchByClick", switchByClick);
+
+ Boolean switchByDblClick = (Boolean) component.getAttributes().get("switchByDblClick");
+ variables.setVariable("switchByDblClick", switchByDblClick);
variables.setVariable("baseClientId", component.getBaseClientId(context));
]]>
@@ -196,11 +199,15 @@
new Richfaces.PickList(
new Richfaces.PickList.Target('#{clientId}', '#{clientId}tlInternal_tab', '#{clientId}tlInternal_header_tab', '#{clientId}tlFocusKeeper', undefined, Richfaces.PickList.Target.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
new Richfaces.PickList.Source('#{clientId}', '#{clientId}internal_tab', '#{clientId}internal_header_tab', '#{clientId}focusKeeper', undefined, Richfaces.PickList.Source.SelectItem, #{this:getColumnClassesAsJSArray(context, component)}, #{this:getRowClassesAsJSArray(context, component)}),
- "#{clientId}", [['copy', 'discopy'], ['copyAll', 'discopyAll'], ['remove', 'disremove'], ['removeAll','disremoveAll']],
- "#{switchByClick}", {onlistchanged: #{this:getAsEventHandler(context, component, "onlistchanged")},
- onlistchange: #{this:getAsEventHandler(context, component, "onlistchange")},
- onfocus:#{this:getAsEventHandler(context, component, "onfocus")},
- onblur:#{this:getAsEventHandler(context, component, "onblur")}},
+ "#{clientId}",
+ [['copy', 'discopy'], ['copyAll', 'discopyAll'], ['remove', 'disremove'], ['removeAll','disremoveAll']],
+ "#{switchByClick}",
+ "#{switchByDblClick}",
+ {onlistchanged: #{this:getAsEventHandler(context, component, "onlistchanged")},
+ onlistchange: #{this:getAsEventHandler(context, component, "onlistchange")},
+ onfocus:#{this:getAsEventHandler(context, component, "onfocus")},
+ onblur:#{this:getAsEventHandler(context, component, "onblur")}
+ },
"#{clientId}valueKeeper");
</script>
</c:if>
15 years, 2 months
JBoss Rich Faces SVN: r13579 - trunk/ui/datascroller/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-04-14 12:22:27 -0400 (Tue, 14 Apr 2009)
New Revision: 13579
Modified:
trunk/ui/datascroller/src/main/config/component/datascroller.xml
Log:
https://jira.jboss.org/jira/browse/RF-6695 RF docs pom files contain duplicated information, duplicated partens are removed.
Modified: trunk/ui/datascroller/src/main/config/component/datascroller.xml
===================================================================
--- trunk/ui/datascroller/src/main/config/component/datascroller.xml 2009-04-14 16:00:40 UTC (rev 13578)
+++ trunk/ui/datascroller/src/main/config/component/datascroller.xml 2009-04-14 16:22:27 UTC (rev 13579)
@@ -324,6 +324,7 @@
<property>
<name>lastPageMode</name>
<classname>java.lang.String</classname>
+ <description>The attribute to control whether last page of datascroller shows "rows" number of items or just the rest. Possible values are "full" and "short". Default value is "short".</description>
</property>
<property hidden="true" existintag="false" exist="false" >
15 years, 2 months
JBoss Rich Faces SVN: r13578 - trunk/test-applications/realworld2/web/src/main/webapp/includes/image.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-04-14 12:00:40 -0400 (Tue, 14 Apr 2009)
New Revision: 13578
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageEditInfo.xhtml
Log:
Fix RF-6786
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageEditInfo.xhtml
===================================================================
(Binary files differ)
15 years, 2 months