JBoss Rich Faces SVN: r10184 - trunk/ui/modal-panel/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-24 12:01:02 -0400 (Sun, 24 Aug 2008)
New Revision: 10184
Modified:
trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
Log:
https://jira.jboss.org/jira/browse/RF-4266
Modified: trunk/ui/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2008-08-24 15:25:43 UTC (rev 10183)
+++ trunk/ui/modal-panel/src/main/config/component/modalPanel.xml 2008-08-24 16:01:02 UTC (rev 10184)
@@ -50,25 +50,25 @@
<name>width</name>
<classname>int</classname>
<description> Attribute defines width of component. Default value is "300". </description>
- <defaultvalue>300</defaultvalue>
+ <defaultvalue>-1</defaultvalue>
</property>
<property>
<name>height</name>
<classname>int</classname>
<description>Attribute defines height of component. Default value is "200". </description>
- <defaultvalue>200</defaultvalue>
+ <defaultvalue>-1</defaultvalue>
</property>
<property>
<name>minWidth</name>
<classname>int</classname>
<description> Attribute defines min width of component. Default value is "10". If the value is less then 10, a "IllegalArgumentException" exception is thrown.</description>
- <defaultvalue>10</defaultvalue>
+ <defaultvalue>-1</defaultvalue>
</property>
<property>
<name>minHeight</name>
<classname>int</classname>
<description> Attribute defines min height of component. Default value is "10". If the value is less then 10, a "IllegalArgumentException" exception is thrown. </description>
- <defaultvalue>10</defaultvalue>
+ <defaultvalue>-1</defaultvalue>
</property>
<property>
<name>left</name>
15 years, 9 months
JBoss Rich Faces SVN: r10183 - in trunk/ui: orderingList/src/main/config/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-24 11:25:43 -0400 (Sun, 24 Aug 2008)
New Revision: 10183
Modified:
trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
trunk/ui/orderingList/src/main/config/component/orderinglist.xml
Log:
https://jira.jboss.org/jira/browse/RF-4265
Modified: trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2008-08-24 13:31:18 UTC (rev 10182)
+++ trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2008-08-24 15:25:43 UTC (rev 10183)
@@ -269,12 +269,8 @@
</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
- <property>
+ <property hidden="true">
<name>rowKey</name>
- <classname>java.lang.Object</classname>
- <description>RowKey is a representation of an identifier for a specific data row</description>
-
-
</property>
<property>
<name>rowKeyConverter</name>
Modified: trunk/ui/orderingList/src/main/config/component/orderinglist.xml
===================================================================
--- trunk/ui/orderingList/src/main/config/component/orderinglist.xml 2008-08-24 13:31:18 UTC (rev 10182)
+++ trunk/ui/orderingList/src/main/config/component/orderinglist.xml 2008-08-24 15:25:43 UTC (rev 10183)
@@ -279,12 +279,10 @@
<property hidden="true">
<name>rowCount</name>
</property>
- <property>
+ <property hidden="true">
<name>rowKey</name>
- <classname>java.lang.Object</classname>
- <description>RowKey is a representation of an identifier for a specific data row</description>
</property>
- <property>
+ <property>
<name>rowKeyConverter</name>
<classname>javax.faces.convert.Converter</classname>
<description>Converter for a row key object</description>
15 years, 9 months
JBoss Rich Faces SVN: r10182 - in trunk/ui/panelbar/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-24 09:31:18 -0400 (Sun, 24 Aug 2008)
New Revision: 10182
Modified:
trunk/ui/panelbar/src/main/java/org/richfaces/renderkit/html/PanelBarRendererBase.java
trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
Log:
https://jira.jboss.org/jira/browse/RF-4276
Modified: trunk/ui/panelbar/src/main/java/org/richfaces/renderkit/html/PanelBarRendererBase.java
===================================================================
--- trunk/ui/panelbar/src/main/java/org/richfaces/renderkit/html/PanelBarRendererBase.java 2008-08-23 01:00:48 UTC (rev 10181)
+++ trunk/ui/panelbar/src/main/java/org/richfaces/renderkit/html/PanelBarRendererBase.java 2008-08-24 13:31:18 UTC (rev 10182)
@@ -33,6 +33,7 @@
import javax.faces.context.ResponseWriter;
import javax.faces.el.ValueBinding;
+import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.AjaxScript;
import org.ajax4jsf.javascript.ImageCacheScript;
import org.ajax4jsf.javascript.JSFunction;
@@ -173,6 +174,7 @@
ScriptOptions options = new ScriptOptions(component);
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
Object changeScript = panelBar.getAttributes().get("onitemchange");
@@ -190,6 +192,7 @@
options.addOption("mouseout", panelBar.getAttributes().get("onmouseout"));
options.addOption("mousemove", panelBar.getAttributes().get("onmousemove"));
options.addOption("items", items);
+ options.addOption("ajax", ajaxContext.isAjaxRequest());
StringBuffer script = new StringBuffer();
Modified: trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
===================================================================
--- trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2008-08-23 01:00:48 UTC (rev 10181)
+++ trunk/ui/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2008-08-24 13:31:18 UTC (rev 10182)
@@ -14,6 +14,10 @@
if (!this.panel) {
return;
}
+
+ this.panel.component = this;
+ this["rich:destructor"] = "destroy";
+
this.hclient=0;
this.COUNT=0;
this.STEP=0;
@@ -29,7 +33,12 @@
this.input=$(panelId+"_panelBarInput");
this.defaultIndex=this.findPanelById($F(panelId+"_panelBarInput"));
- Event.observe(window,'load',this.handleOnLoad.bindAsEventListener(this));
+ this.handleOnLoadBound = this.handleOnLoad.bind(this);
+ if (!options.ajax) {
+ Event.observe(window, 'load', this.handleOnLoadBound);
+ } else {
+ this.handleOnLoad();
+ }
this.mouseover = options.mouseover;
this.mouseout = options.mouseout;
@@ -53,14 +62,25 @@
this.contentHight = -1;
},
+ destroy: function() {
+ Event.stopObserving(window, 'load', this.handleOnLoadBound);
+ if (this.panel) {
+ this.panel.component = undefined;
+ }
+ if (this.timer) {
+ clearTimeout(this.timer);
+ this.timer = undefined;
+ }
+ },
+
handleOnLoad: function() {
- Event.stopObserving(window,'load',this.handleOnLoad.bindAsEventListener(this));
+ Event.stopObserving(window, 'load', this.handleOnLoadBound);
if ( this.timer ){
clearTimeout(this.timer);
}
if (this.panel.clientHeight<=0){
this.contentHight = -1;
- this.timer = setTimeout(this.handleOnLoad.bind(this), 100);
+ this.timer = setTimeout(this.handleOnLoadBound, 100);
}
this.showSlide(this.slides[this.defaultIndex]);
15 years, 9 months
JBoss Rich Faces SVN: r10181 - in trunk/framework/impl/src: main/java/org/ajax4jsf/config and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2008-08-22 21:00:48 -0400 (Fri, 22 Aug 2008)
New Revision: 10181
Added:
trunk/framework/impl/src/main/java/org/ajax4jsf/config/
trunk/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfig.java
trunk/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfigHandler.java
trunk/framework/impl/src/main/java/org/ajax4jsf/config/FilterBean.java
trunk/framework/impl/src/main/java/org/ajax4jsf/config/FilterMapping.java
trunk/framework/impl/src/main/java/org/ajax4jsf/config/ParsingException.java
trunk/framework/impl/src/main/java/org/ajax4jsf/config/ServletBean.java
trunk/framework/impl/src/main/java/org/ajax4jsf/config/ServletMapping.java
trunk/framework/impl/src/main/java/org/ajax4jsf/config/StateHandler.java
trunk/framework/impl/src/main/java/org/ajax4jsf/config/StringContentHandler.java
trunk/framework/impl/src/main/java/org/ajax4jsf/config/WebXML.java
trunk/framework/impl/src/main/java/org/ajax4jsf/config/WebappHandler.java
trunk/framework/impl/src/test/java/org/ajax4jsf/config/
trunk/framework/impl/src/test/java/org/ajax4jsf/config/FacesConfigTest.java
trunk/framework/impl/src/test/java/org/ajax4jsf/config/MockServletContext.java
trunk/framework/impl/src/test/java/org/ajax4jsf/config/MockXmlReader.java
trunk/framework/impl/src/test/java/org/ajax4jsf/config/StateHandlerTest.java
trunk/framework/impl/src/test/java/org/ajax4jsf/config/WebXMLTest.java
trunk/framework/impl/src/test/java/org/ajax4jsf/config/WebappHandlerTest.java
trunk/framework/impl/src/test/resources/WEB-INF/
trunk/framework/impl/src/test/resources/WEB-INF/a-faces-config.xml
trunk/framework/impl/src/test/resources/WEB-INF/b-faces-config.xml
trunk/framework/impl/src/test/resources/WEB-INF/faces-config.xml
trunk/framework/impl/src/test/resources/WEB-INF/web.xml
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
Log:
https://jira.jboss.org/jira/browse/RF-1004 - import SAX config files parsers from PortletBridge project.
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfig.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfig.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfig.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,166 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.faces.FacesException;
+import javax.faces.webapp.FacesServlet;
+import javax.servlet.ServletContext;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.xml.sax.SAXException;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class FacesConfig {
+
+ private static final Logger log = Logger.getLogger(FacesConfig.class
+ .getName());
+
+ private static final String FACES_CONFIG_CLASS_PATH = "META-INF/faces-config.xml";
+
+ private static final String FACES_CONFIG_WEB_PATH = "/WEB-INF/faces-config.xml";
+
+ private List<String> excludedAttributes = new ArrayList<String>();
+
+ private SAXParserFactory factory;
+
+ public FacesConfig() {
+ factory = SAXParserFactory.newInstance();
+ factory.setValidating(false);
+ factory.setNamespaceAware(true);
+ }
+
+ public void parse(ServletContext context) {
+ try {
+ parseClasspath(context);
+ parseOptional(context);
+ parseDefault(context);
+ } catch (ParsingException e) {
+ throw new FacesException("Error parsing faces-config",e);
+ }
+ }
+
+ protected void parseDefault(ServletContext context) throws ParsingException {
+ // Parse default faces config.
+ InputStream inputStream = context
+ .getResourceAsStream(FACES_CONFIG_WEB_PATH);
+ if (null != inputStream) {
+ try {
+ parse(inputStream);
+ } finally {
+ try {
+ inputStream.close();
+ } catch (IOException e) {
+ log.log(Level.WARNING,
+ "Can't close input stream for web resource "
+ + FACES_CONFIG_WEB_PATH, e);
+ }
+ }
+ }
+ }
+
+ protected void parseOptional(ServletContext context)
+ throws ParsingException {
+ // Parse additional faces-config files, if present.
+ String facesConfigs = context
+ .getInitParameter(FacesServlet.CONFIG_FILES_ATTR);
+ if (null != facesConfigs) {
+ String[] configNamesArray = facesConfigs.trim().split(
+ "(\\s)*,(\\s)*");
+ for (int i = 0; i < configNamesArray.length; i++) {
+ String facesConfigPath = configNamesArray[i];
+ InputStream inputStream = context
+ .getResourceAsStream(facesConfigPath);
+ if (null != inputStream) {
+ try {
+ parse(inputStream);
+ } finally {
+ try {
+ inputStream.close();
+ } catch (IOException e) {
+ log.log(Level.WARNING,
+ "Can't close input stream for web resource "
+ + facesConfigPath, e);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ protected void parseClasspath(ServletContext context)
+ throws ParsingException {
+ ClassLoader classLoader = Thread.currentThread()
+ .getContextClassLoader();
+ if (null == classLoader) {
+ classLoader = context.getClass().getClassLoader();
+ }
+ try {
+ // Parse all faces-config.xml files in the classpath.
+ Enumeration<URL> resources = classLoader
+ .getResources(FACES_CONFIG_CLASS_PATH);
+ while (resources.hasMoreElements()) {
+ URL resourceURL = (URL) resources.nextElement();
+ try {
+ URLConnection connection = resourceURL.openConnection();
+ // To avoid file locking in the Windows environmemt.
+ connection.setUseCaches(false);
+ InputStream inputStream = connection.getInputStream();
+ try {
+ parse(inputStream);
+ } finally {
+ inputStream.close();
+ }
+ } catch (IOException e) {
+ log.log(Level.WARNING, "Can't parse "
+ + resourceURL.toExternalForm(), e);
+ }
+ }
+ } catch (IOException e) {
+ log.log(Level.WARNING,
+ "Can't get META-INF/faces-config.xml resources", e);
+ }
+ }
+
+ protected void parse(InputStream facesConfig) throws ParsingException {
+ try {
+ SAXParser parser = getParser();
+ parser.parse(facesConfig, new FacesConfigHandler(parser
+ .getXMLReader(), excludedAttributes));
+ } catch (SAXException e) {
+ log.log(Level.WARNING, "Exception at faces-config.xml parsing", e);
+ } catch (IOException e) {
+ log.log(Level.WARNING, "Exception at faces-config.xml parsing", e);
+ }
+ }
+
+ protected SAXParser getParser() throws ParsingException {
+ try {
+ SAXParser parser = factory.newSAXParser();
+ return parser;
+ } catch (ParserConfigurationException e) {
+ throw new ParsingException("SAX Parser configuration error", e);
+ } catch (SAXException e) {
+ throw new ParsingException("SAX Parser instantiation error", e);
+ }
+ }
+
+ public List<String> getExcludedAttributes() {
+ return excludedAttributes;
+ }
+}
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfig.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfigHandler.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfigHandler.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfigHandler.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,131 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+import java.io.StringReader;
+import java.util.List;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class FacesConfigHandler extends DefaultHandler {
+
+
+ private static final String JEE_NS = "http://java.sun.com/xml/ns/javaee";
+ private static final String BRIDGE_NS = "http://www.apache.org/myfaces/xml/ns/bridge/bridge-extension";
+ private static final String APPLICATION_ELEMENT = "application";
+ private static final String APP_EXTENSION_ELEMENT = "application-extension";
+ private static final String EXCLUDED_ATTRIBUTES_ELEMENT = "excluded-attributes";
+ private static final String EXCLUDED_ATTRIBUTE_ELEMENT = "excluded-attribute";
+
+ private List<String> excludedAttributes;
+ private XMLReader reader;
+
+ public FacesConfigHandler(XMLReader reader, List<String> excludedAttributes) {
+ this.reader = reader;
+ this.excludedAttributes = excludedAttributes;
+ }
+
+ @Override
+ public void startElement(String uri, String localName, String name,
+ Attributes attributes) throws SAXException {
+ if (APPLICATION_ELEMENT.equals(localName) && JEE_NS.equals(uri)) {
+ reader.setContentHandler(new ApplicationHandler());
+ }
+ }
+
+ @Override
+ public InputSource resolveEntity(String publicId, String systemId) throws SAXException
+ {
+ // Do nothing, to avoid network requests to external DTD/Schema
+ return new InputSource(new StringReader(""));
+ }
+ /**
+ * @author asmirnov
+ *
+ */
+ private class ApplicationHandler extends StateHandler {
+ public ApplicationHandler() {
+ super(reader,FacesConfigHandler.this);
+ }
+
+ @Override
+ protected ContentHandler getNextHandler(String uri, String localName,
+ Attributes attributes) {
+ if(APP_EXTENSION_ELEMENT.equals(localName) && JEE_NS.equals(uri)){
+ return new ApplicationExtensionHandler(this);
+ } else {
+ return null;
+ }
+ }
+
+ }
+
+ /**
+ * @author asmirnov
+ *
+ */
+ private class ApplicationExtensionHandler extends StateHandler {
+ public ApplicationExtensionHandler(ContentHandler parent) {
+ super(reader,parent);
+ }
+
+ @Override
+ protected ContentHandler getNextHandler(String uri, String localName,
+ Attributes attributes) {
+ if(EXCLUDED_ATTRIBUTES_ELEMENT.equals(localName) && BRIDGE_NS.equals(uri)){
+ return new ExcludedAttributesHandler(this);
+ } else {
+ return null;
+ }
+ }
+
+ }
+
+ /**
+ * @author asmirnov
+ *
+ */
+ private class ExcludedAttributesHandler extends StateHandler {
+
+ public ExcludedAttributesHandler(ContentHandler parent) {
+ super(reader,parent);
+ }
+
+ @Override
+ protected ContentHandler getNextHandler(String uri, String localName,
+ Attributes attributes) {
+ if(EXCLUDED_ATTRIBUTE_ELEMENT.equals(localName) && BRIDGE_NS.equals(uri)){
+ return new ExcludedAttributeHandler(this);
+ } else {
+ return null;
+ }
+ }
+
+ }
+ /**
+ * @author asmirnov
+ *
+ */
+ private class ExcludedAttributeHandler extends StringContentHandler {
+
+ public ExcludedAttributeHandler(ContentHandler parent) {
+ super(reader, parent, new StringBuilder());
+ }
+
+ @Override
+ protected void endLastElement() {
+ excludedAttributes.add(getResult().toString());
+ }
+ }
+
+}
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/config/FacesConfigHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/config/FilterBean.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/config/FilterBean.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/config/FilterBean.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,40 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+import java.util.ArrayList;
+import java.util.List;
+
+class FilterBean {
+ private String name;
+ private String className;
+ private final List<String> mappings = new ArrayList<String>();
+
+ public FilterBean() {
+ }
+ /**
+ * @param name
+ * @param className
+ */
+ public FilterBean(String name, String className) {
+ super();
+ this.name = name;
+ this.className = className;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+ public List<String> getMappings() {
+ return mappings;
+ }
+}
\ No newline at end of file
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/config/FilterBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/config/FilterMapping.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/config/FilterMapping.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/config/FilterMapping.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,51 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+/**
+ * @author asmirnov
+ *
+ */
+class FilterMapping {
+
+ private String filterName;
+ private String servletName;
+ private String urlPattern;
+
+ public FilterMapping() {
+ }
+
+ public FilterMapping(String filterName, String servletName,
+ String urlPattern) {
+ super();
+ this.filterName = filterName;
+ this.servletName = servletName;
+ this.urlPattern = urlPattern;
+ }
+
+ public String getFilterName() {
+ return filterName;
+ }
+
+ public void setFilterName(String filterName) {
+ this.filterName = filterName;
+ }
+
+ public String getServletName() {
+ return servletName;
+ }
+
+ public void setServletName(String servletName) {
+ this.servletName = servletName;
+ }
+
+ public String getUrlPattern() {
+ return urlPattern;
+ }
+
+ public void setUrlPattern(String urlPattern) {
+ this.urlPattern = urlPattern;
+ }
+
+}
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/config/FilterMapping.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/config/ParsingException.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/config/ParsingException.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/config/ParsingException.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,44 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class ParsingException extends Exception {
+
+ /**
+ *
+ */
+ public ParsingException() {
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @param message
+ */
+ public ParsingException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @param cause
+ */
+ public ParsingException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public ParsingException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/config/ParsingException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/config/ServletBean.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/config/ServletBean.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/config/ServletBean.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,40 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+import java.util.ArrayList;
+import java.util.List;
+
+class ServletBean {
+ private String name;
+ private String className;
+ private final List<String> mappings = new ArrayList<String>();
+
+ public ServletBean() {
+ }
+ /**
+ * @param name
+ * @param className
+ */
+ public ServletBean(String name, String className) {
+ super();
+ this.name = name;
+ this.className = className;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getClassName() {
+ return className;
+ }
+ public void setClassName(String className) {
+ this.className = className;
+ }
+ public List<String> getMappings() {
+ return mappings;
+ }
+}
\ No newline at end of file
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/config/ServletBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/config/ServletMapping.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/config/ServletMapping.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/config/ServletMapping.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,38 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+class ServletMapping {
+ private String servletName;
+ private String urlPattern;
+
+ public ServletMapping() {
+ }
+
+ /**
+ * @param servletName
+ * @param urlPattern
+ */
+ public ServletMapping(String servletName, String urlPattern) {
+ super();
+ this.servletName = servletName;
+ this.urlPattern = urlPattern;
+ }
+
+ public String getServletName() {
+ return servletName;
+ }
+
+ public void setServletName(String servletName) {
+ this.servletName = servletName;
+ }
+
+ public String getUrlPattern() {
+ return urlPattern;
+ }
+
+ public void setUrlPattern(String urlPattern) {
+ this.urlPattern = urlPattern;
+ }
+}
\ No newline at end of file
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/config/ServletMapping.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/config/StateHandler.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/config/StateHandler.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/config/StateHandler.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,74 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+import java.io.StringReader;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * @author asmirnov
+ *
+ */
+public abstract class StateHandler extends DefaultHandler {
+
+ private final ContentHandler parentHandler;
+
+ private final XMLReader reader;
+
+ private int depth = 0;
+
+ public StateHandler(XMLReader reader, ContentHandler parentHandler) {
+ super();
+ this.reader = reader;
+ this.parentHandler = parentHandler;
+ }
+
+ @Override
+ public void startElement(String uri, String localName, String name,
+ Attributes attributes) throws SAXException {
+ ContentHandler nextHandler = getNextHandler(uri, localName, attributes);
+ if (null == nextHandler) {
+ depth++;
+ } else {
+ reader.setContentHandler(nextHandler);
+ }
+ }
+
+ protected ContentHandler getNextHandler(String uri, String localName,
+ Attributes attributes) {
+ return null;
+ }
+
+ @Override
+ public void endElement(String uri, String localName, String name)
+ throws SAXException {
+ if(depth-- == 0){
+ if(null != parentHandler){
+ reader.setContentHandler(parentHandler);
+ }
+ endLastElement();
+ }
+ }
+
+ protected void endLastElement() {
+ // Do nothing
+ }
+
+ @Override
+ public InputSource resolveEntity(String publicId, String systemId) throws SAXException
+ {
+ // Do nothing, to avoid network requests to external DTD/Schema
+ return new InputSource(new StringReader(""));
+ }
+
+ protected XMLReader getReader() {
+ return reader;
+ }
+}
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/config/StateHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/config/StringContentHandler.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/config/StringContentHandler.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/config/StringContentHandler.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,33 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class StringContentHandler extends StateHandler {
+
+ private StringBuilder result;
+
+ public StringContentHandler(XMLReader reader, ContentHandler parentHandler,
+ StringBuilder result) {
+ super(reader, parentHandler);
+ this.result = result;
+ }
+
+ @Override
+ public void characters(char[] ch, int start, int length)
+ throws SAXException {
+ result.append(ch, start, length);
+ }
+
+ protected StringBuilder getResult() {
+ return result;
+ }
+}
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/config/StringContentHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/config/WebXML.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/config/WebXML.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/config/WebXML.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,52 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+
+import javax.servlet.ServletContext;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class WebXML {
+
+ private static final String WEB_XML = "/WEB-INF/web.xml";
+ private List<String> facesServletMappings;
+
+ public void parse(InputStream webXml) {
+ try {
+ SAXParserFactory factory = SAXParserFactory.newInstance();
+ factory.setValidating(false);
+ factory.setNamespaceAware(true);
+ SAXParser parser = factory.newSAXParser();
+ ServletBean facesServlet = new ServletBean();
+ parser.parse(webXml, new WebappHandler(parser.getXMLReader(),
+ facesServlet));
+ facesServletMappings = facesServlet.getMappings();
+ } catch (Exception e) {
+ // TODO: handle exception
+ }
+ }
+
+ public List<String> getFacesServletMappings() {
+ return facesServletMappings;
+ }
+
+ public void parse(ServletContext portletContext) {
+ InputStream inputStream = portletContext.getResourceAsStream(WEB_XML);
+ parse(inputStream);
+ try {
+ inputStream.close();
+ } catch (IOException e) {
+ // Do nothing, ignore
+ }
+
+ }
+}
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/config/WebXML.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/main/java/org/ajax4jsf/config/WebappHandler.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/config/WebappHandler.java (rev 0)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/config/WebappHandler.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,150 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class WebappHandler extends DefaultHandler {
+
+ static final String SERVLET_MAPPING_ELEMENT = "servlet-mapping";
+
+ static final String SERVLET_ELEMENT = "servlet";
+
+ static final String SERVLET_NAME_ELEMENT = "servlet-name";
+
+ static final String SERVLET_CLASS_ELEMENT = "servlet-class";
+
+ static final String FACES_SERVLET_CLASS = "javax.faces.webapp.FacesServlet";
+
+ static final String FILTER_MAPPING_ELEMENT = "filter-mapping";
+
+ static final String FILTER_ELEMENT = "filter";
+
+ static final String FILTER_NAME_ELEMENT = "filter-name";
+
+ static final String FILTER_CLASS_ELEMENT = "filter-class";
+
+ private List<ServletBean> servlets = new ArrayList<ServletBean>();
+
+ private List<ServletMapping> mappings = new ArrayList<ServletMapping>();
+
+ private ServletBean facesServlet;
+
+ private XMLReader xmlReader;
+
+ static final String URL_PATTERN_ELEMENT = "url-pattern";
+
+
+ public WebappHandler(XMLReader reader, ServletBean bean) {
+ this.xmlReader = reader;
+ this.facesServlet = bean;
+ }
+
+ @Override
+ public void startElement(String uri, String localName, String name,
+ Attributes attributes) throws SAXException {
+ if (SERVLET_ELEMENT.equals(localName)) {
+ xmlReader.setContentHandler(new ServletHandler());
+ } else if (SERVLET_MAPPING_ELEMENT.equals(localName)) {
+ xmlReader.setContentHandler(new MappingHandler());
+ }
+ }
+
+ @Override
+ public void endDocument() throws SAXException {
+ for (ServletBean servlet : servlets) {
+ if (FACES_SERVLET_CLASS.equals(servlet.getClassName())) {
+ facesServlet.setName(servlet.getName());
+ facesServlet.setClassName(servlet.getClassName());
+ for (ServletMapping mapping : mappings) {
+ if (servlet.getName().equals(mapping.getServletName())) {
+ facesServlet.getMappings().add(mapping.getUrlPattern());
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public InputSource resolveEntity(String publicId, String systemId) throws SAXException
+ {
+ // Do nothing, to avoid network requests to external DTD/Schema
+ return new InputSource(new StringReader(""));
+ }
+
+
+ final class ServletHandler extends StateHandler {
+
+ private StringBuilder servletName = new StringBuilder();
+ private StringBuilder servletClass = new StringBuilder();
+
+ public ServletHandler() {
+ super(xmlReader, WebappHandler.this);
+ }
+
+ @Override
+ protected ContentHandler getNextHandler(String uri, String localName,
+ Attributes attributes) {
+ ContentHandler nextHandler = null;
+ if (SERVLET_NAME_ELEMENT.equals(localName)) {
+ nextHandler = new StringContentHandler(getReader(), this,
+ servletName);
+ } else if (SERVLET_CLASS_ELEMENT.equals(localName)) {
+ nextHandler = new StringContentHandler(getReader(), this,
+ servletClass);
+ }
+ return nextHandler;
+ }
+
+ @Override
+ protected void endLastElement() {
+ servlets.add(new ServletBean(servletName.toString().trim(),
+ servletClass.toString().trim()));
+ }
+ }
+
+ final class MappingHandler extends StateHandler {
+
+ private StringBuilder servletName = new StringBuilder();
+ private StringBuilder urlPattern = new StringBuilder();
+
+ public MappingHandler() {
+ super(xmlReader, WebappHandler.this);
+ }
+
+ @Override
+ protected ContentHandler getNextHandler(String uri, String localName,
+ Attributes attributes) {
+ ContentHandler nextHandler = null;
+ if (SERVLET_NAME_ELEMENT.equals(localName)) {
+ nextHandler = new StringContentHandler(getReader(), this,
+ servletName);
+ } else if (URL_PATTERN_ELEMENT.equals(localName)) {
+ nextHandler = new StringContentHandler(getReader(), this,
+ urlPattern);
+ }
+ return nextHandler;
+ }
+
+ @Override
+ protected void endLastElement() {
+ mappings.add(new ServletMapping(servletName.toString().trim(),
+ urlPattern.toString().trim()));
+ }
+ }
+
+}
Property changes on: trunk/framework/impl/src/main/java/org/ajax4jsf/config/WebappHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2008-08-22 16:28:02 UTC (rev 10180)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -33,7 +33,6 @@
import java.util.Map;
import java.util.Set;
-import javax.annotation.PreDestroy;
import javax.faces.FacesException;
import javax.faces.FactoryFinder;
import javax.faces.application.StateManager;
@@ -99,7 +98,6 @@
- @PreDestroy
public void release() {
ajaxAreasToRender = new HashSet<String>();
Added: trunk/framework/impl/src/test/java/org/ajax4jsf/config/FacesConfigTest.java
===================================================================
--- trunk/framework/impl/src/test/java/org/ajax4jsf/config/FacesConfigTest.java (rev 0)
+++ trunk/framework/impl/src/test/java/org/ajax4jsf/config/FacesConfigTest.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,166 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Vector;
+
+import javax.faces.webapp.FacesServlet;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+
+import junit.framework.TestCase;
+
+import org.xml.sax.SAXException;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class FacesConfigTest extends TestCase {
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /**
+ * Test method for {@link org.jboss.portletbridge.util.FacesConfig#parse(javax.portlet.PortletContext)}.
+ */
+ public void testParsePortletContext() {
+ FacesConfig config = new FacesConfig();
+ MockServletContext context = new MockServletContext(){
+ @Override
+ public InputStream getResourceAsStream(String path) {
+ return this.getClass().getResourceAsStream(path);
+ }
+
+ @Override
+ public String getInitParameter(String name) {
+ if(FacesServlet.CONFIG_FILES_ATTR.equals(name)){
+ return "/WEB-INF/a-faces-config.xml ,/WEB-INF/b-faces-config.xml";
+ }
+ return super.getInitParameter(name);
+ }
+ };
+ config.parse(context);
+ assertEquals(6, config.getExcludedAttributes().size());
+ }
+
+ /**
+ * Test method for {@link org.jboss.portletbridge.util.FacesConfig#parseDefault(javax.portlet.PortletContext)}.
+ */
+ public void testParseDefault() throws Exception {
+ FacesConfig config = new FacesConfig();
+ MockServletContext context = new MockServletContext(){
+ @Override
+ public InputStream getResourceAsStream(String path) {
+ return this.getClass().getResourceAsStream(path);
+ }
+
+ @Override
+ public String getInitParameter(String name) {
+ if(FacesServlet.CONFIG_FILES_ATTR.equals(name)){
+ return "/WEB-INF/a-faces-config.xml ,/WEB-INF/b-faces-config.xml";
+ }
+ return super.getInitParameter(name);
+ }
+ };
+ config.parseDefault(context);
+ assertEquals(2, config.getExcludedAttributes().size());
+ }
+
+ /**
+ * Test method for {@link org.jboss.portletbridge.util.FacesConfig#parseOptional(javax.portlet.PortletContext)}.
+ */
+ public void testParseOptional() throws Exception {
+ FacesConfig config = new FacesConfig();
+ MockServletContext context = new MockServletContext(){
+ @Override
+ public InputStream getResourceAsStream(String path) {
+ return this.getClass().getResourceAsStream(path);
+ }
+
+ @Override
+ public String getInitParameter(String name) {
+ if(FacesServlet.CONFIG_FILES_ATTR.equals(name)){
+ return "/WEB-INF/a-faces-config.xml ,/WEB-INF/b-faces-config.xml";
+ }
+ return super.getInitParameter(name);
+ }
+ };
+ config.parseOptional(context);
+ assertEquals(4, config.getExcludedAttributes().size());
+ }
+
+ /**
+ * Test method for {@link org.jboss.portletbridge.util.FacesConfig#parseClasspath(javax.portlet.PortletContext)}.
+ * @throws Exception
+ */
+ public void testParseClasspath() throws Exception {
+ ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
+ try{
+ ClassLoader classLoader = this.getClass().getClassLoader();
+ ClassLoader classLoaderWrapper = new ClassLoader(classLoader){
+
+ @Override
+ public Enumeration<URL> getResources(String name)
+ throws IOException {
+ if("META-INF/faces-config.xml".equals(name)){
+ Vector<URL> configs = new Vector<URL>(2);
+ configs.add(getResource("WEB-INF/a-faces-config.xml"));
+ configs.add(getResource("WEB-INF/b-faces-config.xml"));
+ return configs.elements();
+ }
+ return super.getResources(name);
+ }
+ };
+ Thread.currentThread().setContextClassLoader(classLoaderWrapper);
+ FacesConfig config = new FacesConfig();
+ MockServletContext context = new MockServletContext();
+ config.parseClasspath(context);
+ assertEquals(4, config.getExcludedAttributes().size());
+ } finally {
+ Thread.currentThread().setContextClassLoader(contextClassLoader);
+ }
+
+ }
+
+ /**
+ * Test method for {@link org.jboss.portletbridge.util.FacesConfig#parse(java.io.InputStream)}.
+ * @throws ParsingException
+ */
+ public void testParseInputStream() throws Exception {
+ InputStream facesConfigResource = this.getClass().getResourceAsStream("/WEB-INF/faces-config.xml");
+ FacesConfig config = new FacesConfig();
+ config.parse(facesConfigResource);
+ assertEquals(2, config.getExcludedAttributes().size());
+ assertTrue(config.getExcludedAttributes().contains("foo.bar"));
+ assertTrue(config.getExcludedAttributes().contains("foo.baz.*"));
+ }
+
+ /**
+ * Test method for {@link org.jboss.portletbridge.util.FacesConfig#getParser()}.
+ * @throws SAXException
+ * @throws ParserConfigurationException
+ */
+ public void testGetParser() throws Exception {
+ FacesConfig config = new FacesConfig();
+ SAXParser parser = config.getParser();
+ assertNotSame(parser, config.getParser());
+ }
+
+}
Property changes on: trunk/framework/impl/src/test/java/org/ajax4jsf/config/FacesConfigTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/test/java/org/ajax4jsf/config/MockServletContext.java
===================================================================
--- trunk/framework/impl/src/test/java/org/ajax4jsf/config/MockServletContext.java (rev 0)
+++ trunk/framework/impl/src/test/java/org/ajax4jsf/config/MockServletContext.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,222 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Set;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.Servlet;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class MockServletContext implements ServletContext {
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getAttribute(java.lang.String)
+ */
+ public Object getAttribute(String name) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getAttributeNames()
+ */
+ public Enumeration getAttributeNames() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getContext(java.lang.String)
+ */
+ public ServletContext getContext(String uripath) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getContextPath()
+ */
+ public String getContextPath() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getInitParameter(java.lang.String)
+ */
+ public String getInitParameter(String name) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getInitParameterNames()
+ */
+ public Enumeration getInitParameterNames() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getMajorVersion()
+ */
+ public int getMajorVersion() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getMimeType(java.lang.String)
+ */
+ public String getMimeType(String file) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getMinorVersion()
+ */
+ public int getMinorVersion() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getNamedDispatcher(java.lang.String)
+ */
+ public RequestDispatcher getNamedDispatcher(String name) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getRealPath(java.lang.String)
+ */
+ public String getRealPath(String path) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getRequestDispatcher(java.lang.String)
+ */
+ public RequestDispatcher getRequestDispatcher(String path) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getResource(java.lang.String)
+ */
+ public URL getResource(String path) throws MalformedURLException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getResourceAsStream(java.lang.String)
+ */
+ public InputStream getResourceAsStream(String path) {
+ return getClass().getResourceAsStream(path);
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getResourcePaths(java.lang.String)
+ */
+ public Set getResourcePaths(String path) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getServerInfo()
+ */
+ public String getServerInfo() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getServlet(java.lang.String)
+ */
+ public Servlet getServlet(String name) throws ServletException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getServletContextName()
+ */
+ public String getServletContextName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getServletNames()
+ */
+ public Enumeration getServletNames() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#getServlets()
+ */
+ public Enumeration getServlets() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#log(java.lang.String)
+ */
+ public void log(String msg) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#log(java.lang.Exception, java.lang.String)
+ */
+ public void log(Exception exception, String msg) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#log(java.lang.String, java.lang.Throwable)
+ */
+ public void log(String message, Throwable throwable) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#removeAttribute(java.lang.String)
+ */
+ public void removeAttribute(String name) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /* (non-Javadoc)
+ * @see javax.servlet.ServletContext#setAttribute(java.lang.String, java.lang.Object)
+ */
+ public void setAttribute(String name, Object object) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Property changes on: trunk/framework/impl/src/test/java/org/ajax4jsf/config/MockServletContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/test/java/org/ajax4jsf/config/MockXmlReader.java
===================================================================
--- trunk/framework/impl/src/test/java/org/ajax4jsf/config/MockXmlReader.java (rev 0)
+++ trunk/framework/impl/src/test/java/org/ajax4jsf/config/MockXmlReader.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,95 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+import java.io.IOException;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.DTDHandler;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+import org.xml.sax.XMLReader;
+
+final class MockXmlReader implements XMLReader {
+
+ ContentHandler contentHandler;
+
+ public ContentHandler getContentHandler() {
+ return contentHandler;
+ }
+
+ public DTDHandler getDTDHandler() {
+
+ return null;
+ }
+
+ public EntityResolver getEntityResolver() {
+
+ return null;
+ }
+
+ public ErrorHandler getErrorHandler() {
+
+ return null;
+ }
+
+ public boolean getFeature(String name)
+ throws SAXNotRecognizedException, SAXNotSupportedException {
+
+ return false;
+ }
+
+ public Object getProperty(String name)
+ throws SAXNotRecognizedException, SAXNotSupportedException {
+
+ return null;
+ }
+
+ public void parse(InputSource input) throws IOException,
+ SAXException {
+
+
+ }
+
+ public void parse(String systemId) throws IOException, SAXException {
+
+
+ }
+
+ public void setContentHandler(ContentHandler handler) {
+ contentHandler = handler;
+
+ }
+
+ public void setDTDHandler(DTDHandler handler) {
+
+
+ }
+
+ public void setEntityResolver(EntityResolver resolver) {
+
+
+ }
+
+ public void setErrorHandler(ErrorHandler handler) {
+
+
+ }
+
+ public void setFeature(String name, boolean value)
+ throws SAXNotRecognizedException, SAXNotSupportedException {
+
+
+ }
+
+ public void setProperty(String name, Object value)
+ throws SAXNotRecognizedException, SAXNotSupportedException {
+
+
+ }
+}
\ No newline at end of file
Property changes on: trunk/framework/impl/src/test/java/org/ajax4jsf/config/MockXmlReader.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/test/java/org/ajax4jsf/config/StateHandlerTest.java
===================================================================
--- trunk/framework/impl/src/test/java/org/ajax4jsf/config/StateHandlerTest.java (rev 0)
+++ trunk/framework/impl/src/test/java/org/ajax4jsf/config/StateHandlerTest.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,69 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+
+import junit.framework.TestCase;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class StateHandlerTest extends TestCase {
+
+ private static final String PREFIX = "foo:";
+ private static final String BAR = "bar";
+ private static final String NS = "http://foo.com/";
+
+ private XMLReader reader;
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ reader = new MockXmlReader();
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testReturnBack() throws Exception {
+ ContentHandler parentHandler = new DefaultHandler() {
+ @Override
+ public void startElement(String uri, String localName, String name,
+ Attributes attributes) throws SAXException {
+ throw new SAXException();
+ }
+ @Override
+ public void endElement(String uri, String localName, String name)
+ throws SAXException {
+ throw new SAXException();
+ }
+ };
+ StateHandler handler = new StateHandler(reader,parentHandler){
+
+ };
+ reader.setContentHandler(handler);
+ handler.startElement(NS, BAR, PREFIX+BAR, null);
+ handler.startElement(NS, BAR, PREFIX+BAR, null);
+ handler.endElement(NS, BAR, PREFIX+BAR);
+ assertSame(handler, reader.getContentHandler());
+ handler.endElement(NS, BAR, PREFIX+BAR);
+ assertSame(handler, reader.getContentHandler());
+ handler.endElement(NS, BAR, PREFIX+BAR);
+ assertSame(parentHandler, reader.getContentHandler());
+ }
+
+}
Property changes on: trunk/framework/impl/src/test/java/org/ajax4jsf/config/StateHandlerTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/test/java/org/ajax4jsf/config/WebXMLTest.java
===================================================================
--- trunk/framework/impl/src/test/java/org/ajax4jsf/config/WebXMLTest.java (rev 0)
+++ trunk/framework/impl/src/test/java/org/ajax4jsf/config/WebXMLTest.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,43 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class WebXMLTest extends TestCase {
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /**
+ * Test method for {@link org.jboss.portletbridge.util.WebXML#parse(java.io.InputStream)}.
+ */
+ public void testParse() throws Exception {
+ WebXML webXml = new WebXML();
+ InputStream inputStream = this.getClass().getResourceAsStream("/WEB-INF/web.xml");
+ webXml.parse(inputStream);
+ inputStream.close();
+ assertEquals(2, webXml.getFacesServletMappings().size());
+ assertEquals("*.jsf", webXml.getFacesServletMappings().get(1));
+ assertEquals("/faces/*", webXml.getFacesServletMappings().get(0));
+ }
+
+}
Property changes on: trunk/framework/impl/src/test/java/org/ajax4jsf/config/WebXMLTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/test/java/org/ajax4jsf/config/WebappHandlerTest.java
===================================================================
--- trunk/framework/impl/src/test/java/org/ajax4jsf/config/WebappHandlerTest.java (rev 0)
+++ trunk/framework/impl/src/test/java/org/ajax4jsf/config/WebappHandlerTest.java 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,82 @@
+/**
+ *
+ */
+package org.ajax4jsf.config;
+
+import junit.framework.TestCase;
+
+import org.xml.sax.ContentHandler;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class WebappHandlerTest extends TestCase {
+
+ private static final char[] FACES_SERVLET = "Faces Servlet".toCharArray();
+ private static final char[] FACES_SERVLET_CLASS = "javax.faces.webapp.FacesServlet".toCharArray();
+ private static final String SERVLET = "servlet";
+ private static final String WEBAPP = "web-app";
+ private static final String SERVLET_NAME = "servlet-name";
+ private static final String SERVLET_CLASS = "servlet-class";
+ private static final String SERVLET_MAPPING = "servlet-mapping";
+ private MockXmlReader reader;
+ private ServletBean facesServlet;
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ reader = new MockXmlReader();
+ facesServlet = new ServletBean();
+ }
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testServletElement() throws Exception {
+ WebappHandler handler = new WebappHandler(reader,facesServlet);
+ reader.setContentHandler(handler);
+ handler.startElement(null, WEBAPP, WEBAPP, null);
+ assertEquals(handler, reader.getContentHandler());
+ handler.startElement(null, SERVLET, SERVLET, null);
+ ContentHandler servletHandler = reader.getContentHandler();
+ assertSame(WebappHandler.ServletHandler.class, reader.getContentHandler().getClass());
+ servletHandler.startElement(null, SERVLET_NAME, SERVLET_NAME, null);
+ assertSame(StringContentHandler.class, reader.getContentHandler().getClass());
+ ContentHandler servletNameHandler = reader.getContentHandler();
+ servletNameHandler.characters(FACES_SERVLET, 0, FACES_SERVLET.length);
+ servletNameHandler.endElement(null, SERVLET_NAME, SERVLET_NAME);
+ assertSame(servletHandler, reader.getContentHandler());
+ servletHandler.startElement(null, SERVLET_CLASS, SERVLET_CLASS, null);
+ assertSame(StringContentHandler.class, reader.getContentHandler().getClass());
+ ContentHandler servletClassHandler = reader.getContentHandler();
+ servletClassHandler.characters(FACES_SERVLET_CLASS, 0, FACES_SERVLET_CLASS.length);
+ servletClassHandler.endElement(null, SERVLET_CLASS, SERVLET_CLASS);
+ assertSame(servletHandler, reader.getContentHandler());
+ servletHandler.endElement(null, SERVLET, SERVLET);
+ assertEquals(handler, reader.getContentHandler());
+ handler.endElement(null, WEBAPP, WEBAPP);
+ handler.endDocument();
+ assertEquals("Faces Servlet", facesServlet.getName());
+ }
+
+ public void testMappingElement() throws Exception {
+ WebappHandler handler = new WebappHandler(reader,facesServlet);
+ reader.setContentHandler(handler);
+ handler.startElement(null, WEBAPP, WEBAPP, null);
+ assertEquals(handler, reader.getContentHandler());
+ handler.startElement(null, SERVLET_MAPPING, SERVLET_MAPPING, null);
+ ContentHandler servletHandler = reader.getContentHandler();
+ assertSame(WebappHandler.MappingHandler.class, reader.getContentHandler().getClass());
+ servletHandler.startElement(null, SERVLET_NAME, SERVLET_NAME, null);
+ assertSame(StringContentHandler.class, reader.getContentHandler().getClass());
+
+ }
+
+}
Property changes on: trunk/framework/impl/src/test/java/org/ajax4jsf/config/WebappHandlerTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/test/resources/WEB-INF/a-faces-config.xml
===================================================================
--- trunk/framework/impl/src/test/resources/WEB-INF/a-faces-config.xml (rev 0)
+++ trunk/framework/impl/src/test/resources/WEB-INF/a-faces-config.xml 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="windows-1252"?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:bridge="http://www.apache.org/myfaces/xml/ns/bridge/bridge-extension">
+ <application>
+ <application-extension>
+ <bridge:excluded-attributes>
+ <bridge:excluded-attribute>foz.bar</bridge:excluded-attribute>
+ <bridge:excluded-attribute>foz.baz.*</bridge:excluded-attribute>
+ </bridge:excluded-attributes>
+ </application-extension>
+ </application>
+</faces-config>
\ No newline at end of file
Property changes on: trunk/framework/impl/src/test/resources/WEB-INF/a-faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/test/resources/WEB-INF/b-faces-config.xml
===================================================================
--- trunk/framework/impl/src/test/resources/WEB-INF/b-faces-config.xml (rev 0)
+++ trunk/framework/impl/src/test/resources/WEB-INF/b-faces-config.xml 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="windows-1252"?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:bridge="http://www.apache.org/myfaces/xml/ns/bridge/bridge-extension">
+ <application>
+ <application-extension>
+ <bridge:excluded-attributes>
+ <bridge:excluded-attribute>fox.bar</bridge:excluded-attribute>
+ <bridge:excluded-attribute>fox.baz.*</bridge:excluded-attribute>
+ </bridge:excluded-attributes>
+ </application-extension>
+ </application>
+</faces-config>
\ No newline at end of file
Property changes on: trunk/framework/impl/src/test/resources/WEB-INF/b-faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/test/resources/WEB-INF/faces-config.xml
===================================================================
--- trunk/framework/impl/src/test/resources/WEB-INF/faces-config.xml (rev 0)
+++ trunk/framework/impl/src/test/resources/WEB-INF/faces-config.xml 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="windows-1252"?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:bridge="http://www.apache.org/myfaces/xml/ns/bridge/bridge-extension">
+ <application>
+ <application-extension>
+ <bridge:excluded-attributes>
+ <bridge:excluded-attribute>foo.bar</bridge:excluded-attribute>
+ <bridge:excluded-attribute>foo.baz.*</bridge:excluded-attribute>
+ </bridge:excluded-attributes>
+ </application-extension>
+ </application>
+</faces-config>
\ No newline at end of file
Property changes on: trunk/framework/impl/src/test/resources/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/framework/impl/src/test/resources/WEB-INF/web.xml
===================================================================
--- trunk/framework/impl/src/test/resources/WEB-INF/web.xml (rev 0)
+++ trunk/framework/impl/src/test/resources/WEB-INF/web.xml 2008-08-23 01:00:48 UTC (rev 10181)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <description>Richfaces Components demo</description>
+ <display-name>richfaces-demo</display-name>
+
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>
+ /WEB-INF/a-faces-config.xml,/WEB-INF/b-faces-config.xml
+ </param-value>
+ </context-param>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+</web-app>
Property changes on: trunk/framework/impl/src/test/resources/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 9 months
JBoss Rich Faces SVN: r10180 - in trunk/samples/richfaces-demo/src/main/webapp/richfaces: inplaceSelect/examples and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-08-22 12:28:02 -0400 (Fri, 22 Aug 2008)
New Revision: 10180
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/controlsCustomization.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceSelect/examples/controlsCustomization.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-4268,
https://jira.jboss.org/jira/browse/RF-4271
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/controlsCustomization.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/controlsCustomization.xhtml 2008-08-22 15:17:47 UTC (rev 10179)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceInput/examples/controlsCustomization.xhtml 2008-08-22 16:28:02 UTC (rev 10180)
@@ -9,9 +9,9 @@
id="inplaceInput">
<f:facet name="controls">
- <button onclick="#{rich:component('inplaceInput')}.save();"
+ <button onmousedown="#{rich:component('inplaceInput')}.save();"
type="button">Save</button>
- <button onclick="#{rich:component('inplaceInput')}.cancel();"
+ <button onmousedown="#{rich:component('inplaceInput')}.cancel();"
type="button">Cancel</button>
</f:facet>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceSelect/examples/controlsCustomization.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceSelect/examples/controlsCustomization.xhtml 2008-08-22 15:17:47 UTC (rev 10179)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/inplaceSelect/examples/controlsCustomization.xhtml 2008-08-22 16:28:02 UTC (rev 10180)
@@ -17,9 +17,9 @@
controlsHorizontalPosition="left" controlsVerticalPosition="bottom"
id="inplaceSelect">
<f:facet name="controls">
- <button onclick="#{rich:component('inplaceSelect')}.save();"
+ <button onmousedown="#{rich:component('inplaceSelect')}.save();"
type="button">Save</button>
- <button onclick="#{rich:component('inplaceSelect')}.cancel();"
+ <button onmousedown="#{rich:component('inplaceSelect')}.cancel();"
type="button">Cancel</button>
</f:facet>
<f:selectItems value="#{capitalsBean.capitalsOptions}" />
15 years, 9 months
JBoss Rich Faces SVN: r10179 - trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-08-22 11:17:47 -0400 (Fri, 22 Aug 2008)
New Revision: 10179
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
https://jira.jboss.org/jira/browse/RF-4264
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-08-22 14:24:33 UTC (rev 10178)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-08-22 15:17:47 UTC (rev 10179)
@@ -818,12 +818,12 @@
{
for (var i=0;i<this.selectedItems.length; i++)
{
- if (!this.selectedItems.object)
+ if (!this.selectedItems[i].object)
{
- var obj = items[this.selectedItems.text];
+ var obj = items[this.selectedItems[i].text];
if (obj)
{
- this.selectedItems.object = obj;
+ this.selectedItems[i].object = obj;
this.isSelectedItemsUpdated = true;
}
}
@@ -869,7 +869,7 @@
var p = 0;
while (p<this.startPosition)
{
- if (tokens.indexOf(this.element.value[p])!=-1) index++;
+ if (tokens.indexOf(this.element.value.charAt(p))!=-1) index++;
p++;
}
}
15 years, 9 months
JBoss Rich Faces SVN: r10178 - trunk/samples/darkX/src/main/resources/META-INF/skins.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-08-22 10:24:33 -0400 (Fri, 22 Aug 2008)
New Revision: 10178
Added:
trunk/samples/darkX/src/main/resources/META-INF/skins/darkXExt.xcss
Modified:
trunk/samples/darkX/src/main/resources/META-INF/skins/darkX.skin.properties
trunk/samples/darkX/src/main/resources/META-INF/skins/darkX.xcss
Log:
Bug fixing(RF-4144)
Modified: trunk/samples/darkX/src/main/resources/META-INF/skins/darkX.skin.properties
===================================================================
--- trunk/samples/darkX/src/main/resources/META-INF/skins/darkX.skin.properties 2008-08-22 14:24:28 UTC (rev 10177)
+++ trunk/samples/darkX/src/main/resources/META-INF/skins/darkX.skin.properties 2008-08-22 14:24:33 UTC (rev 10178)
@@ -1,6 +1,7 @@
baseSkin=classic
gradientType=plastic
generalStyleSheet=resource:///META-INF/skins/darkX.xcss
+extendedStyleSheet=resource:///META-INF/skins/darkXExt.xcss
headerBackgroundColor=#1F4986
headerTextColor=#FFFFFF
Modified: trunk/samples/darkX/src/main/resources/META-INF/skins/darkX.xcss
===================================================================
--- trunk/samples/darkX/src/main/resources/META-INF/skins/darkX.xcss 2008-08-22 14:24:28 UTC (rev 10177)
+++ trunk/samples/darkX/src/main/resources/META-INF/skins/darkX.xcss 2008-08-22 14:24:33 UTC (rev 10178)
@@ -32,7 +32,6 @@
<f:importResource src="org/richfaces/skins/darkx/css/separator.xcss" />
<f:importResource src="org/richfaces/skins/darkx/css/simpleTogglePanel.xcss" />
<f:importResource src="org/richfaces/skins/darkx/css/spacer.xcss" />
- <f:importResource src="org/richfaces/skins/darkx/css/standard.xcss" />
<f:importResource src="org/richfaces/skins/darkx/css/suggestionbox.xcss" />
<f:importResource src="org/richfaces/skins/darkx/css/tabPanel.xcss" />
<f:importResource src="org/richfaces/skins/darkx/css/togglePanel.xcss" />
Added: trunk/samples/darkX/src/main/resources/META-INF/skins/darkXExt.xcss
===================================================================
--- trunk/samples/darkX/src/main/resources/META-INF/skins/darkXExt.xcss (rev 0)
+++ trunk/samples/darkX/src/main/resources/META-INF/skins/darkXExt.xcss 2008-08-22 14:24:33 UTC (rev 10178)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:template xmlns:f='http:/jsf.exadel.com/template'
+ xmlns:u='http:/jsf.exadel.com/template/util'
+ xmlns="http://www.w3.org/1999/xhtml" >
+
+ <f:importResource src="org/richfaces/skins/darkx/css/standard.xcss" />
+</f:template>
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r10177 - trunk/samples/glassX/src/main/resources/META-INF/skins.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-08-22 10:24:28 -0400 (Fri, 22 Aug 2008)
New Revision: 10177
Added:
trunk/samples/glassX/src/main/resources/META-INF/skins/glassXExt.xcss
Modified:
trunk/samples/glassX/src/main/resources/META-INF/skins/glassX.skin.properties
trunk/samples/glassX/src/main/resources/META-INF/skins/glassX.xcss
Log:
Bug fixing(RF-4144)
Modified: trunk/samples/glassX/src/main/resources/META-INF/skins/glassX.skin.properties
===================================================================
--- trunk/samples/glassX/src/main/resources/META-INF/skins/glassX.skin.properties 2008-08-22 12:57:53 UTC (rev 10176)
+++ trunk/samples/glassX/src/main/resources/META-INF/skins/glassX.skin.properties 2008-08-22 14:24:28 UTC (rev 10177)
@@ -1,6 +1,7 @@
baseSkin=blueSky
gradientType=glass
generalStyleSheet=resource:///META-INF/skins/glassX.xcss
+extendedStyleSheet=resource:///META-INF/skins/glassXExt.xcss
headerBackgroundColor=#ACBECE
headerTextColor=#000000
Modified: trunk/samples/glassX/src/main/resources/META-INF/skins/glassX.xcss
===================================================================
--- trunk/samples/glassX/src/main/resources/META-INF/skins/glassX.xcss 2008-08-22 12:57:53 UTC (rev 10176)
+++ trunk/samples/glassX/src/main/resources/META-INF/skins/glassX.xcss 2008-08-22 14:24:28 UTC (rev 10177)
@@ -8,7 +8,6 @@
<f:importResource src="org/richfaces/skins/glassx/css/combobox.xcss" />
<f:importResource src="org/richfaces/skins/glassx/css/component-control.xcss" />
<f:importResource src="org/richfaces/skins/glassx/css/context-menu.xcss" />
- <f:importResource src="org/richfaces/skins/glassx/css/core.xcss" />
<f:importResource src="org/richfaces/skins/glassx/css/data-filter-slider.xcss" />
<f:importResource src="org/richfaces/skins/glassx/css/data-table.xcss" />
<f:importResource src="org/richfaces/skins/glassx/css/datascroller.xcss" />
Added: trunk/samples/glassX/src/main/resources/META-INF/skins/glassXExt.xcss
===================================================================
--- trunk/samples/glassX/src/main/resources/META-INF/skins/glassXExt.xcss (rev 0)
+++ trunk/samples/glassX/src/main/resources/META-INF/skins/glassXExt.xcss 2008-08-22 14:24:28 UTC (rev 10177)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:template xmlns:f='http:/jsf.exadel.com/template'
+ xmlns:u='http:/jsf.exadel.com/template/util'
+ xmlns="http://www.w3.org/1999/xhtml" >
+
+ <f:importResource src="org/richfaces/skins/glassx/css/core.xcss" />
+</f:template>
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r10176 - Plan and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-08-22 08:57:53 -0400 (Fri, 22 Aug 2008)
New Revision: 10176
Modified:
trunk/test-applications/qa/Test Plan/ComponentsAssignment3.2.2.BETA4.xls
Log:
Modified: trunk/test-applications/qa/Test Plan/ComponentsAssignment3.2.2.BETA4.xls
===================================================================
(Binary files differ)
15 years, 9 months
JBoss Rich Faces SVN: r10175 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-08-22 07:02:18 -0400 (Fri, 22 Aug 2008)
New Revision: 10175
Modified:
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
Log:
RF-4233 - submitForm () and beforeSubmit() methods have been described
RF-2305 - isMultiUpload() method has been described
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-08-22 00:37:07 UTC (rev 10174)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-08-22 11:02:18 UTC (rev 10175)
@@ -586,8 +586,7 @@
</emphasis> component could work together with Seam framework. <ulink
url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..."
>Here</ulink> you can see how to configure filters for both
- of them in web.xml file in
- order to handle <emphasis role="bold">
+ of them in web.xml file in order to handle <emphasis role="bold">
<property><rich:fileUpload></property>
</emphasis> requests. </para>
@@ -629,11 +628,38 @@
as a parameter to remove a
particular file. </entry>
</row>
+ <row>
+ <entry> submitForm() </entry>
+ <entry> Submits form to server. All
+ added files will be put to
+ model and event. </entry>
+ </row>
+ <row>
+ <entry> beforeSubmit() </entry>
+ <entry> Sets up necessary request
+ parameters for file uploading
+ and submits form to server by
+ command button. This method
+ should be used together with
+ commands </entry>
+ </row>
+ <row>
+ <entry> isMultiUpload() </entry>
+ <entry> Returns "true"
+ if several files have been
+ uploaded. </entry>
+ </row>
+ <!-- <row>
+ <entry>
+ getUploadItems()
+ </entry>
+ <entry>
+
+ </entry>
+ </row>-->
-
-
</tbody>
</tgroup>
</table>
15 years, 9 months