Author: mvitenkov
Date: 2009-05-25 04:28:06 -0400 (Mon, 25 May 2009)
New Revision: 14294
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7064/
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7064/EditorBean.java
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7064/InputResetBean.java
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/resources/advanced.properties
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/resources/simple.properties
Log:
RF-7064 java bean and resources added.
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7064/EditorBean.java
===================================================================
---
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7064/EditorBean.java
(rev 0)
+++
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7064/EditorBean.java 2009-05-25
08:28:06 UTC (rev 14294)
@@ -0,0 +1,87 @@
+package org.richfaces.regressionarea.issues.rf7064;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.model.SelectItem;
+import javax.faces.validator.ValidatorException;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.ui.validator.FormattedTextValidator;
+
+@Name("editorBean")
+(a)Scope(ScopeType.SESSION)
+public class EditorBean {
+
+ private String currentConfiguration = "simple";
+ private String viewMode = "visual";
+ private String value;
+ private boolean liveUpdatesEnabled=false;
+ private boolean useSeamText=false;
+
+// private static final String CONFIGS_PACKAGE =
"/org/richfaces/demo/editor/";
+ List<SelectItem> configurations = new ArrayList<SelectItem>();
+
+ public EditorBean() {
+ configurations.add(new SelectItem("simple", "Simple"));
+ configurations.add(new SelectItem("advanced", "Advanced"));
+ }
+
+ public void resetValue() {
+ value = "";
+ }
+
+ public String getCurrentConfiguration() {
+ return currentConfiguration;
+ }
+
+ public void setCurrentConfiguration(String currentConfiguration) {
+ this.currentConfiguration = currentConfiguration;
+ }
+
+ public List<SelectItem> getConfigurations() {
+ return configurations;
+ }
+
+ public String getViewMode() {
+ return viewMode;
+ }
+
+ public void setViewMode(String viewMode) {
+ this.viewMode = viewMode;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public boolean isLiveUpdatesEnabled() {
+ return liveUpdatesEnabled;
+ }
+
+ public void setLiveUpdatesEnabled(boolean liveUpdatesEnabled) {
+ this.liveUpdatesEnabled = liveUpdatesEnabled;
+ }
+
+ public boolean isUseSeamText() {
+ return useSeamText;
+ }
+
+ public void setUseSeamText(boolean useSeamText) {
+ this.useSeamText = useSeamText;
+ }
+
+ public void validate(FacesContext context, UIComponent component, Object value) throws
ValidatorException {
+ if (useSeamText) {
+ new FormattedTextValidator().validate(context, component, value);
+ }
+ }
+}
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7064/InputResetBean.java
===================================================================
---
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7064/InputResetBean.java
(rev 0)
+++
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf7064/InputResetBean.java 2009-05-25
08:28:06 UTC (rev 14294)
@@ -0,0 +1,54 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * 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.regressionarea.issues.rf7064;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+/**
+ * @author Nick Belaevski
+ * @since 3.3.1
+ */
+@Name("inputResetBean")
+(a)Scope(ScopeType.EVENT)
+public class InputResetBean {
+
+ @In
+ private FacesContext facesContext;
+
+ public void processValueChange(ValueChangeEvent valueChangeEvent) {
+ if (facesContext.getMaximumSeverity() != null) {
+ UIComponent component = valueChangeEvent.getComponent();
+ if (component instanceof UIInput) {
+ UIInput input = (UIInput) component;
+ input.resetValue();
+ }
+ }
+ }
+}
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/resources/advanced.properties
===================================================================
---
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/resources/advanced.properties
(rev 0)
+++
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/resources/advanced.properties 2009-05-25
08:28:06 UTC (rev 14294)
@@ -0,0 +1,5 @@
+theme="advanced"
+theme_advanced_toolbar_location="top"
+theme_advanced_toolbar_align="left"
+plugins="preview,insertdatetime"
+theme_advanced_buttons3="hr,removeformat,visualaid,separator,sub,sup,separator,charmap"
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/resources/simple.properties
===================================================================
---
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/resources/simple.properties
(rev 0)
+++
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/resources/simple.properties 2009-05-25
08:28:06 UTC (rev 14294)
@@ -0,0 +1 @@
+theme="simple"
Show replies by date