Author: nbelaevski
Date: 2008-07-21 15:21:34 -0400 (Mon, 21 Jul 2008)
New Revision: 9724
Added:
trunk/framework/api/src/main/java/org/ajax4jsf/renderkit/HeaderResourceProducer2.java
trunk/framework/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer2.java
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java
trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResourceBuilder.java
Log:
Encoding for InternetResource implemented
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java 2008-07-21
19:21:27 UTC (rev 9723)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java 2008-07-21
19:21:34 UTC (rev 9724)
@@ -16,14 +16,13 @@
public abstract class AjaxContext {
- public static final String SCRIPTS_PARAMETER =
"org.ajax4jsf.framework.HEADER_SCRIPTS";
- public static final String STYLES_PARAMETER =
"org.ajax4jsf.framework.HEADER_STYLES";
- public static final String USER_STYLES_PARAMETER =
"org.ajax4jsf.framework.HEADER_USER_STYLES";
public static final String RESPONSE_DATA_KEY = "_ajax:data";
static final String SERVICE_RESOURCE = "META-INF/services/"
+ AjaxContext.class.getName();
private static final String DEFAULT_CONTEXT_CLASS =
"org.ajax4jsf.context.AjaxContextImpl";
+ public static final String HEAD_EVENTS_PARAMETER =
"org.ajax4jsf.framework.HEAD_EVENTS_LIST";
+
/**
* Key for keep request state information in request-scope attributes.
*/
Added:
trunk/framework/api/src/main/java/org/ajax4jsf/renderkit/HeaderResourceProducer2.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/renderkit/HeaderResourceProducer2.java
(rev 0)
+++
trunk/framework/api/src/main/java/org/ajax4jsf/renderkit/HeaderResourceProducer2.java 2008-07-21
19:21:34 UTC (rev 9724)
@@ -0,0 +1,42 @@
+/**
+ * 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.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 extends HeaderResourceProducer {
+
+ public void encodeToHead(FacesContext context, boolean processStyles,
+ boolean processScripts) throws IOException;
+}
Added:
trunk/framework/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer2.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer2.java
(rev 0)
+++
trunk/framework/api/src/main/java/org/ajax4jsf/renderkit/UserResourceRenderer2.java 2008-07-21
19:21:34 UTC (rev 9724)
@@ -0,0 +1,20 @@
+package org.ajax4jsf.renderkit;
+
+import java.util.Set;
+
+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 extends UserResourceRenderer {
+
+ public void encodeToHead(FacesContext context);
+}
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResourceBuilder.java
===================================================================
---
trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResourceBuilder.java 2008-07-21
19:21:27 UTC (rev 9723)
+++
trunk/framework/api/src/main/java/org/ajax4jsf/resource/InternetResourceBuilder.java 2008-07-21
19:21:34 UTC (rev 9724)
@@ -53,12 +53,6 @@
public static final String STD_CONTROLS_SKINNING_CLASSES_PARAM =
"org.richfaces.CONTROL_SKINNING_CLASSES";
public static final String ENABLE = "enable";
- public static final String STD_CONTROLS_BASIC_STYLE =
"/org/richfaces/renderkit/html/css/basic.xcss";
- public static final String STD_CONTROLS_BASIC_CLASSES_STYLE =
"/org/richfaces/renderkit/html/css/basic_classes.xcss";
-
- public static final String STD_CONTROLS_EXTENDED_STYLE =
"/org/richfaces/renderkit/html/css/extended.xcss";
- public static final String STD_CONTROLS_EXTENDED_CLASSES_STYLE =
"/org/richfaces/renderkit/html/css/extended_classes.xcss";
-
/**
* Get application start time for check resources modification time.
*
@@ -203,4 +197,5 @@
super();
}
+ public abstract ResourceRenderer getRenderer(String name);
}
\ No newline at end of file
Show replies by date