JBoss Rich Faces SVN: r10599 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/WEB-INF and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-09-29 10:14:17 -0400 (Mon, 29 Sep 2008)
New Revision: 10599
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dnd/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dnd/dndTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DnDTest.java
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml
Log:
dndTest: initial commit
Added: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDBean.java (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDBean.java 2008-09-29 14:14:17 UTC (rev 10599)
@@ -0,0 +1,133 @@
+package org.ajax4jsf.bean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.richfaces.component.Dropzone;
+import org.richfaces.event.DragEvent;
+import org.richfaces.event.DragListener;
+import org.richfaces.event.DropEvent;
+import org.richfaces.event.DropListener;
+
+/**
+ * copied from demo and tailored
+ */
+public class DnDBean implements DropListener, DragListener {
+ private List<Framework> containerPHP;
+ private List<Framework> containerCF;
+ private List<Framework> containerDNET;
+ private List<Framework> frameworks;
+
+ public DnDBean() {
+ initList();
+ }
+
+ public List<Framework> getContainerPHP() {
+ return containerPHP;
+ }
+
+ public List<Framework> getContainerCF() {
+ return containerCF;
+ }
+
+ public List<Framework> getContainerDNET() {
+ return containerDNET;
+ }
+
+ public List<Framework> getFrameworks() {
+ return frameworks;
+ }
+
+ public void moveFramework(Object fm, Object family) {
+ List<Framework> target = null;
+ if ("PHP".equals(family)) {
+ target = containerPHP;
+ } else if ("DNET".equals(family)) {
+ target = containerDNET;
+ } else if ("CF".equals(family)) {
+ target = containerCF;
+ }
+
+ if (null != target && frameworks.contains(fm)) {
+ target.add((Framework) fm);
+ frameworks.remove(fm);
+ }
+ }
+
+ public String reset() {
+ initList();
+ return null;
+ }
+
+ private void initList() {
+ frameworks = new ArrayList<Framework>();
+ frameworks.add(new Framework("Flexible Ajax", "PHP"));
+ frameworks.add(new Framework("ajaxCFC", "CF"));
+ frameworks.add(new Framework("AJAXEngine", "DNET"));
+ frameworks.add(new Framework("AjaxAC", "PHP"));
+ frameworks.add(new Framework("MonoRail", "DNET"));
+ frameworks.add(new Framework("wddxAjax", "CF"));
+ frameworks.add(new Framework("AJAX AGENT", "PHP"));
+ frameworks.add(new Framework("FastPage", "DNET"));
+ frameworks.add(new Framework("JSMX", "CF"));
+ frameworks.add(new Framework("PAJAJ", "PHP"));
+ frameworks.add(new Framework("Symfony", "PHP"));
+ frameworks.add(new Framework("PowerWEB", "DNET"));
+
+ containerPHP = new ArrayList<Framework>();
+ containerCF = new ArrayList<Framework>();
+ containerDNET = new ArrayList<Framework>();
+ }
+
+//
+// DropListener implementation
+//
+ /**
+ * @see DragListener#processDrag(DragEvent)
+ */
+ public void processDrag(DragEvent event) {
+ // TODO Auto-generated method stub
+ }
+
+//
+// DropListener implementation
+//
+ /**
+ * @see DropListener#processDrop(DropEvent)
+ */
+ public void processDrop(DropEvent event) {
+ Dropzone dropzone = (Dropzone) event.getComponent();
+ moveFramework(event.getDragValue(), dropzone.getDropValue());
+ }
+
+ /**
+ * Framework
+ */
+ public static class Framework {
+ private String name;
+
+ private String family;
+
+ public Framework(String name, String family) {
+ super();
+ this.name = name;
+ this.family = family;
+ }
+
+ public String getFamily() {
+ return family;
+ }
+
+ public void setFamily(String family) {
+ this.family = family;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+ }
+}
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
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-09-29 14:00:39 UTC (rev 10598)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/faces-config.xml 2008-09-29 14:14:17 UTC (rev 10599)
@@ -225,6 +225,11 @@
<managed-bean-name>validationBean</managed-bean-name>
<managed-bean-class>org.ajax4jsf.bean.validation.ValidationBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>dndBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.DnDBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/pages/ajaxInclude/step1.xhtml</from-view-id>
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dnd/dndTest.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dnd/dndTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DnDTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DnDTest.java (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DnDTest.java 2008-09-29 14:14:17 UTC (rev 10599)
@@ -0,0 +1,18 @@
+package org.richfaces.testng;
+
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class DnDTest extends SeleniumTestBase {
+
+ @Test
+ public void _testDnDComponents(Template template) {
+ renderPage(template);
+ }
+
+ @Override
+ public String getTestUrl() {
+ return "pages/dnd/dndTest.xhtml";
+ }
+}
\ No newline at end of file
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DnDTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
16 years, 2 months
JBoss Rich Faces SVN: r10598 - trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-09-29 10:00:39 -0400 (Mon, 29 Sep 2008)
New Revision: 10598
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
https://jira.jboss.org/jira/browse/RF-4190
Modified: trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-09-29 13:59:58 UTC (rev 10597)
+++ trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-09-29 14:00:39 UTC (rev 10598)
@@ -105,7 +105,7 @@
}
if (!this.attributes.showControls) {
- this.save();
+ this.save(event);
} else {
this.applyTmpValue();
}
@@ -152,7 +152,7 @@
switch (event.keyCode) {
case Event.KEY_RETURN :
this.comboList.isList = false;
- this.save();
+ this.save(event);
if (!this.attributes.showControls) {
this.tempValueKeeper.blur();
}
@@ -176,13 +176,13 @@
break;
case Event.KEY_TAB :
if (this.attributes.showControls) {
- this.save();
+ this.save(event);
}
break;
}
},
- save : function($super) {
+ save : function($super,e) {
this.applyTmpValue();
this.comboList.hide();
if (((this.attributes.closeOnSelect && !this.attributes.showControls) && this.comboList.isList)
@@ -190,38 +190,43 @@
//bug : http://jira.jboss.com/jira/browse/RF-2810,
//will be corrected in a future version (http://jira.jboss.com/jira/browse/RF-2814)
var unescapedValue = this.currentItemValue;
- this.invokeEvent(this.events.onchange, this.inplaceSelect, "onchange", {itemValue : unescapedValue, itemText : this.tempValueKeeper.value});
+ var params = {itemValue: unescapedValue,itemLabel: this.tempValueKeeper.value}
// var unescapeText = this.tempValueKeeper.value.unescapeHTML();
- this.setValue(unescapedValue, this.tempValueKeeper.value);
+ this.setValue(e,params);
}
},
- setValue : function(userValue, currentText) {
+ setValue : function(e, params) {
var value = this.valueKeeper.value;
- if (this.invokeEvent(this.events.onviewactivation, this.inplaceInput, "rich:onviewactivation", {oldValue : this.valueKeeper.value, value : this.tempValueKeeper.value})) {
+ if (this.invokeEvent(this.events.onviewactivation, this.inplaceInput, "rich:onviewactivation", {oldValue : this.valueKeeper.value, value : params.itemValue})) {
this.endEditableState();
- if (userValue == "") {
+ if (params.itemValue == "") {
this.setDefaultText();
this.valueKeeper.value = "";
- //this.startViewState();
+ //this.startViewState();
} else {
- if (currentText == "") {
+ if (params.itemLabel == "") {
this.setDefaultText();
} else {
- this.currentText = currentText;
+ this.currentText = params.itemLabel;
}
- this.valueKeeper.value = userValue;
+ this.valueKeeper.value = params.itemValue;
}
- if (userValue != this.value) {
+ if (params.itemValue != this.value) {
this.startChangedState();
+ if (this.tempValueKeeper != params.itemLabel) {
+ this.tempValueKeeper.value = params.itemLabel;
+ }
+ this.invokeEvent(this.events.onchange, this.inplaceSelect, "onchange", params);
} else {
this.startViewState();
}
-
+
if (this.events.onviewactivated) {
- this.inplaceInput.fire("rich:onviewactivated", {oldValue : this.valueKeeper.value, value : this.tempValueKeeper.value});
+ this.inplaceInput.fire("rich:onviewactivated", {oldValue : value, value : this.valueKeeper.value});
}
}
+
},
applyTmpValue : function() {
16 years, 2 months
JBoss Rich Faces SVN: r10597 - in trunk/ui/inplaceInput/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-09-29 09:59:58 -0400 (Mon, 29 Sep 2008)
New Revision: 10597
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
fix onchange event calling, setValue via componentControl support
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-09-29 13:09:43 UTC (rev 10596)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-09-29 13:59:58 UTC (rev 10597)
@@ -125,7 +125,7 @@
}
},
- tmpValueBlurHandler : function() {
+ tmpValueBlurHandler : function(e) {
if (this.skipBlur) {
this.skipBlur = false;
return;
@@ -137,7 +137,7 @@
}
if (!this.attributes.showControls) {
- this.save();
+ this.save(e);
}
},
@@ -161,14 +161,14 @@
break;
case Event.KEY_TAB :
if (this.attributes.showControls) {
- this.save();
+ this.save(e);
}
break;
}
},
okHandler : function(e) {
- this.save();
+ this.save(e);
Event.stop(e);
},
@@ -245,7 +245,10 @@
if (this.currentState != 1) {
return;
}
+
+
var width = parseInt(this.attributes.inputWidth);
+
if (!width) {
var max = parseInt(this.attributes.maxInputWidth);
var min = parseInt(this.attributes.minInputWidth);
@@ -257,6 +260,7 @@
width = textWidth;
}
}
+
this.tempValueKeeper.style.width = width + "px";
return width;
},
@@ -292,20 +296,21 @@
}
},
- save : function() {
+ save : function(e) {
if (this.invokeEvent(this.events.onviewactivation, this.inplaceInput, "rich:onviewactivation", {oldValue : this.valueKeeper.value, value : this.tempValueKeeper.value})) {
- var userValue = this.tempValueKeeper.value;
- this.setValue(userValue);
+ var userValue = {value:this.tempValueKeeper.value};
+ this.setValue(e,userValue);
if (this.events.onviewactivated) {
this.inplaceInput.fire("rich:onviewactivated", {oldValue : this.valueKeeper.value, value : this.tempValueKeeper.value});
}
}
},
- setValue : function(userValue) {
+ setValue : function(e, param) {
var value = this.valueKeeper.value;
+ var userValue = param.value;
this.endEditableState();
-
+
if (userValue.blank()) {
this.setDefaultText();
this.valueKeeper.value = "";
@@ -316,6 +321,10 @@
if (userValue != this.value) {
this.startChangedState();
+ if (this.tempValueKeeper != userValue) {
+ this.tempValueKeeper.value = userValue;
+ }
+ this.invokeEvent(this.events.onchange, this.inplaceSelect, "onchange", param);
} else {
this.startViewState();
}
Modified: trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-09-29 13:09:43 UTC (rev 10596)
+++ trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-09-29 13:59:58 UTC (rev 10597)
@@ -92,7 +92,6 @@
type='text'
autocomplete="off"
value='#{fieldValue}'
- onchange='#{component.attributes["onchange"]}'
onselect='#{component.attributes["onselect"]}'
onblur='#{component.attributes["onblur"]}'
onfocus='#{component.attributes["onfocus"]}'
16 years, 2 months
JBoss Rich Faces SVN: r10596 - trunk/framework/test/src/test/java/org/ajax4jsf/model.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-09-29 09:09:43 -0400 (Mon, 29 Sep 2008)
New Revision: 10596
Modified:
trunk/framework/test/src/test/java/org/ajax4jsf/model/QueuesManagerTest.java
Log:
small fix
Modified: trunk/framework/test/src/test/java/org/ajax4jsf/model/QueuesManagerTest.java
===================================================================
--- trunk/framework/test/src/test/java/org/ajax4jsf/model/QueuesManagerTest.java 2008-09-29 13:05:58 UTC (rev 10595)
+++ trunk/framework/test/src/test/java/org/ajax4jsf/model/QueuesManagerTest.java 2008-09-29 13:09:43 UTC (rev 10596)
@@ -6,8 +6,6 @@
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.ajax4jsf.tests.MockQueue;
-import junit.framework.TestCase;
-
/**
* @author Konstantin Mishin
*
16 years, 2 months
JBoss Rich Faces SVN: r10595 - in trunk/framework/test/src: test/java/org/ajax4jsf and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-09-29 09:05:58 -0400 (Mon, 29 Sep 2008)
New Revision: 10595
Added:
trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockQueue.java
trunk/framework/test/src/test/java/org/ajax4jsf/model/
trunk/framework/test/src/test/java/org/ajax4jsf/model/QueuesManagerTest.java
Log:
tests for queue
Added: trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockQueue.java
===================================================================
--- trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockQueue.java (rev 0)
+++ trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockQueue.java 2008-09-29 13:05:58 UTC (rev 10595)
@@ -0,0 +1,34 @@
+/**
+ *
+ */
+package org.ajax4jsf.tests;
+
+import org.ajax4jsf.model.Queue;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class MockQueue implements Queue {
+
+ public String getName() {
+ return "name";
+ }
+
+ public Integer getRequestDelay() {
+ return 1;
+ }
+
+ public Integer getTimeout() {
+ return 2;
+ }
+
+ public Boolean isIgnoreDupResponses() {
+ return true;
+ }
+
+ public Boolean isLimitToList() {
+ return false;
+ }
+
+}
Added: trunk/framework/test/src/test/java/org/ajax4jsf/model/QueuesManagerTest.java
===================================================================
--- trunk/framework/test/src/test/java/org/ajax4jsf/model/QueuesManagerTest.java (rev 0)
+++ trunk/framework/test/src/test/java/org/ajax4jsf/model/QueuesManagerTest.java 2008-09-29 13:05:58 UTC (rev 10595)
@@ -0,0 +1,50 @@
+/**
+ *
+ */
+package org.ajax4jsf.model;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.ajax4jsf.tests.MockQueue;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class QueuesManagerTest extends AbstractAjax4JsfTestCase {
+
+ /**
+ * @param name
+ */
+ public QueuesManagerTest(String name) {
+ super(name);
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ public void setUp() throws Exception {
+ super.setUp();
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ public void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /**
+ * Test method for {@link org.ajax4jsf.model.QueuesManager#put(org.ajax4jsf.model.Queue)},
+ * {@link org.ajax4jsf.model.QueuesManager#get(org.ajax4jsf.model.Queue)} and
+ * {@link org.ajax4jsf.model.QueuesManager#remove(java.lang.String)}.
+ */
+ public void test() {
+ MockQueue queue = new MockQueue();
+ QueuesManager.put(queue);
+ assertSame(queue, QueuesManager.get(queue.getName()));
+ assertSame(queue, QueuesManager.remove(queue.getName()));
+ assertNull(QueuesManager.get(queue.getName()));
+ }
+}
16 years, 2 months
JBoss Rich Faces SVN: r10594 - trunk/framework/api/src/main/java/org/ajax4jsf/model.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-09-29 09:05:00 -0400 (Mon, 29 Sep 2008)
New Revision: 10594
Added:
trunk/framework/api/src/main/java/org/ajax4jsf/model/Queue.java
trunk/framework/api/src/main/java/org/ajax4jsf/model/QueuesManager.java
Log:
Interface and manager class for queue.
Added: trunk/framework/api/src/main/java/org/ajax4jsf/model/Queue.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/model/Queue.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/model/Queue.java 2008-09-29 13:05:00 UTC (rev 10594)
@@ -0,0 +1,21 @@
+/**
+ *
+ */
+package org.ajax4jsf.model;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public interface Queue {
+
+ String getName();
+
+ Integer getRequestDelay();
+
+ Integer getTimeout();
+
+ Boolean isLimitToList();
+
+ Boolean isIgnoreDupResponses();
+}
Added: trunk/framework/api/src/main/java/org/ajax4jsf/model/QueuesManager.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/model/QueuesManager.java (rev 0)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/model/QueuesManager.java 2008-09-29 13:05:00 UTC (rev 10594)
@@ -0,0 +1,56 @@
+package org.ajax4jsf.model;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class QueuesManager {
+
+ static private final String MAP_KEY_PREFIX = QueuesManager.class.getSimpleName();
+
+ static public void put(Queue queue, FacesContext context) throws IllegalArgumentException{
+ if (context == null) {
+ context = FacesContext.getCurrentInstance();
+ }
+ String name = queue.getName();
+ String key = MAP_KEY_PREFIX + name;
+ Map<String, Object> attributes = context.getViewRoot().getAttributes();
+ if (!attributes.containsKey(key)) {
+ attributes.put(key, queue);
+ } else {
+ throw new IllegalArgumentException("Queue whis name '" + name + "' has already been used");
+ }
+ }
+
+ static public void put(Queue queue) throws IllegalArgumentException {
+ put(queue, null);
+ }
+
+ static public Queue get(String name, FacesContext context) {
+ if (context == null) {
+ context = FacesContext.getCurrentInstance();
+ }
+ Object object = context.getViewRoot().getAttributes().get(MAP_KEY_PREFIX + name);
+ return (Queue)object;
+ }
+
+ static public Queue get(String name) {
+ return get(name, null);
+ }
+
+ static public Queue remove(String name, FacesContext context) {
+ if (context == null) {
+ context = FacesContext.getCurrentInstance();
+ }
+ Object object = context.getViewRoot().getAttributes().remove(MAP_KEY_PREFIX + name);
+ return (Queue)object;
+ }
+
+ static public Queue remove(String name) {
+ return remove(name, null);
+ }
+}
16 years, 2 months
JBoss Rich Faces SVN: r10593 - in trunk/docs: userguide/en/src/main/docbook/modules and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-09-29 06:49:27 -0400 (Mon, 29 Sep 2008)
New Revision: 10593
Modified:
trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
https://jira.jboss.org/jira/browse/RF-3117 - info about Request Errors and Session Expiration Handling was added to the Dev.Guide and FAQ
Modified: trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml
===================================================================
--- trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2008-09-29 09:18:42 UTC (rev 10592)
+++ trunk/docs/faq/en/src/main/docbook/module/RFCfaq.xml 2008-09-29 10:49:27 UTC (rev 10593)
@@ -2608,6 +2608,62 @@
</context-param>
...]]></programlisting>
</section>
+ <section id="sessionExpiredHandling">
+ <?dbhtml filename="sessionExpiredHandling.html"?>
+ <title>How to handle Request Errors and Session Expiration?</title>
+ <para>
+ In order to redefine standard handlers responsible for processing of different exceptional situations
+ you should take the following steps:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ add to your <property>web.xml</property> the following code:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<context-param>
+ <param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>
+ <param-value>true</param-value>
+</context-param>
+...]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ add custom <emphasis><property>"onError"</property></emphasis>, <emphasis><property>"onExpire"</property></emphasis> handlers:
+ </para>
+ <programlisting role="Java"><![CDATA[...
+A4J.AJAX.onError = function(req,status,message){
+ window.alert("Custom onError handler "+message);
+}
+A4J.AJAX.onExpired = function(loc,expiredMsg){
+ if(window.confirm("Custom onExpired handler "+expiredMsg+" for a location: "+loc)){
+ return loc;
+ } else {
+ return false;
+ }
+}
+...]]></programlisting>
+ <para>
+ For the detailed description see
+ the <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">Request Errors and Session Expiration Handling</ulink> section of the Developer Guide.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <note>
+ <title>Note:</title>
+ <para>
+ Note that custom <emphasis><property>"onError"</property></emphasis>, <emphasis><property>"onExpire"</property></emphasis> handlers
+ do not work under MyFaces. MyFaces handles exception by its internals generating debug page.
+ You could use the following code to prevent such behavior:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<context-param>
+ <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
+ <param-value>false</param-value>
+</context-param>
+...]]></programlisting>
+ </note>
+ </section>
<section id="ajaxCookie">
<?dbhtml filename="ajaxCookie.html"?>
<title>How to add cookie in an AJAX Respond?</title>
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-09-29 09:18:42 UTC (rev 10592)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-09-29 10:49:27 UTC (rev 10593)
@@ -1210,7 +1210,7 @@
<para> To execute your own code on the client in case of an error during Ajax request,
it's necessary to redefine the standard
<code>"A4J.AJAX.onError"</code> method: </para>
- <programlisting role="JAVA"><![CDATA[ A4J.AJAX.onError = function(req,status,message){
+ <programlisting role="JAVA"><![CDATA[ A4J.AJAX.onError = function(req, status, message){
window.alert("Custom onError handler "+message);
}]]></programlisting>
<para> The function defined this way accepts as parameters: </para>
@@ -1245,7 +1245,7 @@
</para>
<programlisting role="JAVA">
-<![CDATA[A4J.AJAX.onExpired = function(loc,expiredMsg){
+<![CDATA[A4J.AJAX.onExpired = function(loc, expiredMsg){
if(window.confirm("Custom onExpired handler "+expiredMsg+" for a location: "+loc)){
return loc;
} else {
@@ -1267,6 +1267,20 @@
</emphasis> event. </para>
</listitem>
</itemizedlist>
+ <note>
+ <title>Note:</title>
+ <para>
+ Note that custom <emphasis><property>"onError"</property></emphasis>, <emphasis><property>"onExpire"</property></emphasis> handlers
+ do not work under MyFaces. MyFaces handles exception by its internals generating debug page.
+ You could use the following code to prevent such behavior:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<context-param>
+ <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
+ <param-value>false</param-value>
+</context-param>
+...]]></programlisting>
+ </note>
<!--note>
<title>Note:</title>
Until the version 1.0.5 the method can't be redefined on <emphasis >
16 years, 2 months
JBoss Rich Faces SVN: r10592 - trunk/samples/extendedDataTable-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2008-09-29 05:18:42 -0400 (Mon, 29 Sep 2008)
New Revision: 10592
Modified:
trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp
Log:
change in demo to reflect adding .rich-filter-input class to filter input
Modified: trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp 2008-09-29 09:18:01 UTC (rev 10591)
+++ trunk/samples/extendedDataTable-sample/src/main/webapp/pages/index.jsp 2008-09-29 09:18:42 UTC (rev 10592)
@@ -18,6 +18,10 @@
height: 100%;
}
+ .rich-filter-input {
+ width: 80%;
+ }
+
.rightColumn {
width: 50%;
height: 100%;
16 years, 2 months
JBoss Rich Faces SVN: r10591 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2008-09-29 05:18:01 -0400 (Mon, 29 Sep 2008)
New Revision: 10591
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
Log:
adding .rich-filter-input class to filter input
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-09-29 08:25:35 UTC (rev 10590)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-09-29 09:18:01 UTC (rev 10591)
@@ -1303,6 +1303,7 @@
.createComponent(UIInput.COMPONENT_TYPE);
filterValueInput.setId(column.getId() + SORT_FILTER_PARAMETER);
filterValueInput.setImmediate(true);
+ filterValueInput.getAttributes().put(HTML.STYLE_CLASS_ATTR, "rich-filter-input");
column.getFacets().put(FILTER_INPUT_FACET_NAME, filterValueInput);
filterValueInput.getAttributes().put(HTML.onclick_ATTRIBUTE,
"Event.stop(event);");
16 years, 2 months
JBoss Rich Faces SVN: r10590 - trunk/ui/inplaceSelect/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-09-29 04:25:35 -0400 (Mon, 29 Sep 2008)
New Revision: 10590
Modified:
trunk/ui/inplaceSelect/src/test/java/org/richfaces/component/InplaceSelectComponentTest.java
Log:
fix test
Modified: trunk/ui/inplaceSelect/src/test/java/org/richfaces/component/InplaceSelectComponentTest.java
===================================================================
--- trunk/ui/inplaceSelect/src/test/java/org/richfaces/component/InplaceSelectComponentTest.java 2008-09-29 08:25:19 UTC (rev 10589)
+++ trunk/ui/inplaceSelect/src/test/java/org/richfaces/component/InplaceSelectComponentTest.java 2008-09-29 08:25:35 UTC (rev 10590)
@@ -34,6 +34,7 @@
javaScripts.add("scripts/combolist.js");
javaScripts.add("scripts/inplaceinput.js");
javaScripts.add("scripts/inplaceselectlist.js");
+ javaScripts.add("scripts/inplaceselectstyles.js");
javaScripts.add("scripts/inplaceselect.js");
javaScripts.add("org/richfaces/renderkit/html/scripts/utils.js");
}
@@ -111,8 +112,7 @@
String scriptBodyString = item.getFirstChild().toString();
assertTrue(scriptBodyString.contains("Richfaces.InplaceSelectList"));
assertTrue(scriptBodyString.contains("Richfaces.InplaceSelect"));
- assertTrue(scriptBodyString.contains("Richfaces.InplaceSelect.CLASSES"));
-
+ assertTrue(scriptBodyString.contains("inplaceSelectUserStyles"));
}
if (StringUtils.isNotBlank(srcAttr)) {
boolean found = false;
16 years, 2 months