Author: lfryc(a)redhat.com
Date: 2010-07-10 14:20:31 -0400 (Sat, 10 Jul 2010)
New Revision: 17824
Added:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/SelectItemComparator.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JLogBean.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JMediaOutputBean.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/MediaData.java
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JLogBean.properties
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JMediaOutputBean.properties
root/tests/metamer/trunk/src/main/webapp/components/a4jLog/
root/tests/metamer/trunk/src/main/webapp/components/a4jLog/list.xhtml
root/tests/metamer/trunk/src/main/webapp/components/a4jLog/simple.xhtml
root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/
root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/flash.xhtml
root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/image.xhtml
root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/list.xhtml
root/tests/metamer/trunk/src/main/webapp/resources/css/a4jLog.css
root/tests/metamer/trunk/src/main/webapp/resources/css/a4jMediaOutput.css
root/tests/metamer/trunk/src/main/webapp/resources/script/
root/tests/metamer/trunk/src/main/webapp/resources/script/swfobject.js
Removed:
root/tests/metamer/trunk/src/main/assembly/tomcat6-assembly.xml
Modified:
root/tests/metamer/trunk/pom.xml
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/Attributes.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/RichPhaseListener.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandButtonBean.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandLinkBean.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/CommandButtonBean.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java
root/tests/metamer/trunk/src/main/webapp/WEB-INF/web.xml
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml
root/tests/metamer/trunk/src/main/webapp/templates/header.xhtml
Log:
https://jira.jboss.org/browse/RFPL-466
* added a4j:log - actions in bean need to be finished so that it will show custom messages
in log
* added a4j:mediaOutput - doesn't work because of a bug in component
* directory script moved to resources
* skinning combo box in header disabled, skin changing implemented
* added SelectItemComparator so that select items in properties component are sorted
Modified: root/tests/metamer/trunk/pom.xml
===================================================================
--- root/tests/metamer/trunk/pom.xml 2010-07-10 18:18:32 UTC (rev 17823)
+++ root/tests/metamer/trunk/pom.xml 2010-07-10 18:20:31 UTC (rev 17824)
@@ -14,7 +14,7 @@
<groupId>org.richfaces.examples</groupId>
<artifactId>testapp</artifactId>
<packaging>war</packaging>
- <name>RichFaces Testing Application</name>
+ <name>RichFaces Examples: Testing Application</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -98,15 +98,15 @@
<artifactId>maven-war-plugin</artifactId>
<executions>
<execution>
- <id>jee5</id>
+ <id>jee6</id>
<phase>package</phase>
<goals>
<goal>war</goal>
</goals>
<configuration>
-
<webappDirectory>${project.build.directory}/${project.build.finalName}-jee5
+
<webappDirectory>${project.build.directory}/${project.build.finalName}-jee6
</webappDirectory>
- <classifier>jee5</classifier>
+ <classifier>jee6</classifier>
<packagingExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*
</packagingExcludes>
<warSourceExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/jta-*
@@ -122,13 +122,13 @@
</build>
</profile>
<profile>
- <id>jee5</id>
+ <id>jee6</id>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
-
<webappDirectory>${project.build.directory}/${project.build.finalName}-jee5
+
<webappDirectory>${project.build.directory}/${project.build.finalName}-jee6
</webappDirectory>
</configuration>
</plugin>
Deleted: root/tests/metamer/trunk/src/main/assembly/tomcat6-assembly.xml
===================================================================
--- root/tests/metamer/trunk/src/main/assembly/tomcat6-assembly.xml 2010-07-10 18:18:32
UTC (rev 17823)
+++ root/tests/metamer/trunk/src/main/assembly/tomcat6-assembly.xml 2010-07-10 18:20:31
UTC (rev 17824)
@@ -1,58 +0,0 @@
-<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembl...
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-p...
http://maven.apache.org/xsd/assembly-1.1.0.xsd">
-
- <id>tomcat6</id>
-
- <formats>
- <format>war</format>
- </formats>
-
- <includeBaseDirectory>false</includeBaseDirectory>
-
- <fileSets>
- <fileSet>
- <directory>src/main/webapp</directory>
- <outputDirectory>/</outputDirectory>
- <excludes>
- <exclude>/WEB-INF/.faces-config.xml.jsfdia</exclude>
- </excludes>
- </fileSet>
- <fileSet>
- <directory>target/classes</directory>
- <outputDirectory>WEB-INF/classes</outputDirectory>
- </fileSet>
- <fileSet>
-
<outputDirectory>META-INF/maven/${groupId}/${artifactId}</outputDirectory>
- <includes>
- <include>pom.xml</include>
- </includes>
- </fileSet>
- <fileSet>
- <directory>target/maven-archiver</directory>
-
<outputDirectory>META-INF/maven/${groupId}/${artifactId}</outputDirectory>
- <includes>
- <include>pom.properties</include>
- </includes>
- </fileSet>
- </fileSets>
-
- <dependencySets>
- <dependencySet>
- <scope>runtime</scope>
- <outputDirectory>WEB-INF/lib</outputDirectory>
- <useProjectArtifact>false</useProjectArtifact>
- <excludes>
- <exclude>org.slf4j:slf4j-jcl</exclude>
- </excludes>
- </dependencySet>
- <dependencySet>
- <scope>provided</scope>
- <useProjectArtifact>false</useProjectArtifact>
- <outputDirectory>WEB-INF/lib</outputDirectory>
- <excludes>
- <exclude>javax.el:el-api</exclude>
- </excludes>
- </dependencySet>
- </dependencySets>
-
-</assembly>
\ No newline at end of file
Modified: root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/Attributes.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/Attributes.java 2010-07-10
18:18:32 UTC (rev 17823)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/Attributes.java 2010-07-10
18:20:31 UTC (rev 17824)
@@ -162,10 +162,14 @@
item = new SelectItem(rb.getString(key), matcher.group(3));
result.get(matcher.group(2)).add(item);
-
}
}
+ // sort all select options
+ for (String aKey : result.keySet()) {
+ Collections.sort(result.get(aKey), new SelectItemComparator());
+ }
+
return result;
}
@@ -327,7 +331,22 @@
}
/**
- * {@inheritDoc}
+ * Associates the specified value with the specified key in the map with
attributes' types.
+ * If the map previously contained a mapping for the key, the old value is replaced
+ * by the specified value. (A map m is said to contain a mapping for a key k
+ * if and only if m.containsKey(k) would return true.)
+ *
+ * @param key key with which the specified value is to be associated
+ * @param value value to be associated with the specified key
+ * @return the previous value associated with key, or null if there was no
+ * mapping for key. (A null return can also indicate that the map previously
+ * associated null with key, if the implementation supports null values.)
+ * @throws UnsupportedOperationException - if the put operation is not supported by
this map
+ * @throws ClassCastException - if the class of the specified key or value prevents
+ * it from being stored in this map
+ * @throws NullPointerException - if the specified key or value is null and this map
does not permit null keys or values
+ * @throws IllegalArgumentException - if some property of the specified key
+ * or value prevents it from being stored in this map
*/
public Object putAttributeClass(String key, Class<?> value) {
@@ -353,7 +372,7 @@
// if select options for "action" are defined in property file
if (hasSelectOptions("action")) {
method = ExpressionFactory.newInstance().createMethodExpression(elContext,
getMethodEL(outcome), String.class,
- new Class[0]);
+ new Class[0]);
return (String) method.invoke(elContext, null);
}
@@ -376,15 +395,15 @@
// if no select options for "actionListener" are defined in property
file and it is an EL expression
if (!hasSelectOptions("actionListener") &&
isStringEL(listener)) {
method = ExpressionFactory.newInstance().createMethodExpression(elContext,
listener, void.class,
- new Class[] { ActionEvent.class });
- method.invoke(elContext, new Object[] { event });
+ new Class[]{ActionEvent.class});
+ method.invoke(elContext, new Object[]{event});
}
// if select options for "actionListener" are defined in property file
if (hasSelectOptions("actionListener")) {
method = ExpressionFactory.newInstance().createMethodExpression(elContext,
getMethodEL(listener), void.class,
- new Class[] { ActionEvent.class });
- method.invoke(elContext, new Object[] { event });
+ new Class[]{ActionEvent.class});
+ method.invoke(elContext, new Object[]{event});
}
}
@@ -446,5 +465,4 @@
public List<SelectItem> getSelectOptions(String attributeName) {
return attributesSelectOptions.get(attributeName);
}
-
}
Modified:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/RichPhaseListener.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/RichPhaseListener.java 2010-07-10
18:18:32 UTC (rev 17823)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/RichPhaseListener.java 2010-07-10
18:20:31 UTC (rev 17824)
@@ -52,7 +52,6 @@
*/
public void beforePhase(PhaseEvent event) {
logger.info("BEFORE - " + event.getPhaseId());
-
}
/**
Copied:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/SelectItemComparator.java
(from rev 17823,
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/RichPhaseListener.java)
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/SelectItemComparator.java
(rev 0)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/SelectItemComparator.java 2010-07-10
18:20:31 UTC (rev 17824)
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.testapp;
+
+import java.util.Comparator;
+
+import javax.faces.model.SelectItem;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Comparator for javax.faces.model.SelectItem comparing item's label.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+public class SelectItemComparator implements Comparator<SelectItem> {
+
+ private Logger logger;
+
+ public SelectItemComparator() {
+ logger = LoggerFactory.getLogger(getClass());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int compare(SelectItem o1, SelectItem o2) {
+ if (o1 == null || o1.getLabel() == null) {
+ return -1;
+ }
+
+ return o1.getLabel().compareTo(o2.getLabel());
+ }
+}
Modified:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandButtonBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandButtonBean.java 2010-07-10
18:18:32 UTC (rev 17823)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandButtonBean.java 2010-07-10
18:20:31 UTC (rev 17824)
@@ -57,7 +57,7 @@
*/
@PostConstruct
public void init() {
- logger = LoggerFactory.getLogger(A4JCommandButtonBean.class);
+ logger = LoggerFactory.getLogger(getClass());
logger.info("initializing bean " + getClass().getName());
attributes = new Attributes(UICommandButton.class, getClass());
Modified:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandLinkBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandLinkBean.java 2010-07-10
18:18:32 UTC (rev 17823)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JCommandLinkBean.java 2010-07-10
18:20:31 UTC (rev 17824)
@@ -57,7 +57,7 @@
*/
@PostConstruct
public void init() {
- logger = LoggerFactory.getLogger(A4JCommandLinkBean.class);
+ logger = LoggerFactory.getLogger(getClass());
logger.info("initializing bean " + getClass().getName());
attributes = new Attributes(UICommandLink.class, getClass());
Added: root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JLogBean.java
===================================================================
--- root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JLogBean.java
(rev 0)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JLogBean.java 2010-07-10
18:20:31 UTC (rev 17824)
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.testapp.bean;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import org.richfaces.component.UIAjaxLog;
+
+import org.richfaces.testapp.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:log.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jLogBean")
+@SessionScoped
+public class A4JLogBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private String name;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.info("initializing bean " + getClass().getName());
+
+ name = "John";
+ attributes = new Attributes(UIAjaxLog.class, getClass());
+ attributes.put("rendered", true);
+ attributes.put("level", "debug");
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component
is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the
component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * Getter for name.
+ * @return content of the input field on the page
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Setter for name.
+ * @param name new content of the input field on the page
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ // TODO implement
+ public String debugAction() {
+ logger.info("debug action");
+ return null;
+ }
+
+ // TODO implement
+ public String errorAction() {
+ logger.info("error action");
+ return null;
+ }
+
+ // TODO implement
+ public String infoAction() {
+ logger.info("info action");
+ return null;
+ }
+
+ // TODO implement
+ public String warnAction() {
+ logger.info("warning action");
+ return null;
+ }
+}
Added:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JMediaOutputBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JMediaOutputBean.java
(rev 0)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/A4JMediaOutputBean.java 2010-07-10
18:20:31 UTC (rev 17824)
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.testapp.bean;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import javax.imageio.ImageIO;
+import org.richfaces.component.UIMediaOutput;
+
+import org.richfaces.testapp.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for a4j:mediaOutput.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "a4jMediaOutputBean")
+@SessionScoped
+public class A4JMediaOutputBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.info("initializing bean " + getClass().getName());
+
+ attributes = new Attributes(UIMediaOutput.class, getClass());
+ }
+
+ /**
+ * Getter for attributes.
+ *
+ * @return A map containing all attributes of tested component. Name of the component
is key in the map.
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Setter for attributes.
+ *
+ * @param attributes
+ * map containing all attributes of tested component. Name of the
component is key in the map.
+ */
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public void paint(OutputStream out, Object data) throws IOException {
+ if (data instanceof MediaData) {
+ MediaData paintData = (MediaData) data;
+ BufferedImage img = new BufferedImage(paintData.width, paintData.height,
BufferedImage.TYPE_INT_RGB);
+ Graphics2D g2d = img.createGraphics();
+
+ g2d.setColor(Color.WHITE);
+ g2d.fillRect(0, 0, paintData.width, paintData.height);
+
+ int testLenght = paintData.text.length();
+ int fontSize = testLenght < 8 ? 40 : 40 - (testLenght - 8);
+
+ if (fontSize < 12) {
+ fontSize = 12;
+ }
+
+ Font font = new Font("Serif", Font.HANGING_BASELINE, fontSize);
+
+ g2d.setFont(font);
+
+ int x = 10;
+ int y = fontSize * 5 / 2;
+
+ g2d.translate(x, y);
+
+ Color color = new Color(paintData.color);
+
+ g2d.setPaint(new Color(color.getRed(), color.getGreen(), color.getBlue(),
30));
+
+ AffineTransform origTransform = g2d.getTransform();
+
+ g2d.shear(-0.5 * paintData.scale, 0);
+ g2d.scale(1, paintData.scale);
+ g2d.drawString(paintData.text, 0, 0);
+ g2d.setTransform(origTransform);
+ g2d.setPaint(color);
+ g2d.drawString(paintData.text, 0, 0);
+ ImageIO.write(img, "jpeg", out);
+ }
+
+// if (data instanceof MediaData) {
+//
+// MediaData paintData = (MediaData) data;
+// BufferedImage img = new
BufferedImage(paintData.getWidth(),paintData.getHeight(),BufferedImage.TYPE_INT_RGB);
+// Graphics2D graphics2D = img.createGraphics();
+// graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
+// graphics2D.drawLine(5,5,paintData.getWidth()-5,paintData.getHeight()-5);
+// graphics2D.drawChars(new
String("RichFaces").toCharArray(),0,9,40,15);
+// graphics2D.drawChars(new
String("mediaOutput").toCharArray(),0,11,5,45);
+//
+// ImageIO.write(img,"jpeg",out);
+//
+// }
+
+ }
+
+ private void copy(InputStream in, OutputStream out) throws IOException {
+ byte[] buffer = new byte[2048];
+ int read;
+
+ while ((read = in.read(buffer)) != -1) {
+ out.write(buffer, 0, read);
+ }
+ }
+
+ public void paintFlash(OutputStream out, Object data) throws IOException {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ if (loader == null) {
+ loader = getClass().getClassLoader();
+ }
+
+ InputStream stream =
loader.getResourceAsStream("resources/flash/text.swf");
+
+ if (stream != null) {
+ try {
+ copy(stream, out);
+ } finally {
+ stream.close();
+ }
+ }
+ }
+}
Modified:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/CommandButtonBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/CommandButtonBean.java 2010-07-10
18:18:32 UTC (rev 17823)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/CommandButtonBean.java 2010-07-10
18:20:31 UTC (rev 17824)
@@ -57,7 +57,7 @@
*/
@PostConstruct
public void init() {
- logger = LoggerFactory.getLogger(CommandButtonBean.class);
+ logger = LoggerFactory.getLogger(getClass());
logger.info("initializing bean " + getClass().getName());
attributes = new Attributes(HtmlCommandButton.class, getClass());
Added: root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/MediaData.java
===================================================================
--- root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/MediaData.java
(rev 0)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/MediaData.java 2010-07-10
18:20:31 UTC (rev 17824)
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+
+package org.richfaces.testapp.bean;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+import java.io.Serializable;
+
+@ManagedBean(name = "mediaData")
+@SessionScoped
+public class MediaData implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ int height = 120;
+ int width = 300;
+ Integer color;
+ float scale;
+ String text;
+
+ public MediaData() {
+ setText("RichFaces 4.0");
+ setColor(1000);
+ setScale(2);
+ System.out.println("MediaData instantiated");
+ }
+
+ public Integer getColor() {
+ return color;
+ }
+
+ public void setColor(Integer color) {
+ this.color = color;
+ }
+
+ public float getScale() {
+ return scale;
+ }
+
+ public void setScale(float scale) {
+ this.scale = scale;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ public int getWidth() {
+ return width;
+ }
+
+ public void setWidth(int width) {
+ this.width = width;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public void setHeight(int height) {
+ this.height = height;
+ }
+}
Modified: root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java 2010-07-10
18:18:32 UTC (rev 17823)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java 2010-07-10
18:20:31 UTC (rev 17824)
@@ -80,7 +80,7 @@
skinningList.add(new SelectItem(Skinning.NONE));
skinningList.add(new SelectItem(Skinning.SKINNING));
skinningList.add(new SelectItem(Skinning.SKINNING_CLASSES));
- skinning = Skinning.NONE;
+ skinning = Skinning.SKINNING;
reTests = false;
reComponent = true;
}
@@ -90,19 +90,18 @@
components.put("a4jCommandLink", "A4J Command Link");
components.put("a4jCommandButton", "A4J Command Button");
+ components.put("a4jLog", "A4J Log");
+ components.put("a4jMediaOutput", "A4J Media Output");
components.put("commandButton", "JSF Command Button");
}
private List<String> createSkinList() {
List<String> skins = new ArrayList<String>();
- skins.add("DEFAULT");
- skins.add("NULL");
skins.add("blueSky");
skins.add("classic");
skins.add("deepMarine");
skins.add("emeraldTown");
skins.add("japanCherry");
- skins.add("plain");
skins.add("ruby");
skins.add("wine");
return skins;
Added:
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JLogBean.properties
===================================================================
---
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JLogBean.properties
(rev 0)
+++
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JLogBean.properties 2010-07-10
18:20:31 UTC (rev 17824)
@@ -0,0 +1,4 @@
+attr.level.error=error
+attr.level.debug=debug
+attr.level.info=info
+attr.level.warn=warn
\ No newline at end of file
Added:
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/A4JMediaOutputBean.properties
===================================================================
Modified: root/tests/metamer/trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/WEB-INF/web.xml 2010-07-10 18:18:32 UTC (rev
17823)
+++ root/tests/metamer/trunk/src/main/webapp/WEB-INF/web.xml 2010-07-10 18:20:31 UTC (rev
17824)
@@ -12,6 +12,10 @@
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
+ <context-param>
+ <param-name>org.richfaces.SKIN</param-name>
+ <param-value>#{richBean.skin}</param-value>
+ </context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
Modified: root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml
===================================================================
---
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml 2010-07-10
18:18:32 UTC (rev 17823)
+++
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml 2010-07-10
18:20:31 UTC (rev 17824)
@@ -1,18 +1,17 @@
<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://java.sun.com/jsf/composite/rich"
-
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core">
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core">
-<h:head>
- <title>A4J Command Link</title>
- <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
- <h:outputStylesheet library="css" name="list.css" />
-</h:head>
+ <h:head>
+ <title>A4J Command Link</title>
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
+ <h:outputStylesheet library="css" name="list.css" />
+ </h:head>
-<h:body>
+ <h:body>
- <h3><h:outputLink
value="simple.xhtml">Simple</h:outputLink></h3>
- <div>Simple page that contains ajax command link and input boxes for all its
attributes.</div>
+ <h3><h:outputLink
value="simple.xhtml">Simple</h:outputLink></h3>
+ <div>Simple page that contains ajax command link and input boxes for all
its attributes.</div>
-</h:body>
+ </h:body>
</html>
\ No newline at end of file
Copied: root/tests/metamer/trunk/src/main/webapp/components/a4jLog/list.xhtml (from rev
17823, root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml)
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/a4jLog/list.xhtml
(rev 0)
+++ root/tests/metamer/trunk/src/main/webapp/components/a4jLog/list.xhtml 2010-07-10
18:20:31 UTC (rev 17824)
@@ -0,0 +1,17 @@
+<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core">
+
+<h:head>
+ <title>A4J Log</title>
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
+ <h:outputStylesheet library="css" name="list.css" />
+</h:head>
+
+<h:body>
+
+ <h3><h:outputLink
value="simple.xhtml">Simple</h:outputLink></h3>
+ <div>Simple page that contains log and input boxes for all its
attributes.</div>
+
+</h:body>
+</html>
\ No newline at end of file
Added: root/tests/metamer/trunk/src/main/webapp/components/a4jLog/simple.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/a4jLog/simple.xhtml
(rev 0)
+++ root/tests/metamer/trunk/src/main/webapp/components/a4jLog/simple.xhtml 2010-07-10
18:20:31 UTC (rev 17824)
@@ -0,0 +1,47 @@
+<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:ta="http://java.sun.com/jsf/composite/testapp">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+
+ <h:outputStylesheet library="css"
name="a4jLog.css"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <h:inputText id="nameInput" value="#{a4jLogBean.name}"
/>
+ <a4j:commandButton id="submit" value="Submit"
render="out" execute="@form" />
+ <a4j:commandButton id="submitDebug" value="Debug
Message" render="out" execute="@form"
action="#{a4jLogBean.debugAction}"/>
+ <a4j:commandButton id="submitInfo" value="Info
Message" render="out" execute="@form"
action="#{a4jLogBean.infoAction}"/>
+ <a4j:commandButton id="submitWarn" value="Warning
Message" render="out" execute="@form"
action="#{a4jLogBean.warnAction}"/>
+ <a4j:commandButton id="submitError" value="Error
Message" render="out" execute="@form"
action="#{a4jLogBean.errorAction}"/>
+
+ <br/>
+
+ <a4j:outputPanel id="out">
+ <h:outputText value="Hello #{a4jLogBean.name}!"
rendered="#{not empty a4jLogBean.name}"/>
+ </a4j:outputPanel>
+
+ <br/><br/>
+
+ <a4j:log id="log"
rendered="#{a4jLogBean.attributes['rendered']}"
level="#{a4jLogBean.attributes['level']}"
+ style="#{a4jLogBean.attributes['style']}"
styleClass="#{a4jLogBean.attributes['styleClass']}"/>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <ta:attributes value="#{a4jLogBean.attributes}"
id="attributes" render="log"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added: root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/flash.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/flash.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/flash.xhtml 2010-07-10
18:20:31 UTC (rev 17824)
@@ -0,0 +1,50 @@
+<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core"
+
xmlns:ta="http://java.sun.com/jsf/composite/testapp">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+
+ <h:outputStylesheet library="css"
name="a4jMediaOutput.css"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <script
src="#{facesContext.externalContext.requestContextPath}/script/swfobject.js"
type="text/javascript"/>
+ <p>SWF Movie:</p>
+ <a4j:outputPanel id="flashPanelDynamic">
+
+ <a4j:mediaOutput element="a" id="swfLink"
style="display: none;" cacheable="false" session="true"
+
createContent="#{a4jMediaOutputBean.paintFlash}" value="#{mediaData}"
/>
+
+ <a4j:outputPanel layout="block"
id="myFlashContent" style="width: 200px; height: 200px">
+ <a
href="http://www.adobe.com/go/getflashplayer">
+ <img
src="http://www.adobe.com/images/shared/download_buttons/get_flash_p...
alt="Get Adobe Flash player" />
+ </a>
+ </a4j:outputPanel>
+
+ <script type="text/javascript">
+ var flashvars = {};
+ var params = {};
+ var attributes = {};
+
swfobject.embedSWF(document.getElementById('form:swfLink').href,
document.getElementById('myFlashContent'), "200", "200",
"9.0.0", false, flashvars, params, attributes);
+ </script>
+
+ </a4j:outputPanel>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <ta:attributes value="#{a4jMediaOutputBean.attributes}"
id="attributes" render="panel"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added: root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/image.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/image.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/image.xhtml 2010-07-10
18:20:31 UTC (rev 17824)
@@ -0,0 +1,31 @@
+<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:ta="http://java.sun.com/jsf/composite/testapp">
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+
+ <h:outputStylesheet library="css"
name="a4jMediaOutput.css"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+ <a4j:mediaOutput id="mediaOutput"
createContent="#{a4jMediaOutputBean.paint}" value="#{mediaData}"
+ element="img" cacheable="false"
session="true" mimeType="image/jpeg" />
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <ta:attributes value="#{a4jMediaOutputBean.attributes}"
id="attributes" render="panel"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Copied: root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/list.xhtml
(from rev 17823,
root/tests/metamer/trunk/src/main/webapp/components/a4jCommandLink/list.xhtml)
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/list.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/a4jMediaOutput/list.xhtml 2010-07-10
18:20:31 UTC (rev 17824)
@@ -0,0 +1,17 @@
+<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core">
+
+<h:head>
+ <title>A4J Media Output</title>
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
+ <h:outputStylesheet library="css" name="list.css" />
+</h:head>
+
+<h:body>
+
+ <h3><h:outputLink
value="image.xhtml">Image</h:outputLink></h3>
+ <div>Simple page that contains media output (image) and input boxes for all its
attributes.</div>
+
+</h:body>
+</html>
\ No newline at end of file
Added: root/tests/metamer/trunk/src/main/webapp/resources/css/a4jLog.css
===================================================================
Added: root/tests/metamer/trunk/src/main/webapp/resources/css/a4jMediaOutput.css
===================================================================
Added: root/tests/metamer/trunk/src/main/webapp/resources/script/swfobject.js
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/resources/script/swfobject.js
(rev 0)
+++ root/tests/metamer/trunk/src/main/webapp/resources/script/swfobject.js 2010-07-10
18:20:31 UTC (rev 17824)
@@ -0,0 +1,733 @@
+/*! SWFObject v2.1 <
http://code.google.com/p/swfobject/>
+ Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
+ This software is released under the MIT License
<
http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ domLoadFnArr = [],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ script,
+ timer = null,
+ storedAltContent = null,
+ storedAltContentId = null,
+ isDomLoaded = false,
+ isExpressInstallActive = false;
+
+ /* Centralized function for browser feature detection
+ - Proprietary feature detection (conditional compiling) is used to detect Internet
Explorer's features
+ - User agent string detection is only used when no alternative is possible
+ - Is executed directly for optimal performance
+ */
+ var ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof
doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] ==
OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF &&
nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin))
{ // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin
indicates whether plug-ins are enabled or disabled in Safari 3+
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10)
: 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ var a = null, fp6Crash = false;
+ try {
+ a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7");
+ }
+ catch(e) {
+ try {
+ a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6");
+ playerVersion = [6,0,21];
+ a.AllowScriptAccess = "always"; // Introduced in fp6.0.47
+ }
+ catch(e) {
+ if (playerVersion[0] == 6) {
+ fp6Crash = true;
+ }
+ }
+ if (!fp6Crash) {
+ try {
+ a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ }
+ catch(e) {}
+ }
+ }
+ if (!fp6Crash && a) { // a will return null when ActiveX is disabled
+ try {
+ d = a.GetVariable("$version"); // Will crash fp6.0.21/23/29
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ catch(e) {}
+ }
+ }
+ var u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,
"$1")) : false, // returns either the webkit version or false if not webkit
+ ie = false,
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u);
+ /*@cc_on
+ ie = true;
+ @if (@_win32)
+ windows = true;
+ @elif (@_mac)
+ mac = true;
+ @end
+ @*/
+ return { w3cdom:w3cdom, pv:playerVersion, webkit:webkit, ie:ie, win:windows, mac:mac
};
+ }();
+
+ /* Cross-browser onDomLoad
+ - Based on Dean Edwards' solution:
http://dean.edwards.name/weblog/2006/06/again/
+ - Will fire an event as soon as the DOM of a page is loaded (supported by Gecko based
browsers - like Firefox -, IE, Opera9+, Safari)
+ */
+ var onDomLoad = function() {
+ if (!ua.w3cdom) {
+ return;
+ }
+ addDomLoadEvent(main);
+ if (ua.ie && ua.win) {
+ try { // Avoid a possible Operation Aborted error
+ doc.write("<scr" + "ipt id=__ie_ondomload defer=true
src=//:></scr" + "ipt>"); // String is split into pieces to avoid
Norton AV to add code that can cause errors
+ script = getElementById("__ie_ondomload");
+ if (script) {
+ addListener(script, "onreadystatechange", checkReadyState);
+ }
+ }
+ catch(e) {}
+ }
+ if (ua.webkit && typeof doc.readyState != UNDEF) {
+ timer = setInterval(function() { if (/loaded|complete/.test(doc.readyState)) {
callDomLoadFunctions(); }}, 10);
+ }
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, null);
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }();
+
+ function checkReadyState() {
+ if (script.readyState == "complete") {
+ script.parentNode.removeChild(script);
+ callDomLoadFunctions();
+ }
+ }
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) {
+ return;
+ }
+ if (ua.ie && ua.win) { // Test if we can really add elements to the DOM; we
don't want to fire it too early
+ var s = createElement("span");
+ try { // Avoid a possible Operation Aborted error
+ var t = doc.getElementsByTagName("body")[0].appendChild(s);
+ t.parentNode.removeChild(t);
+ }
+ catch (e) {
+ return;
+ }
+ }
+ isDomLoaded = true;
+ if (timer) {
+ clearInterval(timer);
+ timer = null;
+ }
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution:
http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() { // Static publishing only
+ var rl = regObjArr.length;
+ for (var i = 0; i < rl; i++) { // For each registered object element
+ var id = regObjArr[i].id;
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ regObjArr[i].width = obj.getAttribute("width") ?
obj.getAttribute("width") : "0";
+ regObjArr[i].height = obj.getAttribute("height") ?
obj.getAttribute("height") : "0";
+ if (hasPlayerVersion(regObjArr[i].swfVersion)) { // Flash plug-in version >=
Flash content version: Houston, we have a match!
+ if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the
object element's nested param elements
+ fixParams(obj);
+ }
+ setVisibility(id, true);
+ }
+ else if (regObjArr[i].expressInstall && !isExpressInstallActive &&
hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { // Show the Adobe
Express Install dialog if set by the web page author and if supported (fp6.0.65+ on
Win/Mac OS only)
+ showExpressInstall(regObjArr[i]);
+ }
+ else { // Flash plug-in and Flash content version mismatch: display alternative
content instead of Flash content
+ displayAltContent(obj);
+ }
+ }
+ }
+ else { // If no fp is installed, we let the object element do its job (show
alternative content)
+ setVisibility(id, true);
+ }
+ }
+ }
+
+ /* Fix nested param elements, which are ignored by older webkit engines
+ - This includes Safari up to and including version 1.2.2 on Mac OS 10.3
+ - Fall back to the proprietary embed element
+ */
+ function fixParams(obj) {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var e = createElement("embed"), a = nestedObj.attributes;
+ if (a) {
+ var al = a.length;
+ for (var i = 0; i < al; i++) {
+ if (a[i].nodeName == "DATA") {
+ e.setAttribute("src", a[i].nodeValue);
+ }
+ else {
+ e.setAttribute(a[i].nodeName, a[i].nodeValue);
+ }
+ }
+ }
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var j = 0; j < cl; j++) {
+ if (c[j].nodeType == 1 && c[j].nodeName == "PARAM") {
+ e.setAttribute(c[j].getAttribute("name"),
c[j].getAttribute("value"));
+ }
+ }
+ }
+ obj.parentNode.replaceChild(e, obj);
+ }
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference:
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(regObj) {
+ isExpressInstallActive = true;
+ var obj = getElementById(regObj.id);
+ if (obj) {
+ if (regObj.altContentId) {
+ var ac = getElementById(regObj.altContentId);
+ if (ac) {
+ storedAltContent = ac;
+ storedAltContentId = regObj.altContentId;
+ }
+ }
+ else {
+ storedAltContent = abstractAltContent(obj);
+ }
+ if (!(/%$/.test(regObj.width)) && parseInt(regObj.width, 10) < 310) {
+ regObj.width = "310";
+ }
+ if (!(/%$/.test(regObj.height)) && parseInt(regObj.height, 10) < 137) {
+ regObj.height = "137";
+ }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ dt = doc.title,
+ fv = "MMredirectURL=" + win.location + "&MMplayerType=" + pt
+ "&MMdoctitle=" + dt,
+ replaceId = regObj.id;
+ // For IE when a SWF is loading (AND: not available in cache) wait for the onload
event to fire to remove the original object element
+ // In IE you cannot properly cancel a loading SWF file without breaking browser load
references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceId += "SWFObjectNew";
+ newObj.setAttribute("id", replaceId);
+ obj.parentNode.insertBefore(newObj, obj); // Insert placeholder div that will be
replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ var fn = function() {
+ obj.parentNode.removeChild(obj);
+ };
+ addListener(win, "onload", fn);
+ }
+ createSWF({ data:regObj.expressInstall, id:EXPRESS_INSTALL_ID, width:regObj.width,
height:regObj.height }, { flashvars:fv }, replaceId);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // For IE when a SWF is loading (AND: not available in cache) wait for the onload
event to fire to remove the original object element
+ // In IE you cannot properly cancel a loading SWF file without breaking browser load
references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // Insert placeholder div that will be replaced
by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ var fn = function() {
+ obj.parentNode.removeChild(obj);
+ };
+ addListener(win, "onload", fn);
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") &&
!(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object
element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // IE, the object element and W3C DOM methods do not
combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other
potential libraries, like Object.prototype.toJSONString = function() {}
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an
ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other
potential libraries
+ par += '<param name="' + j + '" value="' +
parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>'
+ par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // Stored to fix object 'leaks' on
unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the
object element's nested param elements: fall back to the proprietary embed element
+ var e = createElement("embed");
+ e.setAttribute("type", FLASH_MIME_TYPE);
+ for (var k in attObj) {
+ if (attObj[k] != Object.prototype[k]) { // Filter out prototype additions from other
potential libraries
+ if (k.toLowerCase() == "data") {
+ e.setAttribute("src", attObj[k]);
+ }
+ else if (k.toLowerCase() == "styleclass") { // 'class' is an
ECMA4 reserved keyword
+ e.setAttribute("class", attObj[k]);
+ }
+ else if (k.toLowerCase() != "classid") { // Filter out IE specific
attribute
+ e.setAttribute(k, attObj[k]);
+ }
+ }
+ }
+ for (var l in parObj) {
+ if (parObj[l] != Object.prototype[l]) { // Filter out prototype additions from other
potential libraries
+ if (l.toLowerCase() != "movie") { // Filter out IE specific param
element
+ e.setAttribute(l, parObj[l]);
+ }
+ }
+ }
+ el.parentNode.replaceChild(e, el);
+ r = e;
+ }
+ else { // Well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // Filter out prototype additions from other
potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4
reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // Filter out IE specific
attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() !=
"movie") { // Filter out prototype additions from other potential libraries and
IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && (obj.nodeName == "OBJECT" || obj.nodeName ==
"EMBED")) {
+ if (ua.ie && ua.win) {
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ win.attachEvent("onload", function() {
+ removeObjectInIE(id);
+ });
+ }
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions
can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead
of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0]
&& pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution:
http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl) {
+ if (ua.ie && ua.mac) {
+ return;
+ }
+ var h = doc.getElementsByTagName("head")[0], s =
createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", "screen");
+ if (!(ua.ie && ua.win) && typeof doc.createTextNode != UNDEF) {
+ s.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF &&
doc.styleSheets.length > 0) {
+ var ls = doc.styleSheets[doc.styleSheets.length - 1];
+ if (typeof ls.addRule == OBJECT) {
+ try {
+ ls.addRule(sel, decl);
+ } catch(e) {}
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video
threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open
sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+
+ return {
+ /* Public API
+ - Reference:
http://code.google.com/p/swfobject/wiki/SWFObject_2_0_documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr) {
+ if (!ua.w3cdom || !objectIdStr || !swfVersionStr) {
+ return;
+ }
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr ? xiSwfUrlStr : false;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ },
+
+ getObjectById: function(objectIdStr) {
+ var r = null;
+ if (ua.w3cdom) {
+ var o = getElementById(objectIdStr);
+ if (o) {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (!n || (n && typeof o.SetVariable != UNDEF)) {
+ r = o;
+ }
+ else if (typeof n.SetVariable != UNDEF) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr,
xiSwfUrlStr, flashvarsObj, parObj, attObj) {
+ if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr ||
!swfVersionStr) {
+ return;
+ }
+ widthStr += ""; // Auto-convert to string
+ heightStr += "";
+ if (hasPlayerVersion(swfVersionStr)) {
+ setVisibility(replaceElemIdStr, false);
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from
other potential libraries
+ att[i] = attObj[i];
+ }
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from
other potential libraries
+ par[j] = parObj[j];
+ }
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) {
+ if (flashvarsObj[k] != Object.prototype[k]) { // Filter out prototype additions
from other potential libraries
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ }
+ addDomLoadEvent(function() {
+ createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ });
+ }
+ else if (xiSwfUrlStr && !isExpressInstallActive &&
hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) {
+ isExpressInstallActive = true; // deferred execution
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ var regObj = {};
+ regObj.id = regObj.altContentId = replaceElemIdStr;
+ regObj.width = widthStr;
+ regObj.height = heightStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ showExpressInstall(regObj);
+ });
+ }
+ },
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3cdom) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3cdom) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(sel, decl) {
+ if (ua.w3cdom) {
+ createCSS(sel, decl);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ if (q) {
+ var pairs = q.substring(1).split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") +
1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive && storedAltContent) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) {
+ storedAltContent.style.display = "block";
+ }
+ }
+ storedAltContent = null;
+ storedAltContentId = null;
+ isExpressInstallActive = false;
+ }
+ }
+ }
+ };
+}();
Modified: root/tests/metamer/trunk/src/main/webapp/templates/header.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/templates/header.xhtml 2010-07-10 18:18:32
UTC (rev 17823)
+++ root/tests/metamer/trunk/src/main/webapp/templates/header.xhtml 2010-07-10 18:20:31
UTC (rev 17824)
@@ -36,11 +36,11 @@
<h:panelGrid columns="1">
<h:outputLabel id="skinSelectLabel" value="Select skin:
" for="skinSelect" />
- <h:selectOneMenu id="skinSelect"
value="#{richBean.skin}" style="width: 130px;">
+ <h:selectOneMenu id="skinSelect"
value="#{richBean.skin}" style="width: 130px;"
onchange="submit();">
<f:selectItems value="#{richBean.skins}" />
</h:selectOneMenu>
- <h:selectOneMenu id="skinningSelect"
value="#{richBean.skinning}" style="width: 130px;">
+ <h:selectOneMenu id="skinningSelect"
value="#{richBean.skinning}" style="width: 130px;"
onchange="submit();" disabled="true">
<f:selectItems value="#{richBean.skinningList}" />
</h:selectOneMenu>
</h:panelGrid>