Author: nbelaevski
Date: 2009-07-23 13:14:59 -0400 (Thu, 23 Jul 2009)
New Revision: 14990
Removed:
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/HeaderResourceProducer.java
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/HeaderResourceProducer2.java
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/ProducerContext.java
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer.java
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer2.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/org/
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/HeaderResourcesRendererBase.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/ProducerContextImpl.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/PrototypeBasedRendererBase.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/xml/
root/framework/trunk/impl/src/main/java/org/richfaces/model/
Modified:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/context/ViewResources.java
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxComponentRendererBase.java
root/framework/trunk/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java
Log:
https://jira.jboss.org/jira/browse/RF-7563
Deleted:
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/HeaderResourceProducer.java
===================================================================
---
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/HeaderResourceProducer.java 2009-07-23
17:08:50 UTC (rev 14989)
+++
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/HeaderResourceProducer.java 2009-07-23
17:14:59 UTC (rev 14990)
@@ -1,55 +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
- */
-
-package org.ajax4jsf.renderkit;
-
-import java.util.LinkedHashSet;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-/**
- * Interface for renderers, for wich nessesary insert script or style resource in
header.
- * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:50 $
- *
- */
-public interface HeaderResourceProducer {
-
- /**
- * Return set of strings with URI's of nessesary scripts.
- * Use linked set to preserve insertion order
- * @param context - current faces context.
- * @param component TODO
- * @return - set of URI's or null
- */
- public LinkedHashSet<String> getHeaderScripts(FacesContext context, UIComponent
component);
-
- /**
- * Return set of strings with URI's of nessesary CSS styles.
- * Use linked set to preserve insertion order.
- * @param context - current faces context.
- * @param component TODO
- * @return - set of URI's or null
- */
- public LinkedHashSet<String> getHeaderStyles(FacesContext context, UIComponent
component);
-
-}
Deleted:
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/HeaderResourceProducer2.java
===================================================================
---
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/HeaderResourceProducer2.java 2009-07-23
17:08:50 UTC (rev 14989)
+++
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/HeaderResourceProducer2.java 2009-07-23
17:14:59 UTC (rev 14990)
@@ -1,42 +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
- */
-
-package org.ajax4jsf.renderkit;
-
-import java.io.IOException;
-import java.util.Set;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.resource.InternetResource;
-
-/**
- * Interface for renderers, for wich nessesary insert script or style resource in
header.
- * This is the second revision of {@link HeaderResourceProducer} interface that returns
- * arrays of {@link InternetResource} instead of {@link Set}
- * @author nbelaevski(a)exadel.com
- *
- */
-public interface HeaderResourceProducer2 {
-
- public void encodeToHead(FacesContext context, UIComponent component, ProducerContext
pc) throws IOException;
-}
Deleted:
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/ProducerContext.java
===================================================================
---
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/ProducerContext.java 2009-07-23
17:08:50 UTC (rev 14989)
+++
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/ProducerContext.java 2009-07-23
17:14:59 UTC (rev 14990)
@@ -1,35 +0,0 @@
-/**
- * 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.ajax4jsf.renderkit;
-
-
-/**
- * @author Nick Belaevski
- * @since 3.2.2
- */
-
-public interface ProducerContext {
-
- public boolean isProcessStyles();
-
- public boolean isProcessScripts();
-}
Deleted:
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer.java
===================================================================
---
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer.java 2009-07-23
17:08:50 UTC (rev 14989)
+++
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer.java 2009-07-23
17:14:59 UTC (rev 14990)
@@ -1,54 +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
- */
-package org.ajax4jsf.renderkit;
-
-import java.util.LinkedHashSet;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-/**
- * Marker interface for a user-defined resources for a HTML HEAD tag.
- * There resourses must be loaded AFTER all other components.
- * @author asmirnov
- *
- */
-public interface UserResourceRenderer {
-
- /**
- * Return set of strings with URI's of nessesary scripts.
- * Use linked set to preserve insertion order
- * @param context - current faces context.
- * @param component TODO
- * @return - set of URI's or null
- */
- public LinkedHashSet<String> getHeaderScripts(FacesContext context, UIComponent
component);
-
- /**
- * Return set of strings with URI's of nessesary CSS styles.
- * Use linked set to preserve insertion order.
- * @param context - current faces context.
- * @param component TODO
- * @return - set of URI's or null
- */
- public LinkedHashSet<String> getHeaderStyles(FacesContext context, UIComponent
component);
-
-}
Deleted:
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer2.java
===================================================================
---
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer2.java 2009-07-23
17:08:50 UTC (rev 14989)
+++
root/framework/trunk/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer2.java 2009-07-23
17:14:59 UTC (rev 14990)
@@ -1,42 +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
- */
-package org.ajax4jsf.renderkit;
-
-import java.io.IOException;
-import java.util.Set;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.resource.InternetResource;
-
-/**
- * Marker interface for a user-defined resources for a HTML HEAD tag.
- * There resourses must be loaded AFTER all other components.
- * This is the second revision of {@link UserResourceRenderer} interface that returns
- * arrays of {@link InternetResource} instead of {@link Set}
- * @author nbelaevski(a)exadel.com
- *
- */
-public interface UserResourceRenderer2 {
-
- public void encodeToHead(FacesContext context, UIComponent component) throws
IOException;
-}
Modified: root/framework/trunk/impl/src/main/java/org/ajax4jsf/context/ViewResources.java
===================================================================
---
root/framework/trunk/impl/src/main/java/org/ajax4jsf/context/ViewResources.java 2009-07-23
17:08:50 UTC (rev 14989)
+++
root/framework/trunk/impl/src/main/java/org/ajax4jsf/context/ViewResources.java 2009-07-23
17:14:59 UTC (rev 14990)
@@ -47,12 +47,6 @@
import org.ajax4jsf.component.QueueRegistry;
import org.ajax4jsf.io.SAXResponseWriter;
-import org.ajax4jsf.renderkit.HeaderResourceProducer;
-import org.ajax4jsf.renderkit.HeaderResourceProducer2;
-import org.ajax4jsf.renderkit.ProducerContext;
-import org.ajax4jsf.renderkit.ProducerContextImpl;
-import org.ajax4jsf.renderkit.UserResourceRenderer;
-import org.ajax4jsf.renderkit.UserResourceRenderer2;
import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.resource.InternetResource;
import org.ajax4jsf.resource.InternetResourceBase;
@@ -72,7 +66,7 @@
/**
* @author Nick Belaevski
*/
-
+//TODO remove -
https://jira.jboss.org/jira/browse/RFPL-42
public class ViewResources {
private static final String INIT_PARAMETER_PREFIX = "_init_parameter_";
@@ -243,8 +237,6 @@
private boolean ajaxRequest;
- private ProducerContext producerContext;
-
public static final String COMPONENT_RESOURCE_LINK_CLASS = "component";
public static final String USER_RESOURCE_LINK_CLASS = "user";
@@ -305,59 +297,6 @@
return false;
}
- protected void processComponent(FacesContext context, UIComponent component) throws
IOException, FacesException {
- Renderer renderer = getRenderer(context, component);
- if (null != renderer) {
- ResponseWriter oldResponseWriter = context.getResponseWriter();
- try {
- if ((processScripts || processStyles)
- && (renderer instanceof HeaderResourceProducer2 || renderer instanceof
HeaderResourceProducer)) {
-
- context.setResponseWriter(componentWriter);
-
- if (renderer instanceof HeaderResourceProducer2) {
- HeaderResourceProducer2 producer = (HeaderResourceProducer2) renderer;
-
- if (producerContext == null) {
- producerContext = new ProducerContextImpl(processScripts, processStyles);
- }
-
- producer.encodeToHead(context, component, producerContext);
- } else if (renderer instanceof HeaderResourceProducer) {
- HeaderResourceProducer producer = (HeaderResourceProducer) renderer;
-
- if (processScripts) {
- encodeResources(context, resourceBuilder.getScriptRenderer(),
producer.getHeaderScripts(context,
- component));
- }
- if (processStyles) {
- encodeResources(context, resourceBuilder.getStyleRenderer(),
producer.getHeaderStyles(context,
- component));
- }
- }
- } else if (renderer instanceof UserResourceRenderer2) {
- context.setResponseWriter(userWriter);
-
- UserResourceRenderer2 producer = (UserResourceRenderer2) renderer;
- producer.encodeToHead(context, component);
- } else if (renderer instanceof UserResourceRenderer) {
- context.setResponseWriter(userWriter);
-
- UserResourceRenderer producer = (UserResourceRenderer) renderer;
-
- encodeResources(context, resourceBuilder.getScriptRenderer(),
producer.getHeaderScripts(context,
- component));
-
- encodeResources(context, resourceBuilder.getStyleRenderer(),
producer.getHeaderStyles(context,
- component));
- }
- } finally {
- context.setResponseWriter(oldResponseWriter);
- }
- }
-
- }
-
/**
* Find renderer for given component.
*
@@ -376,24 +315,6 @@
}
}
- protected void traverse(FacesContext context, UIComponent component) throws IOException,
FacesException {
- if (component != null) {
- processComponent(context, component);
-
- if (component.getChildCount() > 0) {
- for (UIComponent child : component.getChildren()) {
- traverse(context, child);
- }
- }
-
- if (component.getFacetCount() > 0) {
- for (UIComponent child : component.getFacets().values()) {
- traverse(context, child);
- }
- }
- }
- }
-
public void processHeadResources(FacesContext context) throws FacesException {
RenderKitFactory rkFactory = (RenderKitFactory) FactoryFinder
@@ -511,7 +432,7 @@
}
//traverse components
- traverse(context, context.getViewRoot());
+ //traverse(context, context.getViewRoot());
context.setResponseWriter(componentWriter);
Modified:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxComponentRendererBase.java
===================================================================
---
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxComponentRendererBase.java 2009-07-23
17:08:50 UTC (rev 14989)
+++
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/AjaxComponentRendererBase.java 2009-07-23
17:14:59 UTC (rev 14990)
@@ -32,7 +32,7 @@
* @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:49 $
*
*/
-public abstract class AjaxComponentRendererBase extends HeaderResourcesRendererBase
implements HeaderResourceProducer2 {
+public abstract class AjaxComponentRendererBase extends RendererBase {
// private InternetResource ajaxScript =
getResource("/com/exadel/vcp/framework/ajax/scripts/AJAX.js");
private static final String AJAX_SCRIPT = AjaxScript.class.getName();
Deleted:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/HeaderResourcesRendererBase.java
===================================================================
---
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/HeaderResourcesRendererBase.java 2009-07-23
17:08:50 UTC (rev 14989)
+++
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/HeaderResourcesRendererBase.java 2009-07-23
17:14:59 UTC (rev 14990)
@@ -1,156 +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
- */
-
-package org.ajax4jsf.renderkit;
-
-import java.io.IOException;
-import java.util.LinkedHashSet;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.resource.InternetResource;
-
-/**
- * Base renderer for components used JavaScripts and Styles in header. In real
- * class override getScripts or/and getStyles methods
- *
- * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:51 $
- *
- */
-public abstract class HeaderResourcesRendererBase extends RendererBase
- implements HeaderResourceProducer2, HeaderResourceProducer {
-
- /*
- * (non-Javadoc)
- *
- * @see
org.ajax4jsf.renderkit.HeaderResourceProducer#getHeaderScripts(javax.faces.context.FacesContext)
- */
- public LinkedHashSet<String> getHeaderScripts(FacesContext context,
- UIComponent component) {
- return getUrisSet(context, getScripts(), component);
- }
-
- /**
- * Hoock method to return array of scripts resources to store in head.
- *
- * @return
- */
- protected InternetResource[] getScripts() {
- // return nothing by default.
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
org.ajax4jsf.renderkit.HeaderResourceProducer#getHeaderStyles(javax.faces.context.FacesContext)
- */
- public LinkedHashSet<String> getHeaderStyles(FacesContext context,
- UIComponent component) {
- return getUrisSet(context, getStyles(), component);
- }
-
- /**
- * Hoock method to return array of styles resources to store in head
- *
- * @return
- */
- protected InternetResource[] getStyles() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /**
- * @param context
- * @param resources
- * @param component
- * TODO
- * @return
- */
- private LinkedHashSet<String> getUrisSet(FacesContext context,
- InternetResource[] resources, UIComponent component) {
- if (null != resources) {
- LinkedHashSet<String> uris = new LinkedHashSet<String>(); //
Collections.singleton(ajaxScript.getUri(context,
- // null));
- for (int i = 0; i < resources.length; i++) {
- InternetResource resource = resources[i];
- uris.add(resource.getUri(context, component));
- }
- return uris;
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
org.ajax4jsf.renderkit.RendererBase#preEncodeBegin(javax.faces.context.FacesContext,
- * javax.faces.component.UIComponent)
- */
-// protected void preEncodeBegin(FacesContext context, UIComponent component)
-// throws IOException {
-// if ((null == context.getExternalContext().getRequestMap().get(
-// BaseFilter.RESPONSE_WRAPPER_ATTRIBUTE))
-// /* && (!AjaxRendererUtils.isAjaxRequest(context)) */) {
-// // Filter not used - encode scripts and CSS before component.
-// ExternalContext externalContext = context.getExternalContext();
-// String scriptStrategy = externalContext
-// .getInitParameter(InternetResourceBuilder.LOAD_SCRIPT_STRATEGY_PARAM);
-// if (null == scriptStrategy ||
!InternetResourceBuilder.LOAD_NONE.equals(scriptStrategy)) {
-// encodeResourcesArray(context, component, getScripts());
-// }
-// String styleStrategy = externalContext
-// .getInitParameter(InternetResourceBuilder.LOAD_STYLE_STRATEGY_PARAM);
-// if (null != styleStrategy ||
!InternetResourceBuilder.LOAD_NONE.equals(styleStrategy)) {
-// encodeResourcesArray(context, component, getStyles());
-// }
-// }
-// }
-
- /**
- * @param context
- * @param component
- * @param resources
- * @throws IOException
- */
- protected void encodeResourcesArray(FacesContext context,
- UIComponent component, InternetResource[] resources)
- throws IOException {
- if (resources != null) {
- for (int i = 0; i < resources.length; i++) {
- resources[i].encode(context, component);
- }
- }
- }
-
- public void encodeToHead(FacesContext context, UIComponent component, ProducerContext
pc) throws IOException {
-
- if (pc.isProcessScripts()) {
- encodeResourcesArray(context, component, getScripts());
- }
-
- if (pc.isProcessStyles()) {
- encodeResourcesArray(context, component, getStyles());
- }
- }
-}
Deleted:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/ProducerContextImpl.java
===================================================================
---
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/ProducerContextImpl.java 2009-07-23
17:08:50 UTC (rev 14989)
+++
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/ProducerContextImpl.java 2009-07-23
17:14:59 UTC (rev 14990)
@@ -1,50 +0,0 @@
-/**
- * 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.ajax4jsf.renderkit;
-
-
-/**
- * @author Nick Belaevski
- * @since 3.2.2
- */
-
-public class ProducerContextImpl implements ProducerContext {
-
- private boolean processScripts;
-
- private boolean processStyles;
-
- public boolean isProcessScripts() {
- return processScripts;
- }
-
- public boolean isProcessStyles() {
- return processStyles;
- }
-
- public ProducerContextImpl(boolean processScripts, boolean processStyles) {
- super();
- this.processScripts = processScripts;
- this.processStyles = processStyles;
- }
-
-}
Deleted:
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/PrototypeBasedRendererBase.java
===================================================================
---
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/PrototypeBasedRendererBase.java 2009-07-23
17:08:50 UTC (rev 14989)
+++
root/framework/trunk/impl/src/main/java/org/ajax4jsf/renderkit/PrototypeBasedRendererBase.java 2009-07-23
17:14:59 UTC (rev 14990)
@@ -1,65 +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
- */
-
-package org.ajax4jsf.renderkit;
-
-import java.util.LinkedHashSet;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.javascript.PrototypeScript;
-import org.ajax4jsf.resource.InternetResource;
-
-
-/**
- * @author Maksim Kaszynski
- *
- */
-public abstract class PrototypeBasedRendererBase extends RendererBase implements
HeaderResourceProducer {
-
- protected static final String[] EMPTY_ARRAY = {};
- private InternetResource prototypeScript =
getResource(PrototypeScript.class.getName());
-
- public LinkedHashSet<String> getHeaderScripts(FacesContext context, UIComponent
component) {
- LinkedHashSet<String> scripts = new LinkedHashSet<String>() ; //
Collections.singleton(ajaxScript.getUri(context, null));
- scripts.add(prototypeScript.getUri(context, null));
- String[] additionalScripts = getAdditionalScripts();
- for (int i = 0; i < additionalScripts.length; i++) {
- String resource = additionalScripts[i];
- scripts.add(getResource(resource).getUri(context, null));
- }
- return scripts;
- }
-
- /* (non-Javadoc)
- * @see
org.ajax4jsf.renderkit.HeaderResourceProducer#getHeaderStyles(javax.faces.context.FacesContext)
- */
- public LinkedHashSet<String> getHeaderStyles(FacesContext context, UIComponent
component) {
- // TODO Auto-generated method stub
- return null;
- }
-
- protected String[] getAdditionalScripts() {
- return EMPTY_ARRAY;
- }
-
-}
Modified:
root/framework/trunk/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java
===================================================================
---
root/framework/trunk/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java 2009-07-23
17:08:50 UTC (rev 14989)
+++
root/framework/trunk/impl/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java 2009-07-23
17:14:59 UTC (rev 14990)
@@ -28,7 +28,7 @@
import javax.faces.context.ResponseWriter;
import org.ajax4jsf.io.SAXResponseWriter;
-import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
+import org.ajax4jsf.renderkit.RendererBase;
import org.richfaces.component.TemplateComponent;
import org.xml.sax.ContentHandler;
@@ -37,7 +37,7 @@
* created 22.06.2007
*
*/
-public abstract class TemplateEncoderRendererBase extends HeaderResourcesRendererBase {
+public abstract class TemplateEncoderRendererBase extends RendererBase {
public final boolean getRendersChildren() {
return true;