JBoss Rich Faces SVN: r15066 - in branches/community/3.3.X/samples/richfaces-demo/src/main: webapp/WEB-INF and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2009-07-30 09:59:53 -0400 (Thu, 30 Jul 2009)
New Revision: 15066
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataModel.java
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataProvider.java
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionItem.java
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
Log:
https://jira.jboss.org/jira/browse/RF-7012
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataModel.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataModel.java 2009-07-30 13:30:00 UTC (rev 15065)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataModel.java 2009-07-30 13:59:53 UTC (rev 15066)
@@ -1,11 +1,13 @@
package org.richfaces.demo.extendeddatamodel;
import java.io.IOException;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import javax.faces.application.Application;
import javax.faces.context.FacesContext;
import org.ajax4jsf.model.DataVisitor;
@@ -85,7 +87,7 @@
* We strongly recommend use of local cache in that method.
*/
@Override
- public Object getRowData() {
+ public AuctionItem getRowData() {
if (currentPk==null) {
return null;
} else {
@@ -156,21 +158,61 @@
return null;
}
}
+
+ private <V> V lookupInContext(String expression, Class<? extends V> c) {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ Application application = facesContext.getApplication();
+ return c.cast(application.evaluateExpressionGet(facesContext, MessageFormat.format("#'{'{0}'}'", expression), c));
+ }
+
+ private String auctionDataModelExpressionString;
+
+ private String auctionDataProviderExpressionString;
+
+
/**
* This is helper method that is called by framework after model update. In must delegate actual database update to
* Data Provider.
*/
@Override
public void update() {
- getDataProvider().update();
+ AuctionDataModel auctionDataModel = lookupInContext(auctionDataModelExpressionString, AuctionDataModel.class);
+ Object savedKey = getRowKey();
+ for (Integer key : wrappedKeys) {
+ auctionDataModel.setRowKey(key);
+ auctionDataModel.getRowData().setBid(wrappedData.get(key).getBid());
+ }
+ setRowKey(savedKey);
+ //getDataProvider().update();
+
+ this.wrappedData.clear();
+ this.wrappedKeys.clear();
+ resetDataProvider();
}
+
+ protected void resetDataProvider() {
+ this.dataProvider = null;
+ }
public AuctionDataProvider getDataProvider() {
+ if (dataProvider == null) {
+ dataProvider = lookupInContext(auctionDataProviderExpressionString, AuctionDataProvider.class);
+ }
return dataProvider;
}
-
- public void setDataProvider(AuctionDataProvider dataProvider) {
- this.dataProvider = dataProvider;
+ public String getAuctionDataModelExpressionString() {
+ return auctionDataModelExpressionString;
}
+ public void setAuctionDataModelExpressionString(
+ String auctionDataModelExpressionString) {
+ this.auctionDataModelExpressionString = auctionDataModelExpressionString;
+ }
+ public String getAuctionDataProviderExpressionString() {
+ return auctionDataProviderExpressionString;
+ }
+ public void setAuctionDataProviderExpressionString(
+ String auctionDataProviderExpressionString) {
+ this.auctionDataProviderExpressionString = auctionDataProviderExpressionString;
+ }
}
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataProvider.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataProvider.java 2009-07-30 13:30:00 UTC (rev 15065)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionDataProvider.java 2009-07-30 13:59:53 UTC (rev 15066)
@@ -1,11 +1,12 @@
package org.richfaces.demo.extendeddatamodel;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.richfaces.demo.common.RandomDataHelper;
-public class AuctionDataProvider {
+public class AuctionDataProvider implements Serializable{
private String allDescriptions[] = {
"Digital temperature sensor IC LM75A SOIC8 +Free adapter",
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionItem.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionItem.java 2009-07-30 13:30:00 UTC (rev 15065)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendeddatamodel/AuctionItem.java 2009-07-30 13:59:53 UTC (rev 15066)
@@ -1,19 +1,23 @@
package org.richfaces.demo.extendeddatamodel;
+import java.io.Serializable;
+
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
-public class AuctionItem {
+public class AuctionItem implements Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = -775342254945959655L;
private Integer pk;
private String description;
private Double bid;
private Double highestBid;
private Integer qtyRequested;
private Integer qtyAvialable;
- private UIComponent bidInput;
- private UIComponent qtyInput;
private boolean won = false;
private boolean loose = false;
private Double amount;
@@ -78,21 +82,4 @@
ctx.addMessage(event.getComponent().getClientId(ctx), new FacesMessage(FacesMessage.SEVERITY_ERROR,"Bid value is missing","You must provide bid value"));
}
}
-
- public UIComponent getBidInput() {
- return bidInput;
- }
-
- public void setBidInput(UIComponent bidInput) {
- this.bidInput = bidInput;
- }
-
- public UIComponent getQtyInput() {
- return qtyInput;
- }
-
- public void setQtyInput(UIComponent qtyInput) {
- this.qtyInput = qtyInput;
- }
-
}
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2009-07-30 13:30:00 UTC (rev 15065)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2009-07-30 13:59:53 UTC (rev 15066)
@@ -277,10 +277,15 @@
<managed-bean-class>org.richfaces.demo.extendeddatamodel.AuctionDataModel</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
- <property-name>dataProvider</property-name>
- <property-class>org.richfaces.demo.extendeddatamodel.AuctionDataProvider</property-class>
- <value>#{auctionDataProvider}</value>
+ <property-name>auctionDataModelExpressionString</property-name>
+ <property-class>java.lang.String</property-class>
+ <value>auctionDataModel</value>
</managed-property>
+ <managed-property>
+ <property-name>auctionDataProviderExpressionString</property-name>
+ <property-class>java.lang.String</property-class>
+ <value>auctionDataProvider</value>
+ </managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>mediaBean</managed-bean-name>
15 years, 5 months
JBoss Rich Faces SVN: r15065 - branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-07-30 09:30:00 -0400 (Thu, 30 Jul 2009)
New Revision: 15065
Modified:
branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/RichTableMenuRenderer.java
Log:
RF-7583
Modified: branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/RichTableMenuRenderer.java
===================================================================
--- branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/RichTableMenuRenderer.java 2009-07-30 12:11:14 UTC (rev 15064)
+++ branches/community/3.3.X/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/RichTableMenuRenderer.java 2009-07-30 13:30:00 UTC (rev 15065)
@@ -353,6 +353,7 @@
JSFunction invocation = new JSFunction(
"Richfaces.componentControl.performOperation");
invocation.addParameter(new JSReference("event"));
+ invocation.addParameter(new JSReference("event.type"));
invocation.addParameter(new JSReference("menuId"));
invocation.addParameter("show");
// invocation.addParameter(new JSReference("{'columnId':columnId}"));
15 years, 5 months
JBoss Rich Faces SVN: r15064 - branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/util.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-07-30 08:11:14 -0400 (Thu, 30 Jul 2009)
New Revision: 15064
Modified:
branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java
Log:
PickList: converterMessage attribute does not work.
https://jira.jboss.org/jira/browse/RF-7495
Modified: branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java
===================================================================
--- branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java 2009-07-30 12:08:33 UTC (rev 15063)
+++ branches/community/3.3.X/framework/impl/src/main/java/org/ajax4jsf/util/SelectUtils.java 2009-07-30 12:11:14 UTC (rev 15064)
@@ -34,6 +34,7 @@
import javax.el.ELContext;
import javax.el.ValueExpression;
import javax.faces.FacesException;
+import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.component.UIOutput;
@@ -180,8 +181,7 @@
arrayComponentType == null ? Object.class
: arrayComponentType, len);
for (int i = 0; i < len; i++) {
- convertedValues[i] = converter.getAsObject(facesContext,
- component, submittedValue[i]);
+ convertedValues[i] = getConvertedValue(facesContext, component, submittedValue[i], converter);
}
return convertedValues;
}
@@ -196,8 +196,10 @@
int len = submittedValue.length;
List<Object> lst = new ArrayList<Object>(len);
for (int i = 0; i < len; i++) {
- lst.add(converter.getAsObject(facesContext, component,
- submittedValue[i]));
+ Object convertedValue = getConvertedValue(facesContext, component, submittedValue[i], converter);
+ if (convertedValue != null) {
+ lst.add(convertedValue);
+ }
}
return lst;
}
@@ -211,8 +213,10 @@
int len = submittedValue.length;
Object convertedValues = Array.newInstance(arrayComponentType, len);
for (int i = 0; i < len; i++) {
- Array.set(convertedValues, i, converter.getAsObject(
- facesContext, component, submittedValue[i]));
+ Object convertedValue = getConvertedValue(facesContext, component, submittedValue[i], converter);
+ if (convertedValue != null) {
+ Array.set(convertedValues, i, convertedValue);
+ }
}
return convertedValues;
} else {
@@ -220,14 +224,38 @@
int len = submittedValue.length;
ArrayList<Object> convertedValues = new ArrayList<Object>(len);
for (int i = 0; i < len; i++) {
- convertedValues.add(i, converter.getAsObject(facesContext,
- component, submittedValue[i]));
+ Object convertedValue = getConvertedValue(facesContext, component, submittedValue[i], converter);
+ if (convertedValue != null) {
+ convertedValues.add(i, convertedValue);
+ }
}
return convertedValues.toArray((Object[]) Array.newInstance(
arrayComponentType, len));
}
}
+ private static Object getConvertedValue(FacesContext context,
+ UISelectMany component, String submittedValue, Converter converter) {
+ try {
+ return converter.getAsObject(context, component, submittedValue);
+ } catch (ConverterException e) {
+ addConversionErrorMessage(context, component.getClientId(context),
+ component.getConverterMessage());
+ }
+ return null;
+ }
+
+ private static void addConversionErrorMessage(FacesContext context,
+ String clientId, String converterMessage) {
+
+ if (converterMessage == null) {
+ return;
+ }
+
+ FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, converterMessage, converterMessage);
+ context.addMessage(clientId, message);
+ }
+
public static Object getConvertedUIInputValue(
FacesContext facesContext, UIInput component,
String submittedValue) throws ConverterException{
15 years, 5 months
JBoss Rich Faces SVN: r15063 - branches/community/3.3.X/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-07-30 08:08:33 -0400 (Thu, 30 Jul 2009)
New Revision: 15063
Modified:
branches/community/3.3.X/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
Log:
https://jira.jboss.org/jira/browse/RF-7420
Modified: branches/community/3.3.X/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
===================================================================
--- branches/community/3.3.X/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2009-07-30 11:50:44 UTC (rev 15062)
+++ branches/community/3.3.X/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2009-07-30 12:08:33 UTC (rev 15063)
@@ -40,7 +40,7 @@
destruct: function(isAjax) {
A4J.AJAX.removeListener(this.onBeforeAjaxListener);
- if(isAjax){
+ if(isAjax && this.tinyMCE_editor){
this.tinyMCE_editor.remove();
}
this.onInitInstanceCallbackFunction = null;
@@ -77,7 +77,9 @@
},
onBeforeAjax: function() {
- this.tinyMCE_editor.save();
+ if (this.tinyMCE_editor) {
+ this.tinyMCE_editor.save();
+ }
},
onInitInstanceCallback: function(inst) {
15 years, 5 months
JBoss Rich Faces SVN: r15062 - branches/community/3.3.X/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-07-30 07:50:44 -0400 (Thu, 30 Jul 2009)
New Revision: 15062
Modified:
branches/community/3.3.X/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
https://jira.jboss.org/jira/browse/RF-7600
Modified: branches/community/3.3.X/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- branches/community/3.3.X/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2009-07-30 11:22:59 UTC (rev 15061)
+++ branches/community/3.3.X/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2009-07-30 11:50:44 UTC (rev 15062)
@@ -1133,12 +1133,11 @@
if (!this.params.popup || !this.isVisible) return;
- if (this.isEditorVisible) this.hideEditor();
-
var element = $(this.id);
if (this.invokeEvent("collapse", element))
{
+ if (this.isEditorVisible) this.hideEditor();
Richfaces.removeScrollEventHandlers(this.scrollElements, this.eventOnScroll);
Event.stopObserving(window.document, "click", this.eventOnCollapse, false);
15 years, 5 months
JBoss Rich Faces SVN: r15061 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2009-07-30 07:22:59 -0400 (Thu, 30 Jul 2009)
New Revision: 15061
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/gmap.xml
Log:
https://jira.jboss.org/jira/browse/RF-7615 - adding tip to the 'Details of usage' section about performing the component updates;
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/gmap.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/gmap.xml 2009-07-30 10:19:50 UTC (rev 15060)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/gmap.xml 2009-07-30 11:22:59 UTC (rev 15061)
@@ -203,26 +203,34 @@
</mediaobject>
</figure>
<para>
- To set all these parameters and perform some activity (Zoom
+ To set the controls as well as to perform other activities (Zoom
In/Out etc.) is possible with your JavaScript, i.e. declare
- a name of an object on a
- <property>map</property>
- in the
+ a name of a <property>map</property> object in the
<emphasis>
<property>"gmapVar"</property>
</emphasis>
- attribute and then call the object directly with API
+ attribute and then call the object directly with
<emphasis>
- <property>Google Map</property>
- .
- </emphasis>
+ <property>Google Maps</property>
+ </emphasis> API.
</para>
+
<para>
- For example, to approximate a map for
- <code>gmapVar = "map"</code>
- declared inside the component, call <code>map.zoomIn()</code> on an
- event.
+ For instance, if you have <code>gmapVar = "map"</code> declared for your component, to zoom in a map you should call <code>map.zoomIn()</code> on an
+ event. See also an example of <emphasis role="bold">
+ <property><rich:gmap></property>
+ </emphasis> usage on the <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/gmap.jsf?c=gmap">RichFaces Live Demo</ulink>.
</para>
+
+ <tip>
+ <title>Tip:</title>
+ <para>You do not need to use reRender to perform uptades for the <emphasis role="bold">
+ <property><rich:gmap></property>
+ </emphasis> component. Use the <emphasis>
+ <property>"gmapVar"</property></emphasis> attribute and
+ <ulink url="http://code.google.com/intl/ru/apis/maps/documentation/reference.html">Google Maps native API</ulink> instead as it's described above.</para>
+ </tip>
+
<para>
Moreover, to add e.g. some JavaScript effects, events
defined on it are used.
15 years, 5 months
JBoss Rich Faces SVN: r15060 - branches/community/3.3.X/ui/inplaceSelect/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-07-30 06:19:50 -0400 (Thu, 30 Jul 2009)
New Revision: 15060
Modified:
branches/community/3.3.X/ui/inplaceSelect/src/main/config/component/inplaceselect.xml
Log:
https://jira.jboss.org/jira/browse/RF-7609 inplaces: onchange behaviour is implemented - attribute description is updated
Modified: branches/community/3.3.X/ui/inplaceSelect/src/main/config/component/inplaceselect.xml
===================================================================
--- branches/community/3.3.X/ui/inplaceSelect/src/main/config/component/inplaceselect.xml 2009-07-30 10:10:24 UTC (rev 15059)
+++ branches/community/3.3.X/ui/inplaceSelect/src/main/config/component/inplaceselect.xml 2009-07-30 10:19:50 UTC (rev 15060)
@@ -221,7 +221,7 @@
<property>
<name>onviewactivated</name>
<classname>java.lang.String</classname>
- <description>The client-side script method to be called when the component view state is activated</description>
+ <description>The client-side script method to be called when the component view state is activated. onviewactivated fires request only if the value is changed</description>
</property>
<property hidden="true">
<name>selectOnEdit</name>
15 years, 5 months
JBoss Rich Faces SVN: r15059 - root/framework/trunk/impl/src/main/resources/META-INF.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-07-30 06:10:24 -0400 (Thu, 30 Jul 2009)
New Revision: 15059
Added:
root/framework/trunk/impl/src/main/resources/META-INF/cache.faces-config.xml
Log:
Added: root/framework/trunk/impl/src/main/resources/META-INF/cache.faces-config.xml
===================================================================
--- root/framework/trunk/impl/src/main/resources/META-INF/cache.faces-config.xml (rev 0)
+++ root/framework/trunk/impl/src/main/resources/META-INF/cache.faces-config.xml 2009-07-30 10:10:24 UTC (rev 15059)
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<faces-config xmlns="http://java.sun.com/xml/ns/javaee" version="2.0">
+ <application>
+ <system-event-listener>
+ <system-event-listener-class>org.ajax4jsf.event.CacheInitializationListener</system-event-listener-class>
+ <system-event-class>javax.faces.event.PreDestroyApplicationEvent</system-event-class>
+ </system-event-listener>
+ <system-event-listener>
+ <system-event-listener-class>org.ajax4jsf.event.CacheInitializationListener</system-event-listener-class>
+ <system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
+ </system-event-listener>
+ </application>
+
+</faces-config>
\ No newline at end of file
15 years, 5 months
JBoss Rich Faces SVN: r15058 - root/examples/trunk/components/core-demo/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-07-30 06:09:21 -0400 (Thu, 30 Jul 2009)
New Revision: 15058
Modified:
root/examples/trunk/components/core-demo/src/main/webapp/WEB-INF/faces-config.xml
Log:
Modified: root/examples/trunk/components/core-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- root/examples/trunk/components/core-demo/src/main/webapp/WEB-INF/faces-config.xml 2009-07-30 10:08:00 UTC (rev 15057)
+++ root/examples/trunk/components/core-demo/src/main/webapp/WEB-INF/faces-config.xml 2009-07-30 10:09:21 UTC (rev 15058)
@@ -8,10 +8,6 @@
<system-event-listener-class>org.richfaces.resource.MapBasedResourceCodecListener</system-event-listener-class>
<system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
</system-event-listener -->
- <system-event-listener>
- <system-event-listener-class>org.ajax4jsf.event.CacheInitializationListener</system-event-listener-class>
- <system-event-class>javax.faces.event.PreDestroyApplicationEvent</system-event-class>
- </system-event-listener>
</application>
<managed-bean>
15 years, 5 months
JBoss Rich Faces SVN: r15057 - root/framework/trunk/impl/src/main/java/org/richfaces/resource.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-07-30 06:08:00 -0400 (Thu, 30 Jul 2009)
New Revision: 15057
Modified:
root/framework/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java
Log:
Modified: root/framework/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java
===================================================================
--- root/framework/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java 2009-07-30 10:06:57 UTC (rev 15056)
+++ root/framework/trunk/impl/src/main/java/org/richfaces/resource/ResourceHandlerImpl.java 2009-07-30 10:08:00 UTC (rev 15057)
@@ -40,9 +40,7 @@
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
-import org.ajax4jsf.cache.AbstractCacheFactory;
import org.ajax4jsf.cache.Cache;
-import org.ajax4jsf.cache.CacheFactory;
import org.ajax4jsf.cache.CacheManager;
import org.richfaces.context.ApplicationContext;
import org.richfaces.util.RichfacesLogger;
@@ -61,7 +59,7 @@
public static final String HANDLER_START_TIME_ATTRIBUTE = ResourceHandlerImpl.class.getName() +
":StartTime";
- public static final String HANDLER_CACHE_NAME = ResourceHandlerImpl.class.getName() + ":CACHE";
+ public static final String RESOURCE_CACHE_NAME = ResourceHandlerImpl.class.getName() + ":CACHE";
private static final Logger LOGGER = RichfacesLogger.RESOURCE.getLogger();
@@ -101,9 +99,7 @@
private void initializeCache(FacesContext facesContext) {
CacheManager cacheManager = CacheManager.getInstance();
Map<?,?> envMap = facesContext.getExternalContext().getInitParameterMap();
- AbstractCacheFactory factory = cacheManager.getCacheFactory(envMap, true);
- this.cache = factory.createCache(HANDLER_CACHE_NAME, envMap);
- this.cache.start();
+ cacheManager.createCache(RESOURCE_CACHE_NAME, envMap);
}
private void markStartTime(FacesContext facesContext) {
15 years, 5 months