JBoss Rich Faces SVN: r11030 - in trunk/sandbox/ui/editor/src/main/java/org/richfaces: component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-11-05 10:25:10 -0500 (Wed, 05 Nov 2008)
New Revision: 11030
Added:
trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/
trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/SeamTextConverter.java
Removed:
trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/SeamTextConverter.java
Modified:
trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
Log:
Move SeamTextConverter to convert package
Deleted: trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/SeamTextConverter.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/SeamTextConverter.java 2008-11-05 15:18:00 UTC (rev 11029)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/SeamTextConverter.java 2008-11-05 15:25:10 UTC (rev 11030)
@@ -1,128 +0,0 @@
-/**
- * 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
- */
-
-/*
- * SeamTextConverter.java Date created: 26.09.2008
- * Last modified by: $Author$
- * $Revision$ $Date$
- */
-
-package org.richfaces.component;
-
-import java.io.Reader;
-import java.io.StringReader;
-import java.lang.reflect.Constructor;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jboss.seam.text.SeamTextLexer;
-import org.jboss.seam.text.SeamTextParser;
-import org.richfaces.antlr.HtmlSeamTextLexer;
-import org.richfaces.antlr.HtmlSeamTextParser;
-
-import antlr.ANTLRException;
-import antlr.RecognitionException;
-import antlr.TokenStream;
-
-/**
- * TODO Class description goes here.
- *
- * @author Alexandr Levkovsky
- *
- */
-public class SeamTextConverter implements Converter {
-
- private static final Log _log = LogFactory.getLog(SeamTextConverter.class);
-
- /**
- * <p>
- * The standard converter id for this converter.
- * </p>
- */
- public static final String CONVERTER_ID = SeamTextConverter.class.getName();
-
- /**
- * @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext,
- * javax.faces.component.UIComponent, java.lang.String)
- */
- @SuppressWarnings("unchecked")
- public Object getAsObject(FacesContext context, UIComponent component,
- String value) {
- try {
- Reader r = new StringReader(value);
- HtmlSeamTextLexer lexer = new HtmlSeamTextLexer(r);
- HtmlSeamTextParser parser = new HtmlSeamTextParser(lexer);
- parser.startRule();
- return parser.toString();
- } catch (RecognitionException rex) {
- // Log a nice message for any lexer/parser errors, users can disable
- // this if they want to
- _log.warn("Seam Text parse error: " + rex.getMessage());
- } catch (ANTLRException ex) {
- // All other errors are fatal;
- throw new RuntimeException(ex);
- }
- return null;
- }
-
- /**
- * @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext,
- * javax.faces.component.UIComponent, java.lang.Object)
- */
- @SuppressWarnings("unchecked")
- public String getAsString(FacesContext context, UIComponent component,
- Object value) {
- if (value == null) {
- return "";
- }
-
- SeamTextParser parser = null;
-
- try {
-
- Reader r = new StringReader(value.toString());
- Class seamTextLexerClass = Class.forName("org.jboss.seam.text.SeamTextLexer");
- Class seamTextParserClass = Class.forName("org.jboss.seam.text.SeamTextParser");
- Constructor seamTextLexerConstructor = seamTextLexerClass.getConstructor(Reader.class);
- SeamTextLexer lexer = (SeamTextLexer) seamTextLexerConstructor.newInstance(new Object[] { r });
- Constructor seamTextParserConstructor = seamTextParserClass.getConstructor(TokenStream.class);
- parser = (SeamTextParser) seamTextParserConstructor.newInstance(new Object[] { lexer });
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- try {
- parser.startRule();
- } catch (RecognitionException rex) {
- // Log a nice message for any lexer/parser errors, users can disable
- // this if they want to
- _log.warn("Seam Text parse error: " + rex.getMessage());
- } catch (ANTLRException ex) {
- // All other errors are fatal;
- throw new RuntimeException(ex);
- }
- return parser.toString();
- }
-
-}
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-11-05 15:18:00 UTC (rev 11029)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-11-05 15:25:10 UTC (rev 11030)
@@ -30,6 +30,8 @@
import javax.faces.component.UIInput;
import javax.faces.convert.Converter;
+import org.richfaces.convert.SeamTextConverter;
+
/**
* JSF component class
* @author Alexandr Levkovsky
Copied: trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/SeamTextConverter.java (from rev 11028, trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/SeamTextConverter.java)
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/SeamTextConverter.java (rev 0)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/convert/SeamTextConverter.java 2008-11-05 15:25:10 UTC (rev 11030)
@@ -0,0 +1,128 @@
+/**
+ * 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
+ */
+
+/*
+ * SeamTextConverter.java Date created: 26.09.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.richfaces.convert;
+
+import java.io.Reader;
+import java.io.StringReader;
+import java.lang.reflect.Constructor;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.seam.text.SeamTextLexer;
+import org.jboss.seam.text.SeamTextParser;
+import org.richfaces.antlr.HtmlSeamTextLexer;
+import org.richfaces.antlr.HtmlSeamTextParser;
+
+import antlr.ANTLRException;
+import antlr.RecognitionException;
+import antlr.TokenStream;
+
+/**
+ * Seam Text Converter
+ *
+ * @author Alexandr Levkovsky
+ *
+ */
+public class SeamTextConverter implements Converter {
+
+ private static final Log _log = LogFactory.getLog(SeamTextConverter.class);
+
+ /**
+ * <p>
+ * The standard converter id for this converter.
+ * </p>
+ */
+ public static final String CONVERTER_ID = SeamTextConverter.class.getName();
+
+ /**
+ * @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext,
+ * javax.faces.component.UIComponent, java.lang.String)
+ */
+ @SuppressWarnings("unchecked")
+ public Object getAsObject(FacesContext context, UIComponent component,
+ String value) {
+ try {
+ Reader r = new StringReader(value);
+ HtmlSeamTextLexer lexer = new HtmlSeamTextLexer(r);
+ HtmlSeamTextParser parser = new HtmlSeamTextParser(lexer);
+ parser.startRule();
+ return parser.toString();
+ } catch (RecognitionException rex) {
+ // Log a nice message for any lexer/parser errors, users can disable
+ // this if they want to
+ _log.warn("Seam Text parse error: " + rex.getMessage());
+ } catch (ANTLRException ex) {
+ // All other errors are fatal;
+ throw new RuntimeException(ex);
+ }
+ return null;
+ }
+
+ /**
+ * @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext,
+ * javax.faces.component.UIComponent, java.lang.Object)
+ */
+ @SuppressWarnings("unchecked")
+ public String getAsString(FacesContext context, UIComponent component,
+ Object value) {
+ if (value == null) {
+ return "";
+ }
+
+ SeamTextParser parser = null;
+
+ try {
+
+ Reader r = new StringReader(value.toString());
+ Class seamTextLexerClass = Class.forName("org.jboss.seam.text.SeamTextLexer");
+ Class seamTextParserClass = Class.forName("org.jboss.seam.text.SeamTextParser");
+ Constructor seamTextLexerConstructor = seamTextLexerClass.getConstructor(Reader.class);
+ SeamTextLexer lexer = (SeamTextLexer) seamTextLexerConstructor.newInstance(new Object[] { r });
+ Constructor seamTextParserConstructor = seamTextParserClass.getConstructor(TokenStream.class);
+ parser = (SeamTextParser) seamTextParserConstructor.newInstance(new Object[] { lexer });
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ try {
+ parser.startRule();
+ } catch (RecognitionException rex) {
+ // Log a nice message for any lexer/parser errors, users can disable
+ // this if they want to
+ _log.warn("Seam Text parse error: " + rex.getMessage());
+ } catch (ANTLRException ex) {
+ // All other errors are fatal;
+ throw new RuntimeException(ex);
+ }
+ return parser.toString();
+ }
+
+}
16 years, 4 months
JBoss Rich Faces SVN: r11029 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-11-05 10:18:00 -0500 (Wed, 05 Nov 2008)
New Revision: 11029
Removed:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenuDescription.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenu.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenuAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ContextMenuTest.java
Log:
Context menu test
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenu.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenuAutoTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenuAutoTest.xhtml 2008-11-05 11:02:27 UTC (rev 11028)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenuAutoTest.xhtml 2008-11-05 15:18:00 UTC (rev 11029)
@@ -11,15 +11,18 @@
<rich:contextMenu id="componentId"
immediate="#{autoTestBean.immediate}"
ajaxSingle="#{autoTestBean.ajaxSingle}"
- reRender="#{autoTestBean.reRender}"
+
limitToList="#{autoTestBean.limitToList}"
bypassUpdates="#{autoTestBean.bypassUpdate}"
rendered="#{autoTestBean.rendered}"
- oncomplete="#{autoTestBean.oncomplete}"
- submitMode="#{contextMenuBean.submitMode}"
+ submitMode="ajax"
>
- <rich:menuItem id="item1" actionListener="#{autoTestBean.actionListener}" value="Item1" />
+ <rich:menuItem id="item1"
+ actionListener="#{autoTestBean.actionListener}"
+ value="Item1"
+ oncomplete="#{autoTestBean.oncomplete}" />
<f:param name="parameter1" value="value1" />
+ <f:param name="parameter2" value="value2" />
</rich:contextMenu>
<a href="#" id="showMenu" onclick="$(getParentId() + 'autoTestForm:componentId').component.show(event)">Show</a>
<a href="#" onclick="$(getParentId() + 'autoTestForm:componentId').component.hide()">Hide</a>
Deleted: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/contextMenu/contextMenuDescription.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-11-05 11:02:27 UTC (rev 11028)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-11-05 15:18:00 UTC (rev 11029)
@@ -83,7 +83,7 @@
"ReRender attribute does not work");
String oncomplete = base.runScript("window._ajaxOncomplete");
- Assert.assertEquals("true", oncomplete, "Oncomplete attribute does not work.");
+ Assert.assertEquals(oncomplete,"true", "Oncomplete attribute does not work.");
}
public void testActionListener() {
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-11-05 11:02:27 UTC (rev 11028)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2008-11-05 15:18:00 UTC (rev 11029)
@@ -494,7 +494,7 @@
*/
public void AssertTextNotEquals(String id, String value) {
String _v = getTextById(id);
- Assert.assertNotSame(_v, value);
+ Assert.assertFalse(value.equals(_v));
}
/**
@@ -508,7 +508,7 @@
*/
public void AssertTextNotEquals(String id, String value, String message) {
String _v = getTextById(id);
- Assert.assertNotSame(_v, value, message);
+ Assert.assertFalse(value.equals(_v), message);
}
/**
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ContextMenuTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ContextMenuTest.java 2008-11-05 11:02:27 UTC (rev 11028)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ContextMenuTest.java 2008-11-05 15:18:00 UTC (rev 11029)
@@ -21,7 +21,11 @@
package org.richfaces.testng;
+import java.util.HashMap;
+import java.util.Map;
+
import org.ajax4jsf.template.Template;
+import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -33,7 +37,6 @@
static final String UNATTACHED_CONTEXTMENU = "contextMenu";
static final String RESET_METHOD = "#{contextMenuBean.reset}";
-
String linkShowId;
String linkHideId;
String componentControlShowLinkId;
@@ -59,7 +62,28 @@
return "pages/contextMenu/contextMenuAutoTest.xhtml";
}
+ @Override
+ public void sendAjax() {
+ String showId = "showMenu";
+ String contextMenuId = getAutoTester(this).
+ getClientId(AutoTester.COMPONENT_ID, getTemplate());
+ String itemId = getAutoTester(this).
+ getClientId("item1", getTemplate());
+ clickById(showId);
+ waitForMenuShow(contextMenuId);
+ clickAjaxCommandAndWait(itemId);
+
+ }
+
+
+ @Test
+ public void testRendered(Template template) {
+ AutoTester autoTester = getAutoTester(this);
+ autoTester.renderPage(template, RESET_METHOD);
+ autoTester.testRendered();
+ }
+
@Test
public void testActionListener(Template template) {
renderPage(template, RESET_METHOD);
@@ -112,7 +136,7 @@
AssertPresent(contextMenuBody, "Context menu has not been shown");
}
- @Test
+ @Test
public void testSubmitMode(Template template) {
renderPage(template, RESET_METHOD);
initIds(getParentId(), UNATTACHED_CONTEXTMENU);
@@ -143,7 +167,7 @@
}
- @Test
+ @Test
public void testContextMenuRendering(Template template) {
renderPage(template, RESET_METHOD);
16 years, 4 months
JBoss Rich Faces SVN: r11028 - in trunk/ui/combobox/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2008-11-05 06:02:27 -0500 (Wed, 05 Nov 2008)
New Revision: 11028
Modified:
trunk/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java
trunk/ui/combobox/src/main/templates/combobox.jspx
Log:
https://jira.jboss.org/jira/browse/RF-4552
Modified: trunk/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java
===================================================================
--- trunk/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java 2008-11-05 11:00:25 UTC (rev 11027)
+++ trunk/ui/combobox/src/main/java/org/richfaces/renderkit/ComboBoxBaseRenderer.java 2008-11-05 11:02:27 UTC (rev 11028)
@@ -88,47 +88,38 @@
}
public List<Object> encodeItems(FacesContext context, UIComponent component) throws IOException, IllegalArgumentException {
- if (!isAcceptableComponent(component)) {
- return null;
- }
-
- UIComboBox comboBox = (UIComboBox) component;
- Object suggestionValues = comboBox.getSuggestionValues();
- ResponseWriter writer = context.getResponseWriter();
- List <Object>values = encodeSuggestionValues(context, component, writer, suggestionValues);
- List<SelectItem> selectItems = SelectUtils.getSelectItems(context, component);
- for (SelectItem selectItem : selectItems) {
- String value = getConvertedStringValue(context, comboBox, selectItem.getValue());
- values.add(value);
- encodeSuggestion(writer, comboBox, value, RICH_COMBOBOX_ITEM_CLASSES);
-
- }
- return values;
+ List <Object>values = new ArrayList<Object>();
+ if (isAcceptableComponent(component)) {
+ UIComboBox comboBox = (UIComboBox) component;
+ values.addAll(encodeSuggestionValues(context, comboBox));
+ List<SelectItem> selectItems = SelectUtils.getSelectItems(context, component);
+ for (SelectItem selectItem : selectItems) {
+ values.add(encodeSuggestion(context, comboBox, selectItem.getValue(), RICH_COMBOBOX_ITEM_CLASSES));
+ }
+ }
+ return values;
}
- public List<Object> encodeSuggestionValues(FacesContext context, UIComponent component, ResponseWriter writer,
- Object suggestionValues) throws IOException, IllegalArgumentException {
- ArrayList<Object> values = new ArrayList<Object>();
- if (suggestionValues != null) {
- if (suggestionValues instanceof Collection) {
- Collection<Object> collection = (Collection) suggestionValues;
- for (Object suggestionValue : collection) {
- String value = getConvertedStringValue(context, component, suggestionValue);
- values.add(value);
- encodeSuggestion(writer, component, value, RICH_COMBOBOX_ITEM_CLASSES);
+ public List<Object> encodeSuggestionValues(FacesContext context, UIComboBox combobox) throws IOException, IllegalArgumentException {
+
+ List<Object> values = new ArrayList<Object>();
+ Object suggestionValues = combobox.getSuggestionValues();
+ if (suggestionValues != null) {
+ if (suggestionValues instanceof Collection) {
+ Collection collection = (Collection) suggestionValues;
+ for (Object suggestionValue : collection) {
+ values.add(encodeSuggestion(context, combobox, suggestionValue, RICH_COMBOBOX_ITEM_CLASSES));
+ }
+ } else if (suggestionValues.getClass().isArray()) {
+ Object[] suggestions = (Object[]) suggestionValues;
+ for (Object suggestionValue: suggestions) {
+ values.add(encodeSuggestion(context, combobox, suggestionValue, RICH_COMBOBOX_ITEM_CLASSES));
+ }
+ } else {
+ throw new IllegalArgumentException("suggestionValues should be Collection or Array");
+ }
}
- } else if (suggestionValues.getClass().isArray()) {
- Object[] suggestions = (Object[]) suggestionValues;
- for (int i = 0; i < suggestions.length; i++) {
- String value = getConvertedStringValue(context, component, suggestions[i]);
- values.add(value);
- encodeSuggestion(writer, component, value, RICH_COMBOBOX_ITEM_CLASSES);
- }
- } else {
- throw new IllegalArgumentException("suggestionValues should be Collection or Array");
- }
- }
- return values;
+ return values;
}
@Override
@@ -140,12 +131,18 @@
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.writeText(value, null);
- writer.endElement(HTML.SPAN_ELEM);
- }
+ public String encodeSuggestion(FacesContext context, UIComponent component, Object value, String classes) throws IOException {
+ ResponseWriter writer = context.getResponseWriter();
+ String encodedValue = null;
+ if(writer != null) {
+ encodedValue = getConvertedStringValue(context, component, value);
+ writer.startElement(HTML.SPAN_ELEM, component);
+ writer.writeAttribute(HTML.class_ATTRIBUTE, classes, null);
+ writer.writeText(value, null);
+ writer.endElement(HTML.SPAN_ELEM);
+ }
+ return encodedValue;
+ }
protected boolean isAcceptableComponent(UIComponent component) {
return component != null && this.getComponentClass().isAssignableFrom(component.getClass());
Modified: trunk/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/ui/combobox/src/main/templates/combobox.jspx 2008-11-05 11:00:25 UTC (rev 11027)
+++ trunk/ui/combobox/src/main/templates/combobox.jspx 2008-11-05 11:02:27 UTC (rev 11028)
@@ -262,12 +262,7 @@
</div>
<jsp:scriptlet>
<![CDATA[
-
- String hiddenValue = null;
- if (items.contains(value)) {
- variables.setVariable("hiddenValue", value);
- }
-
+ variables.setVariable("hiddenValue", value);
]]>
</jsp:scriptlet>
<input id="#{clientId}comboboxValue" name="#{clientId}" type="hidden" value="#{hiddenValue}"/>
16 years, 4 months
JBoss Rich Faces SVN: r11027 - trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2008-11-05 06:00:25 -0500 (Wed, 05 Nov 2008)
New Revision: 11027
Modified:
trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
Log:
combobox api changes fix
Modified: trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
===================================================================
--- trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2008-11-05 00:06:58 UTC (rev 11026)
+++ trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2008-11-05 11:00:25 UTC (rev 11027)
@@ -94,13 +94,12 @@
List<String> labels = new ArrayList<String>();
UIInplaceSelect inplaceSelect = (UIInplaceSelect) component;
- ResponseWriter writer = context.getResponseWriter();
List<SelectItem> selectItems = SelectUtils.getSelectItems(context, inplaceSelect);
for (SelectItem selectItem : selectItems) {
String value = getConvertedStringValue(context, inplaceSelect, selectItem.getValue());
String label = selectItem.getLabel();
labels.add(label);
- encodeSuggestion(writer, inplaceSelect, label, RICH_INPLACE_SELECT_CLASSES);
+ encodeSuggestion(context, inplaceSelect, label, RICH_INPLACE_SELECT_CLASSES);
Object[] child = new Object[2];
child[0] = label;
child[1] = value;
16 years, 4 months
JBoss Rich Faces SVN: r11026 - in branches/jsf2.0: examples/repeater and 19 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-11-04 19:06:58 -0500 (Tue, 04 Nov 2008)
New Revision: 11026
Added:
branches/jsf2.0/examples/repeater/
branches/jsf2.0/examples/repeater/pom.xml
branches/jsf2.0/examples/repeater/src/
branches/jsf2.0/examples/repeater/src/main/
branches/jsf2.0/examples/repeater/src/main/java/
branches/jsf2.0/examples/repeater/src/main/java/org/
branches/jsf2.0/examples/repeater/src/main/java/org/richfaces/
branches/jsf2.0/examples/repeater/src/main/java/org/richfaces/examples/
branches/jsf2.0/examples/repeater/src/main/java/org/richfaces/examples/Bean.java
branches/jsf2.0/examples/repeater/src/main/resources/
branches/jsf2.0/examples/repeater/src/main/webapp/
branches/jsf2.0/examples/repeater/src/main/webapp/META-INF/
branches/jsf2.0/examples/repeater/src/main/webapp/META-INF/MANIFEST.MF
branches/jsf2.0/examples/repeater/src/main/webapp/WEB-INF/
branches/jsf2.0/examples/repeater/src/main/webapp/WEB-INF/faces-config.xml
branches/jsf2.0/examples/repeater/src/main/webapp/WEB-INF/lib/
branches/jsf2.0/examples/repeater/src/main/webapp/WEB-INF/web.xml
branches/jsf2.0/examples/repeater/src/main/webapp/index.jsp
branches/jsf2.0/examples/repeater/src/main/webapp/pages/
branches/jsf2.0/examples/repeater/src/main/webapp/pages/index.jsp
branches/jsf2.0/examples/repeater/src/main/webapp/pages/index.xhtml
branches/jsf2.0/examples/repeater/src/test/
branches/jsf2.0/examples/repeater/src/test/java/
branches/jsf2.0/examples/repeater/src/test/java/org/
branches/jsf2.0/examples/repeater/src/test/java/org/richfaces/
branches/jsf2.0/examples/repeater/src/test/java/org/richfaces/examples/
branches/jsf2.0/examples/repeater/src/test/java/org/richfaces/examples/BeanTest.java
branches/jsf2.0/framework/jsf-test/src/test/java/org/richfaces/test/HelloBean.java
Modified:
branches/jsf2.0/framework/jsf-test/src/test/java/org/richfaces/test/FacesServerTest.java
branches/jsf2.0/framework/jsf-test/src/test/java/org/richfaces/test/stub/ServerResourceTest.java
branches/jsf2.0/framework/jsf-test/src/test/resources/org/richfaces/test/faces-config.xml
branches/jsf2.0/framework/pom.xml
Log:
Facelets helloWord test have been run.
Added: branches/jsf2.0/examples/repeater/pom.xml
===================================================================
--- branches/jsf2.0/examples/repeater/pom.xml (rev 0)
+++ branches/jsf2.0/examples/repeater/pom.xml 2008-11-05 00:06:58 UTC (rev 11026)
@@ -0,0 +1,38 @@
+<?xml version="1.0"?><project>
+ <parent>
+ <artifactId>examples</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.examples</groupId>
+ <artifactId>repeater</artifactId>
+ <packaging>war</packaging>
+ <name>repeater Maven Webapp</name>
+ <version>4.0.0-SNAPSHOT</version>
+ <build>
+ <finalName>repeater</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>mojarra-jsf-impl</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: branches/jsf2.0/examples/repeater/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/examples/repeater/src/main/java/org/richfaces/examples/Bean.java
===================================================================
--- branches/jsf2.0/examples/repeater/src/main/java/org/richfaces/examples/Bean.java (rev 0)
+++ branches/jsf2.0/examples/repeater/src/main/java/org/richfaces/examples/Bean.java 2008-11-05 00:06:58 UTC (rev 11026)
@@ -0,0 +1,29 @@
+/**
+ * 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.examples;
+/**
+ * @author $Autor$
+ *
+ */
+public class Bean {
+
+}
\ No newline at end of file
Property changes on: branches/jsf2.0/examples/repeater/src/main/java/org/richfaces/examples/Bean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/examples/repeater/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- branches/jsf2.0/examples/repeater/src/main/webapp/META-INF/MANIFEST.MF (rev 0)
+++ branches/jsf2.0/examples/repeater/src/main/webapp/META-INF/MANIFEST.MF 2008-11-05 00:06:58 UTC (rev 11026)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: branches/jsf2.0/examples/repeater/src/main/webapp/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/examples/repeater/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/jsf2.0/examples/repeater/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ branches/jsf2.0/examples/repeater/src/main/webapp/WEB-INF/faces-config.xml 2008-11-05 00:06:58 UTC (rev 11026)
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.richfaces.examples.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Property changes on: branches/jsf2.0/examples/repeater/src/main/webapp/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/examples/repeater/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/jsf2.0/examples/repeater/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ branches/jsf2.0/examples/repeater/src/main/webapp/WEB-INF/web.xml 2008-11-05 00:06:58 UTC (rev 11026)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+ <display-name>Archetype Created Web Application</display-name>
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>/WEB-INF/faces-config.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <!--
+ -->
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ <dispatcher>ERROR</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Property changes on: branches/jsf2.0/examples/repeater/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/examples/repeater/src/main/webapp/index.jsp
===================================================================
--- branches/jsf2.0/examples/repeater/src/main/webapp/index.jsp (rev 0)
+++ branches/jsf2.0/examples/repeater/src/main/webapp/index.jsp 2008-11-05 00:06:58 UTC (rev 11026)
@@ -0,0 +1,11 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+
+<head></head>
+
+ <body>
+ <jsp:forward page="/pages/index.jsf" />
+ </body>
+
+</html>
\ No newline at end of file
Property changes on: branches/jsf2.0/examples/repeater/src/main/webapp/index.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/examples/repeater/src/main/webapp/pages/index.jsp
===================================================================
--- branches/jsf2.0/examples/repeater/src/main/webapp/pages/index.jsp (rev 0)
+++ branches/jsf2.0/examples/repeater/src/main/webapp/pages/index.jsp 2008-11-05 00:06:58 UTC (rev 11026)
@@ -0,0 +1,12 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+
+ </f:view>
+ </body>
+</html>
Property changes on: branches/jsf2.0/examples/repeater/src/main/webapp/pages/index.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/examples/repeater/src/main/webapp/pages/index.xhtml
===================================================================
--- branches/jsf2.0/examples/repeater/src/main/webapp/pages/index.xhtml (rev 0)
+++ branches/jsf2.0/examples/repeater/src/main/webapp/pages/index.xhtml 2008-11-05 00:06:58 UTC (rev 11026)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:c="http://java.sun.com/jsp/jstl/core"
+ >
+ <f:view>
+
+ </f:view>
+</html>
\ No newline at end of file
Property changes on: branches/jsf2.0/examples/repeater/src/main/webapp/pages/index.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/examples/repeater/src/test/java/org/richfaces/examples/BeanTest.java
===================================================================
--- branches/jsf2.0/examples/repeater/src/test/java/org/richfaces/examples/BeanTest.java (rev 0)
+++ branches/jsf2.0/examples/repeater/src/test/java/org/richfaces/examples/BeanTest.java 2008-11-05 00:06:58 UTC (rev 11026)
@@ -0,0 +1,46 @@
+/**
+ * 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.examples;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+*/
+public class BeanTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public BeanTest( String testName )
+ {
+ super( testName );
+ }
+
+ public void testStub() throws Exception {
+
+ }
+}
Property changes on: branches/jsf2.0/examples/repeater/src/test/java/org/richfaces/examples/BeanTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/jsf2.0/framework/jsf-test/src/test/java/org/richfaces/test/FacesServerTest.java
===================================================================
--- branches/jsf2.0/framework/jsf-test/src/test/java/org/richfaces/test/FacesServerTest.java 2008-11-04 17:55:54 UTC (rev 11025)
+++ branches/jsf2.0/framework/jsf-test/src/test/java/org/richfaces/test/FacesServerTest.java 2008-11-05 00:06:58 UTC (rev 11026)
@@ -58,7 +58,7 @@
"org/richfaces/test/web.xml");
facesServer.addResource("/WEB-INF/faces-config.xml",
"org/richfaces/test/faces-config.xml");
- facesServer.addResource("/hello.xhml", "org/richfaces/test/hello.xhml");
+ facesServer.addResource("/hello.xhtml", "org/richfaces/test/hello.xhtml");
facesServer.addInitParameter(StateManager.STATE_SAVING_METHOD_PARAM_NAME, StateManager.STATE_SAVING_METHOD_SERVER);
facesServer.addInitParameter(ViewHandler.DEFAULT_SUFFIX_PARAM_NAME, ".xhtml");
facesServer.addInitParameter("com.sun.faces.validateXml", "true");
Added: branches/jsf2.0/framework/jsf-test/src/test/java/org/richfaces/test/HelloBean.java
===================================================================
--- branches/jsf2.0/framework/jsf-test/src/test/java/org/richfaces/test/HelloBean.java (rev 0)
+++ branches/jsf2.0/framework/jsf-test/src/test/java/org/richfaces/test/HelloBean.java 2008-11-05 00:06:58 UTC (rev 11026)
@@ -0,0 +1,15 @@
+package org.richfaces.test;
+
+import java.io.Serializable;
+
+public class HelloBean implements Serializable {
+
+ private String name;
+
+ public HelloBean() {}
+
+ public String getName() { return name;}
+
+ public void setName(String name) { this.name = name; }
+
+}
Property changes on: branches/jsf2.0/framework/jsf-test/src/test/java/org/richfaces/test/HelloBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/jsf2.0/framework/jsf-test/src/test/java/org/richfaces/test/stub/ServerResourceTest.java
===================================================================
--- branches/jsf2.0/framework/jsf-test/src/test/java/org/richfaces/test/stub/ServerResourceTest.java 2008-11-04 17:55:54 UTC (rev 11025)
+++ branches/jsf2.0/framework/jsf-test/src/test/java/org/richfaces/test/stub/ServerResourceTest.java 2008-11-05 00:06:58 UTC (rev 11026)
@@ -90,6 +90,23 @@
/**
* Test method for
+ * {@link org.richfaces.test.stub.ServerResourcesDirectory#getResource(org.richfaces.test.stub.ServerResourcePath)}
+ * .
+ */
+ @Test
+ public void testGetResourceRoot() {
+ ServerResourcesDirectory root = new ServerResourcesDirectory();
+ MockResource indexXhtml = new MockResource();
+ root.addResource(new ServerResourcePath("/index.xhtml"), indexXhtml);
+ ServerResource index = root.getResource(new ServerResourcePath("/index.xhtml"));
+ assertNotNull(index);
+ assertNull(root.getResource(new ServerResourcePath("/foo")));
+ assertNull(root.getResource(new ServerResourcePath("/foo/baz")));
+ assertEquals(1, root.getPaths().size());
+ }
+
+ /**
+ * Test method for
* {@link org.richfaces.test.stub.ServerResourcesDirectory#getAsStream()}.
*
* @throws IOException
Modified: branches/jsf2.0/framework/jsf-test/src/test/resources/org/richfaces/test/faces-config.xml
===================================================================
--- branches/jsf2.0/framework/jsf-test/src/test/resources/org/richfaces/test/faces-config.xml 2008-11-04 17:55:54 UTC (rev 11025)
+++ branches/jsf2.0/framework/jsf-test/src/test/resources/org/richfaces/test/faces-config.xml 2008-11-05 00:06:58 UTC (rev 11026)
@@ -44,7 +44,7 @@
<!-- our NumberBean we created before -->
<managed-bean>
<managed-bean-name>HelloBean</managed-bean-name>
- <managed-bean-class>helloFacelet.HelloBean</managed-bean-class>
+ <managed-bean-class>org.richfaces.test.HelloBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
Modified: branches/jsf2.0/framework/pom.xml
===================================================================
--- branches/jsf2.0/framework/pom.xml 2008-11-04 17:55:54 UTC (rev 11025)
+++ branches/jsf2.0/framework/pom.xml 2008-11-05 00:06:58 UTC (rev 11026)
@@ -94,7 +94,7 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.0-b04</version>
+ <version>2.0.0-b05</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
16 years, 4 months
JBoss Rich Faces SVN: r11025 - in trunk/test-applications/seleniumTest/richfaces/src: main/java/org/ajax4jsf/validators and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-11-04 12:55:54 -0500 (Tue, 04 Nov 2008)
New Revision: 11025
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/validators/InplaceInputValidator.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceInput/testValidator.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceInputTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java
Log:
tests for inplaceinput
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceInputTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceInputTestBean.java 2008-11-04 17:25:58 UTC (rev 11024)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/InplaceInputTestBean.java 2008-11-04 17:55:54 UTC (rev 11025)
@@ -1,5 +1,10 @@
package org.ajax4jsf.bean;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.ValidatorException;
+
public class InplaceInputTestBean {
public final static class Messages {
@@ -27,4 +32,10 @@
public void action() {
setText(InplaceInputTestBean.Messages.ACTION_CALLED);
}
+
+ public void validator(FacesContext arg0, UIComponent arg1, Object arg2) {
+ if (!"test".equals(arg2)) {
+ throw new ValidatorException(new FacesMessage("Value isn't correct!"));
+ }
+ }
}
Added: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/validators/InplaceInputValidator.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/validators/InplaceInputValidator.java (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/validators/InplaceInputValidator.java 2008-11-04 17:55:54 UTC (rev 11025)
@@ -0,0 +1,26 @@
+/**
+ *
+ */
+package org.ajax4jsf.validators;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * @author Vladimir Molotkov
+ *
+ */
+public class InplaceInputValidator implements Validator {
+
+ public void validate(FacesContext arg0, UIComponent arg1, Object arg2)
+ throws ValidatorException {
+ if (!"test".equals(arg2)) {
+ throw new ValidatorException(new FacesMessage("Value isn't correct!"));
+ }
+
+ }
+
+}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml 2008-11-04 17:25:58 UTC (rev 11024)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml 2008-11-04 17:55:54 UTC (rev 11025)
@@ -25,6 +25,11 @@
<validator-class>org.ajax4jsf.validators.ValidatorWithAttribute</validator-class>
</validator>
+ <validator>
+ <validator-id>inplaceInputValidator</validator-id>
+ <validator-class>org.ajax4jsf.validators.InplaceInputValidator</validator-class>
+ </validator>
+
<validator>
<validator-id>autoTestValidator</validator-id>
<validator-class>org.ajax4jsf.autotest.bean.AutoTestValidator</validator-class>
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceInput/testValidator.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceInput/testValidator.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceInput/testValidator.xhtml 2008-11-04 17:55:54 UTC (rev 11025)
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ template="../../template/caseTemplate.xhtml">
+ <ui:define name="caseName">testControlsFacet</ui:define>
+ <ui:define name="caseBody">
+ <h:form id="_form">
+ <table cellpadding="5" >
+ <tr>
+ <td>1</td>
+ <td>
+ <rich:inplaceInput id="ii_tv1" value="test" validator="#{inplaceInputBean.validator}">
+ </rich:inplaceInput>
+ <h:commandButton id="bn_tv1" action="#{inplaceInputBean.action}" value="Submit"></h:commandButton>
+ </td>
+ <td><span id="text_tv1"><h:message for="ii_tv1"/></span></td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>
+ <rich:inplaceInput id="ii_tv2" value="test" >
+ <f:validator validatorId="inplaceInputValidator" />
+ </rich:inplaceInput>
+ <h:commandButton id="bn_tv2" action="#{inplaceInputBean.action}" value="Submit"/>
+ </td>
+ <td><span id="text_tv2"><h:message for="ii_tv2"></h:message></span></td>
+ </tr>
+ </table>
+ </h:form>
+ </ui:define>
+</ui:composition>
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java 2008-11-04 17:25:58 UTC (rev 11024)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java 2008-11-04 17:55:54 UTC (rev 11025)
@@ -57,6 +57,10 @@
private static final String SHOW_CONTROLS_ATTRIBUTE_BAR = "bar";
+ private static final String VALIDATOR_PAGE = "testValidator.xhtml";
+
+ private static final String VALIDATOR_PAGE_ID_PREFIX = "_tv";
+
private String testUrl;
private String formId;
@@ -189,123 +193,176 @@
//
// }
- /**
- * 'required' and 'requiredMessage' attributes work
- *
- * @param template - current template
- */
- @Test
- public void testRequiredAttributes(Template template) {
- setTestUrl(REQUIRED_ATTRIBUTES_PAGE);
- init(template);
-
- selenium.click("id=" + buttonId + REQUIRED_ATTRIBUTES_ID_PREFIX);
- waitForPageToLoad();
- checkMessage(messageId + REQUIRED_ATTRIBUTES_ID_PREFIX, "text:requiredMsg", CommonUtils.getSuccessfulTestMessage(inplaceInputId + REQUIRED_ATTRIBUTES_ID_PREFIX), CommonUtils.getFailedTestMessage(inplaceInputId + REQUIRED_ATTRIBUTES_ID_PREFIX));
- }
+// /**
+// * 'required' and 'requiredMessage' attributes work
+// *
+// * @param template - current template
+// */
+// @Test
+// public void testRequiredAttributes(Template template) {
+// setTestUrl(REQUIRED_ATTRIBUTES_PAGE);
+// init(template);
+//
+// selenium.click("id=" + buttonId + REQUIRED_ATTRIBUTES_ID_PREFIX);
+// waitForPageToLoad();
+// checkMessage(messageId + REQUIRED_ATTRIBUTES_ID_PREFIX, "text:requiredMsg", CommonUtils.getSuccessfulTestMessage(inplaceInputId + REQUIRED_ATTRIBUTES_ID_PREFIX), CommonUtils.getFailedTestMessage(inplaceInputId + REQUIRED_ATTRIBUTES_ID_PREFIX));
+// }
+//
+// /**
+// * Check 'editEvent' attribute
+// *
+// * @param template - current template
+// */
+// @Test
+// public void testEditEventAttribute(Template template) {
+// setTestUrl(EDITEVENT_ATTRIBUTES_PAGE);
+// init(template);
+//
+// selenium.doubleClick(inplaceInputId + EDITEVENT_ATTRIBUTES_ID_PREFIX);
+// Map<String, String> expMap = new HashMap<String, String>();
+// expMap.put("clip", "rect(auto auto auto auto)");
+// assertStyleAttributes(inplaceInputId + EDITEVENT_ATTRIBUTES_ID_PREFIX + "tempValue", expMap);
+// }
+//
+// /**
+// * Check 'controls' facet
+// *
+// * @param template - current template
+// */
+// @Test
+// public void testControlsFacet(Template template) {
+// setTestUrl(CONTROLS_FACET_PAGE);
+// init(template);
+//
+// check((isPresentById(CONTROLS_FACET_BN_OK + CONTROLS_FACET_ID_PREFIX) || isPresentById(CONTROLS_FACET_BN_CANCEL + CONTROLS_FACET_ID_PREFIX)),
+// CommonUtils.getSuccessfulTestMessage(inplaceInputId + CONTROLS_FACET_ID_PREFIX),
+// CommonUtils.getFailedTestMessage(inplaceInputId + CONTROLS_FACET_ID_PREFIX));
+// }
+//
+// /**
+// * Input some spaces in inplaceInput; verify that defaultLabel is
+// * displayed after selecting; component does not disappear from the page
+// *
+// * @param template - current template
+// */
+// @Test
+// public void testDefaultLabelAndSpaces(Template template) {
+// setTestUrl(DEFAULTLABEL_AND_SPACES_PAGE);
+// init(template);
+//
+// String iid = inplaceInputId + DEFAULTLABEL_AND_SPACES_PAGE_ID_PREFIX;
+//
+// checkMessage(iid, "defaultLabel",
+// CommonUtils.getSuccessfulTestMessage(iid),
+// CommonUtils.getFailedTestMessage(iid));
+//
+// typeAndCheck(iid, " ", "defaultLabel");
+// typeAndCheck(iid, "test", "test");
+// }
+//
+// /**
+// * Verify component behaviour with showControls="false" attribute
+// *
+// * @param template - current template
+// */
+// @Test
+// public void testShowControlsAttribute1(Template template) {
+// setTestUrl(SHOW_CONTROLS_ATTRIBUTE1_PAGE);
+// init(template);
+//
+// String iid = inplaceInputId + SHOW_CONTROLS_ATTRIBUTE1_PAGE_ID_PREFIX;
+//
+// clickById(iid);
+// check(!isVisibleById(iid + SHOW_CONTROLS_ATTRIBUTE_BAR),
+// CommonUtils.getSuccessfulTestMessage(iid),
+// CommonUtils.getFailedTestMessage(iid));
+//
+// Map<String, String> expMap = new HashMap<String, String>();
+// expMap.put("clip", "rect(auto auto auto auto)");
+// assertStyleAttributes(iid+ "tempValue", expMap);
+// selenium.fireEvent(iid + "tempValue", "blur");
+// expMap.remove("clip");
+// expMap.put("clip", "rect(0px 0px 0px 0px)");
+// assertStyleAttributes(iid+ "tempValue", expMap);
+// }
+//
+// /**
+// * The same as previous but with showControls="true" attribute
+// *
+// * @param template - current template
+// */
+// @Test
+// public void testShowControlsAttribute2(Template template) {
+// setTestUrl(SHOW_CONTROLS_ATTRIBUTE2_PAGE);
+// init(template);
+//
+// String iid = inplaceInputId + SHOW_CONTROLS_ATTRIBUTE2_PAGE_ID_PREFIX;
+//
+// clickById(iid);
+// check(isVisibleById(iid + SHOW_CONTROLS_ATTRIBUTE_BAR),
+// CommonUtils.getSuccessfulTestMessage(iid),
+// CommonUtils.getFailedTestMessage(iid));
+//
+// Map<String, String> expMap = new HashMap<String, String>();
+// expMap.put("clip", "rect(auto auto auto auto)");
+// assertStyleAttributes(iid+ "tempValue", expMap);
+// selenium.fireEvent(iid + "tempValue", "blur");
+// expMap.remove("clip");
+// expMap.put("clip", "rect(auto auto auto auto)");
+// assertStyleAttributes(iid+ "tempValue", expMap);
+// }
/**
- * Check 'editEvent' attribute
+ * Validator defined by component attribute and nested tags work
*
* @param template - current template
*/
@Test
- public void testEditEventAttribute(Template template) {
- setTestUrl(EDITEVENT_ATTRIBUTES_PAGE);
+ public void testValidator1(Template template) {
+ setTestUrl(VALIDATOR_PAGE);
init(template);
- selenium.doubleClick(inplaceInputId + EDITEVENT_ATTRIBUTES_ID_PREFIX);
- Map<String, String> expMap = new HashMap<String, String>();
- expMap.put("clip", "rect(auto auto auto auto)");
- assertStyleAttributes(inplaceInputId + EDITEVENT_ATTRIBUTES_ID_PREFIX + "tempValue", expMap);
- }
-
- /**
- * Check 'controls' facet
- *
- * @param template - current template
- */
- @Test
- public void testControlsFacet(Template template) {
- setTestUrl(CONTROLS_FACET_PAGE);
- init(template);
+ String iid = inplaceInputId + VALIDATOR_PAGE_ID_PREFIX;
- check((isPresentById(CONTROLS_FACET_BN_OK + CONTROLS_FACET_ID_PREFIX) || isPresentById(CONTROLS_FACET_BN_CANCEL + CONTROLS_FACET_ID_PREFIX)),
- CommonUtils.getSuccessfulTestMessage(inplaceInputId + CONTROLS_FACET_ID_PREFIX),
- CommonUtils.getFailedTestMessage(inplaceInputId + CONTROLS_FACET_ID_PREFIX));
- }
-
- /**
- * Input some spaces in inplaceInput; verify that defaultLabel is
- * displayed after selecting; component does not disappear from the page
- *
- * @param template - current template
- */
- @Test
- public void testDefaultLabelAndSpaces(Template template) {
- setTestUrl(DEFAULTLABEL_AND_SPACES_PAGE);
- init(template);
+ clickById(buttonId + VALIDATOR_PAGE_ID_PREFIX + "1");
+ waitForPageToLoad();
+ check("".equals(getTextById(messageId + VALIDATOR_PAGE_ID_PREFIX + "1")),
+ CommonUtils.getSuccessfulTestMessage(iid + "1"),
+ CommonUtils.getFailedTestMessage(iid + "1"));
- String iid = inplaceInputId + DEFAULTLABEL_AND_SPACES_PAGE_ID_PREFIX;
-
- checkMessage(iid, "defaultLabel",
- CommonUtils.getSuccessfulTestMessage(iid),
- CommonUtils.getFailedTestMessage(iid));
-
- typeAndCheck(iid, " ", "defaultLabel");
- typeAndCheck(iid, "test", "test");
+ clickById(buttonId + VALIDATOR_PAGE_ID_PREFIX + "2");
+ waitForPageToLoad();
+ check("".equals(getTextById(messageId + VALIDATOR_PAGE_ID_PREFIX + "2")),
+ CommonUtils.getSuccessfulTestMessage(iid + "2"),
+ CommonUtils.getFailedTestMessage(iid + "2"));
}
/**
- * Verify component behaviour with showControls="false" attribute
+ * Validator defined by component attribute and nested tags work
*
* @param template - current template
*/
@Test
- public void testShowControlsAttribute1(Template template) {
- setTestUrl(SHOW_CONTROLS_ATTRIBUTE1_PAGE);
+ public void testValidator2(Template template) {
+ setTestUrl(VALIDATOR_PAGE);
init(template);
- String iid = inplaceInputId + SHOW_CONTROLS_ATTRIBUTE1_PAGE_ID_PREFIX;
+ String iid = inplaceInputId + VALIDATOR_PAGE_ID_PREFIX;
- clickById(iid);
- check(!isVisibleById(iid + SHOW_CONTROLS_ATTRIBUTE_BAR),
- CommonUtils.getSuccessfulTestMessage(iid),
- CommonUtils.getFailedTestMessage(iid));
+ setValueById(iid + "1" + "value", "test1");
+ setValueById(iid + "2" + "value", "test1");
- Map<String, String> expMap = new HashMap<String, String>();
- expMap.put("clip", "rect(auto auto auto auto)");
- assertStyleAttributes(iid+ "tempValue", expMap);
- selenium.fireEvent(iid + "tempValue", "blur");
- expMap.remove("clip");
- expMap.put("clip", "rect(0px 0px 0px 0px)");
- assertStyleAttributes(iid+ "tempValue", expMap);
- }
-
- /**
- * The same as previous but with showControls="true" attribute
- *
- * @param template - current template
- */
- @Test
- public void testShowControlsAttribute2(Template template) {
- setTestUrl(SHOW_CONTROLS_ATTRIBUTE2_PAGE);
- init(template);
+ clickById(buttonId + VALIDATOR_PAGE_ID_PREFIX + "1");
+ waitForPageToLoad();
+ check("Value isn't correct!".equals(getTextById(messageId + VALIDATOR_PAGE_ID_PREFIX + "1")),
+ CommonUtils.getSuccessfulTestMessage(iid + "1"),
+ CommonUtils.getFailedTestMessage(iid + "1"));
- String iid = inplaceInputId + SHOW_CONTROLS_ATTRIBUTE2_PAGE_ID_PREFIX;
-
- clickById(iid);
- check(isVisibleById(iid + SHOW_CONTROLS_ATTRIBUTE_BAR),
- CommonUtils.getSuccessfulTestMessage(iid),
- CommonUtils.getFailedTestMessage(iid));
-
- Map<String, String> expMap = new HashMap<String, String>();
- expMap.put("clip", "rect(auto auto auto auto)");
- assertStyleAttributes(iid+ "tempValue", expMap);
- selenium.fireEvent(iid + "tempValue", "blur");
- expMap.remove("clip");
- expMap.put("clip", "rect(auto auto auto auto)");
- assertStyleAttributes(iid+ "tempValue", expMap);
+ clickById(buttonId + VALIDATOR_PAGE_ID_PREFIX + "2");
+ waitForPageToLoad();
+ check("Value isn't correct!".equals(getTextById(messageId + VALIDATOR_PAGE_ID_PREFIX + "2")),
+ CommonUtils.getSuccessfulTestMessage(iid + "2"),
+ CommonUtils.getFailedTestMessage(iid + "2"));
}
private void typeAndCheck(String iid, String word, String expectedWord) {
16 years, 4 months
JBoss Rich Faces SVN: r11024 - in trunk/sandbox/ui/editor/src/main: java/org/richfaces/renderkit and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-11-04 12:25:58 -0500 (Tue, 04 Nov 2008)
New Revision: 11024
Added:
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/1$1.js
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/1$1.xcss
Modified:
trunk/sandbox/ui/editor/src/main/config/resources/resources-config.xml
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js
trunk/sandbox/ui/editor/src/main/templates/editor.jspx
Log:
Change mechanism of getting resources suffix
Modified: trunk/sandbox/ui/editor/src/main/config/resources/resources-config.xml
===================================================================
--- trunk/sandbox/ui/editor/src/main/config/resources/resources-config.xml 2008-11-04 16:46:21 UTC (rev 11023)
+++ trunk/sandbox/ui/editor/src/main/config/resources/resources-config.xml 2008-11-04 17:25:58 UTC (rev 11024)
@@ -5050,4 +5050,17 @@
<path>org/richfaces/renderkit/html/scripts/tiny_mce/utils/validate.js</path>
<renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
</resource>
+ <resource>
+ <name>scripts/tiny_mce/utils/validate.js</name>
+ <path>org/richfaces/renderkit/html/scripts/tiny_mce/utils/validate.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>1$1.js</name>
+ <path>org/richfaces/renderkit/html/1$1.js</path>
+ </resource>
+ <resource>
+ <name>1$1.xcss</name>
+ <path>org/richfaces/renderkit/html/1$1.xcss</path>
+ </resource>
</resource-config>
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-11-04 16:46:21 UTC (rev 11023)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-11-04 17:25:58 UTC (rev 11024)
@@ -37,8 +37,8 @@
import javax.faces.convert.ConverterException;
import org.ajax4jsf.javascript.ScriptUtils;
+import org.ajax4jsf.resource.InternetResource;
import org.ajax4jsf.util.InputUtils;
-import org.ajax4jsf.webapp.WebXml;
import org.richfaces.component.UIEditor;
/**
@@ -47,6 +47,9 @@
*/
public class EditorRendererBase extends InputRendererBase {
+ private final static String SPECIFIC_SCRIPT_RESOURCE_NAME = "1$1.js";
+ private final static String SPECIFIC_XCSS_RESOURCE_NAME = "1$1.xcss";
+
@Override
protected Class<? extends UIComponent> getComponentClass() {
return UIEditor.class;
@@ -109,25 +112,22 @@
return fieldValue;
}
- protected String getFacesMappingSuffix(FacesContext context) {
- WebXml webXml = WebXml.getInstance(context);
- String suffix = webXml.getFacesServletSuffix();
- String prefix = webXml.getFacesServletPrefix();
- String filterPrefix = webXml.getFacesFilterPrefix();
- String filterSuffix = webXml.getFacesFilterSuffix();
- if (filterPrefix != null) {
- return "";
+ protected String getSriptMappingSuffix(FacesContext context) {
+ return getResourceSuffix(context, SPECIFIC_SCRIPT_RESOURCE_NAME);
+ }
+
+ protected String getCssMappingSuffix(FacesContext context) {
+ return getResourceSuffix(context, SPECIFIC_XCSS_RESOURCE_NAME);
+ }
+
+ private String getResourceSuffix(FacesContext context, String resourceName){
+ InternetResource resource = getResource(resourceName);
+ String resourceUri = resource.getUri(context, null);
+ String suffix = resourceUri.substring(resourceUri.indexOf(resourceName) + resourceName.length());
+ if(suffix == null){
+ suffix = "";
}
- if (filterSuffix != null) {
- return filterSuffix;
- }
- if (prefix != null) {
- return "";
- }
- if (suffix != null) {
- return suffix;
- }
- return "";
+ return suffix;
}
public void writeEditorConfigurationParameters(FacesContext context,
Added: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/1$1.js
===================================================================
Property changes on: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/1$1.js
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/1$1.xcss
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/1$1.xcss (rev 0)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/1$1.xcss 2008-11-04 17:25:58 UTC (rev 11024)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:template
+ xmlns:f="http://jsf.exadel.com/template"
+ xmlns:u="http://jsf.exadel.com/template/util"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+</f:template>
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-11-04 16:46:21 UTC (rev 11023)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-11-04 17:25:58 UTC (rev 11024)
@@ -15,7 +15,8 @@
obj.richfacesComponent="richfaces:editor";
this["rich:destructor"] = "destruct";
- Richfaces.Editor.extSuffix = params.extSuffix;
+ Richfaces.Editor.extScriptSuffix = params.extScriptSuffix;
+ Richfaces.Editor.extCssSuffix = params.extCssSuffix;
this.tinyMCE_editor = null;
this.onInitInstanceCallbackFunction = tinyparams.onInitInstanceCallback;
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js 2008-11-04 16:46:21 UTC (rev 11023)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js 2008-11-04 17:25:58 UTC (rev 11024)
@@ -409,8 +409,9 @@
var v;
// RF: added by PY
- u = u.replace(Richfaces.Editor.REGEXP_CSS, function($1,$2,$3){return $2+($3=='c' ? "xcss":"XCSS");});
- if (Richfaces && Richfaces.Editor) u += Richfaces.Editor.extSuffix;
+ var isCSS = false;
+ u = u.replace(Richfaces.Editor.REGEXP_CSS, function($1,$2,$3){isCSS=true; return $2+($3=='c' ? "xcss":"XCSS");});
+ if (Richfaces && Richfaces.Editor) u += (isCSS ? Richfaces.Editor.extCssSuffix : Richfaces.Editor.extScriptSuffix);
// RF: end
if (!this.query)
Modified: trunk/sandbox/ui/editor/src/main/templates/editor.jspx
===================================================================
--- trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-11-04 16:46:21 UTC (rev 11023)
+++ trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2008-11-04 17:25:58 UTC (rev 11024)
@@ -36,8 +36,11 @@
tinyMceParams.onchange_callback = '#{component.attributes["onchange"]}';
tinyMceParams.save_callback = '#{component.attributes["onsave"]}';
tinyMceParams.setup = '#{component.attributes["onsetup"]}';
-
- new RichEditor('#{clientId}', {extSuffix:'#{this:getFacesMappingSuffix(context)}'}, tinyMceParams);
+
+ var richParams = {extScriptSuffix:'#{this:getSriptMappingSuffix(context)}',
+ extCssSuffix:'#{this:getCssMappingSuffix(context)}'}
+
+ new RichEditor('#{clientId}', richParams, tinyMceParams);
</script>
</div>
</f:root>
16 years, 4 months
JBoss Rich Faces SVN: r11023 - trunk/test-applications/automator/src/main/java/parser.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-11-04 11:46:21 -0500 (Tue, 04 Nov 2008)
New Revision: 11023
Modified:
trunk/test-applications/automator/src/main/java/parser/TLDParser.java
Log:
import ArrayList
Modified: trunk/test-applications/automator/src/main/java/parser/TLDParser.java
===================================================================
--- trunk/test-applications/automator/src/main/java/parser/TLDParser.java 2008-11-04 16:41:29 UTC (rev 11022)
+++ trunk/test-applications/automator/src/main/java/parser/TLDParser.java 2008-11-04 16:46:21 UTC (rev 11023)
@@ -4,6 +4,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.util.ArrayList;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
16 years, 4 months
JBoss Rich Faces SVN: r11022 - trunk/test-applications.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-11-04 11:41:29 -0500 (Tue, 04 Nov 2008)
New Revision: 11022
Modified:
trunk/test-applications/pom.xml
Log:
Modified: trunk/test-applications/pom.xml
===================================================================
--- trunk/test-applications/pom.xml 2008-11-04 16:39:46 UTC (rev 11021)
+++ trunk/test-applications/pom.xml 2008-11-04 16:41:29 UTC (rev 11022)
@@ -61,6 +61,7 @@
<module>jsp</module>
<module>facelets</module>
<module>auto-jsp</module>
+ <module>automator</module>
</modules>
<build>
16 years, 4 months
JBoss Rich Faces SVN: r11021 - in trunk/test-applications/seamApp: ejb and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-11-04 11:39:46 -0500 (Tue, 04 Nov 2008)
New Revision: 11021
Removed:
trunk/test-applications/seamApp/ear/.project
trunk/test-applications/seamApp/ear/.settings/
trunk/test-applications/seamApp/ejb/.classpath
trunk/test-applications/seamApp/ejb/.project
trunk/test-applications/seamApp/ejb/.settings/
trunk/test-applications/seamApp/web/.classpath
trunk/test-applications/seamApp/web/.project
trunk/test-applications/seamApp/web/.settings/
Modified:
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/combobox/Combobox.java
trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/componentInfo/Info.java
Log:
Deleted: trunk/test-applications/seamApp/ear/.project
===================================================================
--- trunk/test-applications/seamApp/ear/.project 2008-11-04 16:38:02 UTC (rev 11020)
+++ trunk/test-applications/seamApp/ear/.project 2008-11-04 16:39:46 UTC (rev 11021)
@@ -1,20 +0,0 @@
-<projectDescription>
- <name>seamApp-ear</name>
- <comment/>
- <projects>
- <project>seamApp-ejb</project>
- <project>seamApp-web</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- </natures>
-</projectDescription>
\ No newline at end of file
Deleted: trunk/test-applications/seamApp/ejb/.classpath
===================================================================
--- trunk/test-applications/seamApp/ejb/.classpath 2008-11-04 16:38:02 UTC (rev 11020)
+++ trunk/test-applications/seamApp/ejb/.classpath 2008-11-04 16:39:46 UTC (rev 11021)
@@ -1,25 +0,0 @@
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
- <classpathentry kind="src" path="target\generated-resources\eclipse" excluding="**/*.java"/>
- <classpathentry kind="output" path="target/classes"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JDK_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/org/antlr/antlr-runtime/3.0/antlr-runtime-3.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/eclipse/jdt/core/3.2.3.v_686_R32x/core-3.2.3.v_686_R32x.jar"/>
- <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1-jboss/dom4j-1.6.1-jboss.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/drools/drools-compiler/4.0.0/drools-compiler-4.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/drools/drools-core/4.0.0/drools-core-4.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar" sourcepath="M2_REPO/javax/ejb/ejb-api/3.0/ejb-api-3.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/el/el-api/1.0/el-api-1.0.jar" sourcepath="M2_REPO/javax/el/el-api/1.0/el-api-1.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-validator/3.0.0.ga/hibernate-validator-3.0.0.ga.jar"/>
- <classpathentry kind="var" path="M2_REPO/janino/janino/2.5.7/janino-2.5.7.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/el/jboss-el/2.0.1.GA/jboss-el-2.0.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam/2.0.1.GA/jboss-seam-2.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/seam/jboss-seam/2.0.1.GA/jboss-seam-2.0.1.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam-remoting/2.0.1.GA/jboss-seam-remoting-2.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/seam/jboss-seam-remoting/2.0.1.GA/jboss-seam-remoting-2.0.1.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/mvel/mvel14/1.2rc1/mvel14-1.2rc1.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar" sourcepath="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/xpp3/xpp3/1.1.3.4.O/xpp3-1.1.3.4.O.jar" sourcepath="M2_REPO/xpp3/xpp3/1.1.3.4.O/xpp3-1.1.3.4.O-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/xstream/xstream/1.1.3/xstream-1.1.3.jar" sourcepath="M2_REPO/xstream/xstream/1.1.3/xstream-1.1.3-sources.jar"/>
-</classpath>
\ No newline at end of file
Deleted: trunk/test-applications/seamApp/ejb/.project
===================================================================
--- trunk/test-applications/seamApp/ejb/.project 2008-11-04 16:38:02 UTC (rev 11020)
+++ trunk/test-applications/seamApp/ejb/.project 2008-11-04 16:39:46 UTC (rev 11021)
@@ -1,22 +0,0 @@
-<projectDescription>
- <name>seamApp-ejb</name>
- <comment/>
- <projects/>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
- </natures>
-</projectDescription>
\ No newline at end of file
Deleted: trunk/test-applications/seamApp/web/.classpath
===================================================================
--- trunk/test-applications/seamApp/web/.classpath 2008-11-04 16:38:02 UTC (rev 11020)
+++ trunk/test-applications/seamApp/web/.classpath 2008-11-04 16:39:46 UTC (rev 11021)
@@ -1,74 +0,0 @@
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
- <classpathentry kind="output" path="target/classes"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JDK_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar">
- <attributes>
- <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2-sources.jar">
- <attributes>
- <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/commons-digester/commons-digester/1.8/commons-digester-1.8.jar" sourcepath="M2_REPO/commons-digester/commons-digester/1.8/commons-digester-1.8-sources.jar">
- <attributes>
- <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-sources.jar">
- <attributes>
- <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar" sourcepath="M2_REPO/javax/ejb/ejb-api/3.0/ejb-api-3.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/el/el-api/1.0/el-api-1.0.jar" sourcepath="M2_REPO/javax/el/el-api/1.0/el-api-1.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-validator/3.0.0.ga/hibernate-validator-3.0.0.ga.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/el/jboss-el/2.0.1.GA/jboss-el-2.0.1.GA.jar">
- <attributes>
- <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam/2.0.1.GA/jboss-seam-2.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/seam/jboss-seam/2.0.1.GA/jboss-seam-2.0.1.GA-sources.jar">
- <attributes>
- <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam-debug/2.0.1.GA/jboss-seam-debug-2.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/seam/jboss-seam-debug/2.0.1.GA/jboss-seam-debug-2.0.1.GA-sources.jar">
- <attributes>
- <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/jboss/seam/jboss-seam-ui/2.0.1.GA/jboss-seam-ui-2.0.1.GA.jar" sourcepath="M2_REPO/org/jboss/seam/jboss-seam-ui/2.0.1.GA/jboss-seam-ui-2.0.1.GA-sources.jar">
- <attributes>
- <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/javax/faces/jsf-api/1.2_09/jsf-api-1.2_09.jar" sourcepath="M2_REPO/javax/faces/jsf-api/1.2_09/jsf-api-1.2_09-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/sun/facelets/jsf-facelets/1.1.14/jsf-facelets-1.1.14.jar" sourcepath="M2_REPO/com/sun/facelets/jsf-facelets/1.1.14/jsf-facelets-1.1.14-sources.jar">
- <attributes>
- <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/javax/faces/jsf-impl/1.2_09/jsf-impl-1.2_09.jar" sourcepath="M2_REPO/javax/faces/jsf-impl/1.2_09/jsf-impl-1.2_09-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar" sourcepath="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/richfaces/framework/richfaces-api/3.3.0-SNAPSHOT/richfaces-api-3.3.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/richfaces/framework/richfaces-api/3.3.0-SNAPSHOT/richfaces-api-3.3.0-SNAPSHOT-sources.jar">
- <attributes>
- <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/richfaces/framework/richfaces-impl/3.3.0-SNAPSHOT/richfaces-impl-3.3.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/richfaces/framework/richfaces-impl/3.3.0-SNAPSHOT/richfaces-impl-3.3.0-SNAPSHOT-sources.jar">
- <attributes>
- <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/org/richfaces/ui/richfaces-ui/3.3.0-SNAPSHOT/richfaces-ui-3.3.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/richfaces/ui/richfaces-ui/3.3.0-SNAPSHOT/richfaces-ui-3.3.0-SNAPSHOT-sources.jar">
- <attributes>
- <attribute value="/WEB-INF/lib" name="org.eclipse.jst.component.dependency"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4-sources.jar"/>
-</classpath>
\ No newline at end of file
Deleted: trunk/test-applications/seamApp/web/.project
===================================================================
--- trunk/test-applications/seamApp/web/.project 2008-11-04 16:38:02 UTC (rev 11020)
+++ trunk/test-applications/seamApp/web/.project 2008-11-04 16:39:46 UTC (rev 11021)
@@ -1,22 +0,0 @@
-<projectDescription>
- <name>seamApp-web</name>
- <comment/>
- <projects/>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
- </natures>
-</projectDescription>
\ No newline at end of file
Modified: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/combobox/Combobox.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/combobox/Combobox.java 2008-11-04 16:38:02 UTC (rev 11020)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/combobox/Combobox.java 2008-11-04 16:39:46 UTC (rev 11021)
@@ -54,8 +54,8 @@
}
public void add(){
- ComponentInfo myInfo = ComponentInfo.getInstance();
- myInfo.addField(myComboBox);
+ ComponentInfo info = ComponentInfo.getInstance();
+ info.addField(myComboBox);
}
public Combobox() {
Modified: trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/componentInfo/Info.java
===================================================================
--- trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/componentInfo/Info.java 2008-11-04 16:38:02 UTC (rev 11020)
+++ trunk/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/util/componentInfo/Info.java 2008-11-04 16:39:46 UTC (rev 11021)
@@ -26,10 +26,11 @@
*
*/
@Name("myInfo")
+(a)Scope(ScopeType.SESSION)
public class Info {
private ComponentInfo info = ComponentInfo.getInstance();
private ComponentAttribute componentAttribute = info
- .getComponentAttribute();;
+ .getComponentAttribute();
private HtmlPanelGrid panelEvent = null;
public HtmlPanelGrid getPanelEvent() {
16 years, 4 months