JBoss Rich Faces SVN: r12312 - trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-01-16 10:11:15 -0500 (Fri, 16 Jan 2009)
New Revision: 12312
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/web.xml
Log:
Map the seam filter on faces servlet to load CSS and JS
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/web.xml 2009-01-16 15:05:18 UTC (rev 12311)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/web.xml 2009-01-16 15:11:15 UTC (rev 12312)
@@ -100,7 +100,7 @@
</filter>
<filter-mapping>
<filter-name>Seam Filter</filter-name>
- <url-pattern>/*</url-pattern>
+ <servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<!-- JSF -->
16 years, 11 months
JBoss Rich Faces SVN: r12311 - trunk/ui/inputnumber-slider/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-01-16 10:05:18 -0500 (Fri, 16 Jan 2009)
New Revision: 12311
Modified:
trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
Log:
https://jira.jboss.org/jira/browse/RF-5586 - inputNumberSlider: inputPosition attribute: description for 'top' and 'bottom' values should be added
Modified: trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
===================================================================
--- trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2009-01-16 14:33:26 UTC (rev 12310)
+++ trunk/ui/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2009-01-16 15:05:18 UTC (rev 12311)
@@ -291,7 +291,7 @@
<property>
<name>inputPosition</name>
<classname>java.lang.String</classname>
- <description>If "right" the InputText Box would be rendered on the right side of the ruler</description>
+ <description>If "right", the InputText Box would be rendered on the right side of the ruler. If "top", the InputText Box would be rendered on the top of the ruler. If "bottom", the InputText Box would be rendered on the bottom of the ruler.</description>
<defaultvalue><![CDATA["right"]]></defaultvalue>
</property>
&ui_component_attributes;
16 years, 11 months
JBoss Rich Faces SVN: r12310 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-01-16 09:33:26 -0500 (Fri, 16 Jan 2009)
New Revision: 12310
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/testTabServerMode.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
Log:
RF-5550
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/testTabServerMode.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/testTabServerMode.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/testTabServerMode.xhtml 2009-01-16 14:33:26 UTC (rev 12310)
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition template="#{templateBean.template}">
+ <ui:define name="component">
+ <h:form id="_form">
+
+ <h:message id="tab1_message" for="tab1_input"></h:message>
+ <h:message id="tab2_message" for="tab2_input"></h:message>
+ <rich:tabPanel id="panel"
+ switchType="server"
+ selectedTab="#{panelBean.selectedTab}"
+ >
+ <rich:tab id="tab1"
+ label="Tab1">
+ <h:outputText value="Tab1"></h:outputText>
+ <h:inputText id="tab1_input" required="true" value="#{panelBean.inputs['tab1']}" />
+ </rich:tab>
+ <rich:tab id="tab2"
+ label="Tab2">
+ <h:outputText value="Tab2"></h:outputText>
+ <h:inputText id="tab2_input" required="true" value="#{panelBean.inputs['tab2']}" />
+ </rich:tab>
+ </rich:tabPanel>
+ <h:outputText id="inputs" value="#{panelBean.inputs}"></h:outputText>
+ <h:commandButton id="submit" value="Submit"></h:commandButton>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2009-01-16 13:43:25 UTC (rev 12309)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2009-01-16 14:33:26 UTC (rev 12310)
@@ -54,6 +54,8 @@
private final static String DISABLED_TAB_URL = "pages/tabPanel/testDisabledTab.xhtml";
private final static String IMMEDIATE_TAB_URL = "pages/tabPanel/immediateTabTest.xhtml";
+
+ private final static String SERVER_AWARE_MODE_URL = "pages/tabPanel/testTabServerMode.xhtml";
private static Map<String, String> params = new HashMap<String, String>();
@@ -317,6 +319,33 @@
AssertVisible(tester.getClientId("tab2", template), "Tab was not swtiched");
}
+
+ @Test
+ public void testServerAwareMode(Template template) {
+ renderPage(SERVER_AWARE_MODE_URL, template, RESET_METHOD);
+
+ String parentId = getParentId() + FORM_ID;
+ String tab1 = parentId + "tab1";
+ String tab2 = parentId + "tab2";
+ String messageTab1 = tab1 + "_message";
+ String messageTab2 = tab2 + "_message";
+ String inputsId = parentId + "inputs";
+ String submitId = parentId + "submit";
+
+ clickCommandAndWait(submitId);
+
+ assertMessageNotEquals(messageTab1, "", "Validation was not processed for rendered tab");
+ assertMessageEquals(messageTab2, "", "Validation was processed for closed tab");
+
+ setValueById(tab1 + "_input", "Some text");
+ clickCommandAndWait(tab2 + "_lbl");
+ assertMessageEquals(messageTab1, "", "Validation for the first tab should be passed");
+ assertMessageEquals(messageTab2, "", "Validation was processed for closed tab");
+ AssertVisible(tab2, "TabPanel was not swtiched to the second tab");
+ AssertTextEquals(inputsId, "{tab1=Some text}", "Update model for the first tab skipped but should not");
+
+
+ }
private void testListener(String parentId) {
@@ -404,6 +433,27 @@
String commandId = parentId + "controls:reset";
clickCommandAndWait(commandId);
}
+
+ private String getMessage(String id) {
+ if (isPresent(id)) {
+ return getTextById(id);
+ }
+ return "";
+ }
+
+ private void assertMessageEquals(String id, String value, String message) {
+ String m = getMessage(id);
+ if (!value.equals(m)) {
+ Assert.fail(message);
+ }
+ }
+
+ private void assertMessageNotEquals(String id, String value, String message) {
+ String m = getMessage(id);
+ if (value.equals(m)) {
+ Assert.fail(message);
+ }
+ }
@Override
public void sendAjax() {
16 years, 11 months
JBoss Rich Faces SVN: r12309 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-01-16 08:43:25 -0500 (Fri, 16 Jan 2009)
New Revision: 12309
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/immediateTabTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
Log:
Add check for switching of immediate tabs
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/immediateTabTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/immediateTabTest.xhtml 2009-01-16 13:37:35 UTC (rev 12308)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/immediateTabTest.xhtml 2009-01-16 13:43:25 UTC (rev 12309)
@@ -11,6 +11,7 @@
<rich:tabPanel id="componentId"
actionListener="#{autoTestBean.actionListener}"
switchType="ajax"
+ selectedTab="#{panelBean.selectedTab}"
>
<rich:tab id="tab1"
label="Tab1"
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2009-01-16 13:37:35 UTC (rev 12308)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2009-01-16 13:43:25 UTC (rev 12309)
@@ -304,6 +304,7 @@
tester.renderPage(IMMEDIATE_TAB_URL, template, RESET_METHOD);
tester.testImmediate();
+ AssertVisible(tester.getClientId("tab2", template), "Tab was not swtiched");
}
@@ -313,6 +314,7 @@
tester.renderPage(IMMEDIATE_TAB_URL, template, RESET_METHOD);
tester.testImmediateWithExternalValidationFailed();
+ AssertVisible(tester.getClientId("tab2", template), "Tab was not swtiched");
}
16 years, 11 months
JBoss Rich Faces SVN: r12308 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-01-16 08:37:35 -0500 (Fri, 16 Jan 2009)
New Revision: 12308
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/immediateTabTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
Log:
RF-5549
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/immediateTabTest.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/immediateTabTest.xhtml (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tabPanel/immediateTabTest.xhtml 2009-01-16 13:37:35 UTC (rev 12308)
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition template="#{templateBean.autoTestTemplate}">
+ <ui:define name="component">
+ <rich:tabPanel id="componentId"
+ actionListener="#{autoTestBean.actionListener}"
+ switchType="ajax"
+ >
+ <rich:tab id="tab1"
+ label="Tab1"
+ actionListener="#{autoTestBean.actionListener}"
+ immediate="true"
+ reRender="#{autoTestBean.reRender}"
+ >
+ <h:outputText value="Tab1"></h:outputText>
+ </rich:tab>
+ <rich:tab id="tab2"
+ label="Tab2"
+ actionListener="#{autoTestBean.actionListener}"
+ reRender="#{autoTestBean.reRender}"
+ immediate="true">
+ <h:outputText value="Tab2"></h:outputText>
+ </rich:tab>
+ </rich:tabPanel>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2009-01-16 12:22:51 UTC (rev 12307)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TabPanelTest.java 2009-01-16 13:37:35 UTC (rev 12308)
@@ -52,6 +52,8 @@
private final static String TAB_FACET_TEST_URL = "pages/tabPanel/tabFacetTest.xhtml";
private final static String DISABLED_TAB_URL = "pages/tabPanel/testDisabledTab.xhtml";
+
+ private final static String IMMEDIATE_TAB_URL = "pages/tabPanel/immediateTabTest.xhtml";
private static Map<String, String> params = new HashMap<String, String>();
@@ -295,6 +297,24 @@
AssertTextEquals(_inputsId, "{}", "Text for the inputs should not be applied to model in case of disabled tab");
}
+
+ @Test
+ public void testImmediateTab(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(IMMEDIATE_TAB_URL, template, RESET_METHOD);
+
+ tester.testImmediate();
+
+ }
+
+ @Test
+ public void testImmediateTabWithExternalValidationFailure(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(IMMEDIATE_TAB_URL, template, RESET_METHOD);
+
+ tester.testImmediateWithExternalValidationFailed();
+
+ }
private void testListener(String parentId) {
16 years, 11 months
JBoss Rich Faces SVN: r12307 - in trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd: handler and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-01-16 07:22:51 -0500 (Fri, 16 Jan 2009)
New Revision: 12307
Added:
trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/Component.java
trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/Components.java
trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/ComponentsHandler.java
Removed:
trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/elements/
trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/DefaultRichHandler.java
trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/RichComponentsHandler.java
trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/ScriptsHandler.java
trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/selector/
Modified:
trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/mojo/CreateScriptMojo.java
Log:
Added: trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/Component.java
===================================================================
--- trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/Component.java (rev 0)
+++ trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/Component.java 2009-01-16 12:22:51 UTC (rev 12307)
@@ -0,0 +1,76 @@
+package org.richfaces.cdk.rd;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Component {
+
+ private String componentName;
+
+ private List <String> scripts = new ArrayList<String>();
+
+ private List <String> styles = new ArrayList<String>();
+
+
+ public String getComponentName() {
+ return componentName;
+ }
+
+ public void setComponentName(String componentName) {
+ this.componentName = componentName;
+ }
+
+ public void addScript(String script){
+ scripts.add(script);
+ }
+
+ public void addStyle(String style){
+ styles.add(style);
+ }
+
+ public List <String> getStyles() {
+ return this.styles;
+ }
+
+ public List <String> getScripts() {
+ return this.scripts;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((componentName == null) ? 0 : componentName.hashCode());
+ result = prime * result + ((scripts == null) ? 0 : scripts.hashCode());
+ result = prime * result + ((styles == null) ? 0 : styles.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final Component other = (Component) obj;
+ if (componentName == null) {
+ if (other.componentName != null)
+ return false;
+ } else if (!componentName.equals(other.componentName))
+ return false;
+ if (scripts == null) {
+ if (other.scripts != null)
+ return false;
+ } else if (!scripts.equals(other.scripts))
+ return false;
+ if (styles == null) {
+ if (other.styles != null)
+ return false;
+ } else if (!styles.equals(other.styles))
+ return false;
+ return true;
+ }
+
+}
Added: trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/Components.java
===================================================================
--- trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/Components.java (rev 0)
+++ trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/Components.java 2009-01-16 12:22:51 UTC (rev 12307)
@@ -0,0 +1,60 @@
+package org.richfaces.cdk.rd;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Components {
+
+ private String namespace;
+
+ private List <Component> components = new ArrayList<Component> ();
+
+ public String getNamespace() {
+ return namespace;
+ }
+
+ public void setNamespace(String namespace) {
+ this.namespace = namespace;
+ }
+
+ public void addComponent(Component component) {
+ components.add(component);
+ }
+
+ public List <Component> getComponents() {
+ return this.components;
+ }
+
+
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((components == null) ? 0 : components.hashCode());
+ result = prime * result + ((namespace == null) ? 0 : namespace.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final Components other = (Components) obj;
+ if (components == null) {
+ if (other.components != null)
+ return false;
+ } else if (!components.equals(other.components))
+ return false;
+ if (namespace == null) {
+ if (other.namespace != null)
+ return false;
+ } else if (!namespace.equals(other.namespace))
+ return false;
+ return true;
+ }
+}
Added: trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/ComponentsHandler.java
===================================================================
--- trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/ComponentsHandler.java (rev 0)
+++ trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/ComponentsHandler.java 2009-01-16 12:22:51 UTC (rev 12307)
@@ -0,0 +1,136 @@
+package org.richfaces.cdk.rd.handler;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.maven.plugin.logging.Log;
+import org.richfaces.cdk.rd.Component;
+import org.richfaces.cdk.rd.Components;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class ComponentsHandler extends DefaultHandler{
+
+
+// private Set <PrefixMapping> prefixList = new HashSet<PrefixMapping>();
+//
+// private Set <String> userNamespaces = new HashSet<String>();
+//
+// public static String RICH_DEFAULT = "http://richfaces.org/rich";
+//
+// public static String A4J_DEFAULT = "http://richfaces.org/a4j";
+
+ private Log log;
+
+ private List <Components> components;
+
+ private String tempString;
+
+ private Set <String> scripts = new HashSet<String>();
+
+ private Set <String> styles = new HashSet<String>();
+
+// @Override
+// public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
+// for (PrefixMapping prefix: prefixList) {
+//
+// String prefixUri = prefix.getUri();
+// String qname = prefix.getPrefix();
+//
+// if(uri.equals(prefixUri) && name.startsWith(qname)) {
+// getResult().add(localName);
+// }
+// }
+// }
+
+// @Override
+// public void startPrefixMapping(String prefix, String uri) throws SAXException {
+// getLog().info("Process mapping: prefix: " + prefix + " uri: " + uri );
+//
+// if (userNamespaces != null && userNamespaces.contains(uri)) {
+// PrefixMapping prefixMapping = new PrefixMapping(prefix, uri);
+// addPrefixMapping(prefixMapping);
+// }
+
+// }
+ @Override
+ public void characters(char[] ch, int start, int length) throws SAXException {
+ tempString = new String(ch, start, length);
+ }
+
+ @Override
+ public void endElement(String uri, String localName, String name) throws SAXException {
+ for (Components library: components) {
+ if(library.getNamespace().equals(uri)) {
+ List <Component> components = library.getComponents();
+ for(Component component : components ){
+ if(localName.equals(component.getComponentName())) {
+ collectScripts(component.getScripts());
+ collectStyles(component.getScripts());
+ }
+ }
+ }
+ }
+ }
+
+ private void collectStyles(Collection <String> styles) {
+ this.styles.addAll(styles);
+ }
+
+ private void collectScripts(Collection <String> scripts) {
+ this.scripts.addAll(scripts);
+ }
+
+ public Set <String> getStyles() {
+ return this.styles;
+ }
+
+ public Set <String> getScripts() {
+ return this.scripts;
+ }
+
+ public List<Components> getComponents() {
+ return components;
+ }
+
+ public void setComponents(List<Components> components) {
+ this.components = components;
+ }
+
+ @Override
+ public void fatalError(SAXParseException e) throws SAXException {
+ }
+
+ public Log getLog() {
+ return log;
+ }
+
+ public void setLog(Log log) {
+ this.log = log;
+ }
+
+
+// public void addNamespaces(Collection <String>namespaces) {
+// this.userNamespaces.addAll(namespaces);
+// }
+//
+// public Collection <String> getNamespaces() {
+// if(userNamespaces.isEmpty() || !(userNamespaces.contains(RICH_DEFAULT) && userNamespaces.contains(A4J_DEFAULT))) {
+// userNamespaces.add(RICH_DEFAULT);
+// userNamespaces.add(A4J_DEFAULT);
+// }
+// return this.userNamespaces;
+// }
+//
+// public void addPrefixMapping(PrefixMapping prefixMapping) {
+// prefixList.add(prefixMapping);
+// }
+//
+}
Deleted: trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/DefaultRichHandler.java
===================================================================
--- trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/DefaultRichHandler.java 2009-01-16 10:58:26 UTC (rev 12306)
+++ trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/DefaultRichHandler.java 2009-01-16 12:22:51 UTC (rev 12307)
@@ -1,39 +0,0 @@
-package org.richfaces.cdk.rd.handler;
-
-import java.util.Set;
-
-import org.apache.maven.plugin.logging.Log;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * @author Anton Belevich
- *
- */
-public abstract class DefaultRichHandler extends DefaultHandler {
-
- private Log log;
-
- private Set result;
-
- public Set getResult() {
- return result;
- }
-
- public void setResult(Set result) {
- this.result = result;
- }
-
- @Override
- public void fatalError(SAXParseException e) throws SAXException {
- }
-
- public Log getLog() {
- return log;
- }
-
- public void setLog(Log log) {
- this.log = log;
- }
-}
Deleted: trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/RichComponentsHandler.java
===================================================================
--- trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/RichComponentsHandler.java 2009-01-16 10:58:26 UTC (rev 12306)
+++ trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/RichComponentsHandler.java 2009-01-16 12:22:51 UTC (rev 12307)
@@ -1,68 +0,0 @@
-package org.richfaces.cdk.rd.handler;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.richfaces.cdk.rd.elements.PrefixMapping;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-/**
- * @author Anton Belevich
- *
- */
-public class RichComponentsHandler extends DefaultRichHandler {
-
-
- private Set <PrefixMapping> prefixList = new HashSet<PrefixMapping>();
-
- private Set <String> userNamespaces = new HashSet<String>();
-
- public static String RICH_DEFAULT = "http://richfaces.org/rich";
-
- public static String A4J_DEFAULT = "http://richfaces.org/a4j";
-
-
-
- @Override
- public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
- for (PrefixMapping prefix: prefixList) {
-
- String prefixUri = prefix.getUri();
- String qname = prefix.getPrefix();
-
- if(uri.equals(prefixUri) && name.startsWith(qname)) {
- getResult().add(localName);
- }
- }
- }
-
- @Override
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- getLog().info("Process mapping: prefix: " + prefix + " uri: " + uri );
-
- if (userNamespaces != null && userNamespaces.contains(uri)) {
- PrefixMapping prefixMapping = new PrefixMapping(prefix, uri);
- addPrefixMapping(prefixMapping);
- }
-
- }
-
- public void addNamespaces(Collection <String>namespaces) {
- this.userNamespaces.addAll(namespaces);
- }
-
- public Collection <String> getNamespaces() {
- if(userNamespaces.isEmpty() || !(userNamespaces.contains(RICH_DEFAULT) && userNamespaces.contains(A4J_DEFAULT))) {
- userNamespaces.add(RICH_DEFAULT);
- userNamespaces.add(A4J_DEFAULT);
- }
- return this.userNamespaces;
- }
-
- public void addPrefixMapping(PrefixMapping prefixMapping) {
- prefixList.add(prefixMapping);
- }
-
-}
Deleted: trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/ScriptsHandler.java
===================================================================
--- trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/ScriptsHandler.java 2009-01-16 10:58:26 UTC (rev 12306)
+++ trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/handler/ScriptsHandler.java 2009-01-16 12:22:51 UTC (rev 12307)
@@ -1,47 +0,0 @@
-package org.richfaces.cdk.rd.handler;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-public class ScriptsHandler extends DefaultRichHandler {
-
- private Set lookUpResources;
-
- private boolean collect = false;
-
- private String temp;
-
-
- public ScriptsHandler(Set lookUpResources) {
- this.lookUpResources = lookUpResources;
- }
-
- @Override
- public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
- }
-
- @Override
- public void characters(char[] ch, int start, int length) throws SAXException {
- temp = new String(ch,start,length);
- }
-
- @Override
- public void endElement(String uri, String localName, String name) throws SAXException {
-
- if(name.equalsIgnoreCase("name")) {
- if(lookUpResources.contains(temp)) {
- collect = true;
- } else {
- collect = false;
- }
- }
-
- if(name.equalsIgnoreCase("script") && collect) {
- getResult().add(temp);
- }
- }
-
-}
Modified: trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/mojo/CreateScriptMojo.java
===================================================================
--- trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/mojo/CreateScriptMojo.java 2009-01-16 10:58:26 UTC (rev 12306)
+++ trunk/sandbox/cdk/maven-resource-dependency-plugin/src/main/java/org/richfaces/cdk/rd/mojo/CreateScriptMojo.java 2009-01-16 12:22:51 UTC (rev 12307)
@@ -23,16 +23,18 @@
import java.io.File;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Collections;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
+import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
+import org.apache.commons.digester.Digester;
import org.apache.commons.vfs.FileObject;
import org.apache.commons.vfs.FileSystemManager;
import org.apache.commons.vfs.VFS;
@@ -47,14 +49,11 @@
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectBuilder;
import org.codehaus.plexus.util.DirectoryScanner;
+import org.richfaces.cdk.rd.Component;
+import org.richfaces.cdk.rd.Components;
import org.richfaces.cdk.rd.JarResourceScanner;
-import org.richfaces.cdk.rd.handler.DefaultRichHandler;
-import org.richfaces.cdk.rd.handler.RichComponentsHandler;
-import org.richfaces.cdk.rd.handler.ScriptsHandler;
-import org.richfaces.cdk.rd.selector.ResourceSelector;
-import org.richfaces.cdk.rd.selector.RichResourceSelector;
+import org.richfaces.cdk.rd.handler.ComponentsHandler;
import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotSupportedException;
/**
* @author Anton Belevich
@@ -134,11 +133,12 @@
public void execute() throws MojoExecutionException {
try {
- Set <String> components = findComponents(webSourceDirectory);
Artifact richfaces = getUIArifact(project);
FileObject jarRichfaces = resolveArtifact(richfaces);
- FileObject [] richConfigs = resolveConfigsFromJar(jarRichfaces);
- Set result = selectScriptResources(richConfigs,components);
+ FileObject [] configs = resolveConfigsFromJar(jarRichfaces);
+ List components = processConfigs(configs, new ArrayList());
+ Set <String> result = findComponents(webSourceDirectory, components);
+// Set result = selectScriptResources(richConfigs,components);
for (Iterator iterator = result.iterator(); iterator.hasNext();) {
getLog().info("collect: " + iterator.next());
@@ -149,85 +149,72 @@
}
- public Set findComponents (File webSourceDir) {
+ public List processConfigs(FileObject [] configs, List collector) {
+ for (FileObject config: configs) {
+ Digester digester = new Digester();
+ digester.addObjectCreate("components", Components.class);
+ digester.addCallMethod("components/namespace", "setNamespace", 0);
+ digester.addObjectCreate("components/component", Component.class);
+ digester.addCallMethod("components/component/name", "setComponentName",0);
+ digester.addCallMethod("components/component/scripts/script", "addScript",0);
+ digester.addCallMethod("components/component/styles/styles", "addStyle",0);
+ digester.addSetNext("components/component", "addComponent");
+
+ try {
+ collector.add(digester.parse(config.getContent().getInputStream()));
+ } catch (SAXException e) {
+ getLog().error(e);
+ } catch (IOException e) {
+ getLog().error(e);
+ }
+ }
+ return collector;
+ }
+
+ public Set findComponents (File webSourceDir, List components) {
- ResourceSelector richSelector = null;
-
DirectoryScanner scanner = new DirectoryScanner();
scanner.setBasedir(webSourceDir);
scanner.setIncludes(new String []{"**/*.xhtml"});
scanner.addDefaultExcludes();
scanner.scan();
String [] collectedFiles = scanner.getIncludedFiles();
-
- try {
+
+ ComponentsHandler handler = new ComponentsHandler();
+ handler.setLog(getLog());
+ handler.setComponents(components);
+
+ try {
+
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
saxParserFactory.setNamespaceAware(true);
SAXParser saxParser = saxParserFactory.newSAXParser();
- saxParser.setProperty("http://apache.org/xml/features/continue-after-fatal-error", true);
-
- RichComponentsHandler handler = new RichComponentsHandler();
- handler.setLog(getLog());
- handler.setResult(new HashSet());
- handler.addNamespaces(namespaces);
-
- richSelector = new RichResourceSelector(saxParser,handler);
for(String processFile : collectedFiles) {
File file = new File(webSourceDir,processFile);
if(file.exists()) {
getLog().info("process file: " + file.getName());
- richSelector.select(file);
+ try {
+ saxParser.parse(file, handler);
+ } catch (SAXException e) {
+ getLog().error(e);
+ } catch (IOException e) {
+ getLog().error(e);
+ }
}
}
- } catch (SAXNotSupportedException e) {
+ } catch (FactoryConfigurationError e) {
getLog().error(e);
- } catch (SAXException e) {
- getLog().error(e);
} catch (ParserConfigurationException e) {
getLog().error(e);
- } catch (IOException e) {
+ } catch (SAXException e){
getLog().error(e);
}
-
- Set result = null;
- if (richSelector != null) {
- result = richSelector.getResult();
- }
-
- return result;
- }
-
- public Set selectScriptResources (FileObject[] richConfigs, Set components) {
- Set result = null;
-
- SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
- try {
- SAXParser saxParser = saxParserFactory.newSAXParser();
- DefaultRichHandler handler = new ScriptsHandler(components);
- handler.setLog(getLog());
- handler.setResult(new HashSet());
- RichResourceSelector selector = new RichResourceSelector(saxParser,handler);
-
- for (FileObject dependency: richConfigs) {
- selector.select(dependency.getContent().getInputStream());
- }
-
- result = selector.getResult();
-
- }catch(SAXException e) {
- getLog().error(e);
- }catch(ParserConfigurationException e) {
- getLog().error(e);
- }catch (IOException e) {
- getLog().error(e);
- }
-
- return result;
+ return handler.getScripts();
}
-
+
protected Artifact getUIArifact (MavenProject project) {
Model model = project.getModel();
@@ -274,7 +261,7 @@
return jarFileObject;
}
- public FileObject [] resolveConfigsFromJar(FileObject jarFileObject) throws MojoExecutionException{
+ public FileObject [] resolveConfigsFromJar(FileObject jarFileObject) {
FileObject [] result = new FileObject[0];
try {
@@ -287,7 +274,6 @@
} catch (IOException e) {
getLog().error(e);
}
-
return result;
}
16 years, 11 months
JBoss Rich Faces SVN: r12306 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-01-16 05:58:26 -0500 (Fri, 16 Jan 2009)
New Revision: 12306
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java
Log:
fix ajaxPoll tests
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java 2009-01-16 10:07:08 UTC (rev 12305)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java 2009-01-16 10:58:26 UTC (rev 12306)
@@ -26,6 +26,7 @@
import org.ajax4jsf.template.Template;
import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
+import org.richfaces.AutoTester.TestSetupEntry;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -129,8 +130,14 @@
public void testAjaxSingleWithInternalValidationFailed(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, null);
+ tester.reset();
+ tester.setupControl(TestSetupEntry.ajaxSingle, Boolean.TRUE);
+ tester.clickLoad();
writeStatus("Test ajaxSingle attribute in case of invalid children state");
- tester.testAjaxSingleWithInternalValidationFailed();
+ setInternalValidationFailed();
+ sendAjax();
+ tester.checkActionListener(false);
+ tester.checkUpdateModel(false);
}
@Override
16 years, 11 months
JBoss Rich Faces SVN: r12305 - Reports/3.3.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2009-01-16 05:07:08 -0500 (Fri, 16 Jan 2009)
New Revision: 12305
Modified:
trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.GA.xls
Log:
Modified: trunk/test-applications/qa/Test Reports/3.3.0/ComponentsAssignment3.3.0.GA.xls
===================================================================
(Binary files differ)
16 years, 11 months
JBoss Rich Faces SVN: r12304 - in trunk/framework: impl/src/main/java/org/ajax4jsf/resource and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-01-15 20:43:39 -0500 (Thu, 15 Jan 2009)
New Revision: 12304
Modified:
trunk/framework/api/src/main/java/org/ajax4jsf/resource/ResourceContext.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/CachedResourceContext.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/FacesResourceContext.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ServletResourceContext.java
trunk/framework/impl/src/main/java/org/ajax4jsf/resource/StaticResource.java
Log:
access to ServletContext attributes added to the ResourceContext
Modified: trunk/framework/api/src/main/java/org/ajax4jsf/resource/ResourceContext.java
===================================================================
--- trunk/framework/api/src/main/java/org/ajax4jsf/resource/ResourceContext.java 2009-01-15 20:35:17 UTC (rev 12303)
+++ trunk/framework/api/src/main/java/org/ajax4jsf/resource/ResourceContext.java 2009-01-16 01:43:39 UTC (rev 12304)
@@ -25,6 +25,9 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Set;
/**
* Abstraction context class for rendering resource ( image, script, style )
@@ -87,8 +90,78 @@
*/
public abstract Object getSessionAttribute(String name);
- public abstract InputStream getResourceAsStream(String path);
+ /**
+ * Get ServletContext attribute by name.
+ * @param name
+ * @return value for attribute, or null.
+ */
+ public abstract Object getContextAttribute(String name);
+ /**
+ * <p>Return a <code>URL</code> for the application resource mapped to the
+ * specified path, if it exists; otherwise, return <code>null</code>.</p>
+ *
+ * <p><em>Servlet:</em> This must be the value returned by the
+ * <code>javax.servlet.ServletContext</code> method
+ * <code>getResource(path)</code>.</p>
+ *
+ * <p><em>Portlet:</em> This must be the value returned by the
+ * <code>javax.portlet.PortletContext</code> method
+ * <code>getResource(path)</code>.</p>
+ *
+ * @param path The path to the requested resource, which must
+ * start with a slash ("/" character
+ *
+ * @throws MalformedURLException if the specified path
+ * is not in the correct form
+ * @throws NullPointerException if <code>path</code>
+ * is <code>null</code>
+ */
+ public abstract URL getResource(String path) throws MalformedURLException;
+
+
+ /**
+ * <p>Return an <code>InputStream</code> for an application resource
+ * mapped to the specified path, if it exists; otherwise, return
+ * <code>null</code>.</p>
+ *
+ * <p><em>Servlet:</em> This must be the value returned by the
+ * <code>javax.servlet.ServletContext</code> method
+ * <code>getResourceAsStream(path)</code>.</p>
+ *
+ * <p><em>Portlet:</em> This must be the value returned by the
+ * <code>javax.portlet.PortletContext</code> method
+ * <code>getResourceAsStream(path)</code>.</p>
+ *
+ * @param path The path to the requested resource, which must
+ * start with a slash ("/" character
+ *
+ * @throws NullPointerException if <code>path</code>
+ * is <code>null</code>
+ */
+ public abstract InputStream getResourceAsStream(String path);
+
+
+ /**
+ * <p>Return the <code>Set</code> of resource paths for all application
+ * resources whose resource path starts with the specified argument.</p>
+ *
+ * <p><em>Servlet:</em> This must be the value returned by the
+ * <code>javax.servlet.ServletContext</code> method
+ * <code>getResourcePaths(path).</code></p>
+ *
+ * <p><em>Portlet:</em> This must be the value returned by the
+ * <code>javax.portlet.PortletContext</code> method
+ * <code>getResourcePaths(path).</code></p>
+ *
+ * @param path Partial path used to match resources, which must
+ * start with a slash ("/") character
+ *
+ * @throws NullPointerException if <code>path</code>
+ * is <code>null</code>
+ */
+ public abstract Set<String> getResourcePaths(String path);
+
/**
* Get request parameter for given name.
* @param data_parameter
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/CachedResourceContext.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/CachedResourceContext.java 2009-01-15 20:35:17 UTC (rev 12303)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/CachedResourceContext.java 2009-01-16 01:43:39 UTC (rev 12304)
@@ -25,6 +25,9 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Set;
import org.ajax4jsf.resource.ResourceContext;
import org.ajax4jsf.webapp.CacheContent;
@@ -89,7 +92,37 @@
public Object getSessionAttribute(String name) {
return this.parent.getSessionAttribute(name);
}
+
+
+ /**
+ * @param name
+ * @return
+ * @see org.ajax4jsf.resource.ResourceContext#getContextAttribute(java.lang.String)
+ */
+ public Object getContextAttribute(String name) {
+ return parent.getContextAttribute(name);
+ }
+
+ /**
+ * @param path
+ * @return
+ * @throws MalformedURLException
+ * @see org.ajax4jsf.resource.ResourceContext#getResource(java.lang.String)
+ */
+ public URL getResource(String path) throws MalformedURLException {
+ return parent.getResource(path);
+ }
+
+ /**
+ * @param path
+ * @return
+ * @see org.ajax4jsf.resource.ResourceContext#getResourcePaths(java.lang.String)
+ */
+ public Set<String> getResourcePaths(String path) {
+ return parent.getResourcePaths(path);
+ }
+
/* (non-Javadoc)
* @see org.ajax4jsf.resource.ResourceContext#setDateHeader(java.lang.String, long)
*/
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/FacesResourceContext.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/FacesResourceContext.java 2009-01-15 20:35:17 UTC (rev 12303)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/FacesResourceContext.java 2009-01-16 01:43:39 UTC (rev 12304)
@@ -26,6 +26,9 @@
import java.io.OutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Set;
import javax.faces.FacesException;
import javax.faces.context.ExternalContext;
@@ -178,13 +181,38 @@
return externalContext.getSessionMap().get(name);
}
+ @Override
+ public Object getContextAttribute(String name) {
+ return externalContext.getApplicationMap().get(name);
+ }
+
+
public InputStream getResourceAsStream(String path) {
return externalContext.getResourceAsStream(path);
}
- public String getRequestParameter(String data_parameter) {
+ /**
+ * @param path
+ * @return
+ * @throws MalformedURLException
+ * @see javax.faces.context.ExternalContext#getResource(java.lang.String)
+ */
+ public URL getResource(String path) throws MalformedURLException {
+ return externalContext.getResource(path);
+ }
+ /**
+ * @param path
+ * @return
+ * @see javax.faces.context.ExternalContext#getResourcePaths(java.lang.String)
+ */
+ public Set<String> getResourcePaths(String path) {
+ return externalContext.getResourcePaths(path);
+ }
+
+ public String getRequestParameter(String data_parameter) {
+
return (String) externalContext.getRequestParameterMap().get(
data_parameter);
}
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ServletResourceContext.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ServletResourceContext.java 2009-01-15 20:35:17 UTC (rev 12303)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/ServletResourceContext.java 2009-01-16 01:43:39 UTC (rev 12304)
@@ -25,6 +25,9 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Set;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
@@ -108,6 +111,34 @@
return request.getSession(false).getAttribute(name);
}
+ /**
+ * @param name
+ * @return
+ * @see javax.servlet.ServletContext#getAttribute(java.lang.String)
+ */
+ public Object getContextAttribute(String name) {
+ return context.getAttribute(name);
+ }
+
+ /**
+ * @param path
+ * @return
+ * @throws MalformedURLException
+ * @see javax.servlet.ServletContext#getResource(java.lang.String)
+ */
+ public URL getResource(String path) throws MalformedURLException {
+ return context.getResource(path);
+ }
+
+ /**
+ * @param path
+ * @return
+ * @see javax.servlet.ServletContext#getResourcePaths(java.lang.String)
+ */
+ public Set getResourcePaths(String path) {
+ return context.getResourcePaths(path);
+ }
+
public InputStream getResourceAsStream(String path) {
// TODO Auto-generated method stub
return context.getResourceAsStream(path);
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/resource/StaticResource.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/resource/StaticResource.java 2009-01-15 20:35:17 UTC (rev 12303)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/resource/StaticResource.java 2009-01-16 01:43:39 UTC (rev 12304)
@@ -77,13 +77,9 @@
return context.getExternalContext().encodeResourceURL(src);
}
- public void encode(FacesContext context, Object data) {
- // TODO Auto-generated method stub
- }
-
/**
* @return the path
*/
16 years, 11 months