JBoss Rich Faces SVN: r20893 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-05 09:26:45 -0500 (Wed, 05 Jan 2011)
New Revision: 20893
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestFormQueue.java
Log:
removed issue tracking for RF-9606 and disabled the FormQueue tests only in plain template (see RF-9430)
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestFormQueue.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestFormQueue.java 2011-01-05 12:51:57 UTC (rev 20892)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/a4jQueue/TestFormQueue.java 2011-01-05 14:26:45 UTC (rev 20893)
@@ -29,13 +29,15 @@
import org.jboss.cheiron.halt.XHRHalter;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.a4jQueue.QueueModel.Input;
-import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
+import org.richfaces.tests.metamer.ftest.annotations.Templates;
import org.testng.annotations.Test;
/**
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
+// https://issues.jboss.org/browse/RF-9430
+@Templates("plain")
public class TestFormQueue extends AbstractMetamerTest {
static final Long GLOBAL_DELAY = 10000L;
@@ -77,7 +79,6 @@
* </p>
*/
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-9606")
public void testTimingOneQueueTwoEvents() {
attributesQueueA.setRequestDelay(DELAY_A);
attributesGlobalQueue.setRequestDelay(GLOBAL_DELAY);
@@ -149,7 +150,6 @@
* </p>
*/
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-9606")
public void testTimingTwoQueuesFourEvents() {
attributesQueueA.setRequestDelay(DELAY_A);
attributesQueueB.setRequestDelay(DELAY_B);
13 years, 11 months
JBoss Rich Faces SVN: r20892 - in sandbox/trunk/examples: irc-client and 12 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2011-01-05 07:51:57 -0500 (Wed, 05 Jan 2011)
New Revision: 20892
Added:
sandbox/trunk/examples/irc-client/
sandbox/trunk/examples/irc-client/pom.xml
sandbox/trunk/examples/irc-client/readme.txt
sandbox/trunk/examples/irc-client/src/
sandbox/trunk/examples/irc-client/src/main/
sandbox/trunk/examples/irc-client/src/main/java/
sandbox/trunk/examples/irc-client/src/main/java/org/
sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/
sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/controller/
sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/controller/ChatBean.java
sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/listeners/
sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/listeners/HornetQInitializer.java
sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/listeners/TopicsInitializer.java
sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/view/
sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/view/SkinBean.java
sandbox/trunk/examples/irc-client/src/main/webapp/
sandbox/trunk/examples/irc-client/src/main/webapp/WEB-INF/
sandbox/trunk/examples/irc-client/src/main/webapp/WEB-INF/faces-config.xml
sandbox/trunk/examples/irc-client/src/main/webapp/WEB-INF/jboss-scanning.xml
sandbox/trunk/examples/irc-client/src/main/webapp/WEB-INF/web.xml
sandbox/trunk/examples/irc-client/src/main/webapp/index.jsp
sandbox/trunk/examples/irc-client/src/main/webapp/templates/
sandbox/trunk/examples/irc-client/src/main/webapp/templates/includes/
sandbox/trunk/examples/irc-client/src/main/webapp/templates/includes/skin-chooser.xhtml
sandbox/trunk/examples/irc-client/src/main/webapp/templates/template.xhtml
sandbox/trunk/examples/irc-client/src/main/webapp/welcome.xhtml
Log:
https://issues.jboss.org/browse/RF-9160
Property changes on: sandbox/trunk/examples/irc-client
___________________________________________________________________
Name: svn:ignore
+ .project
.classpath
.checkstyle
.settings
target
Added: sandbox/trunk/examples/irc-client/pom.xml
===================================================================
--- sandbox/trunk/examples/irc-client/pom.xml (rev 0)
+++ sandbox/trunk/examples/irc-client/pom.xml 2011-01-05 12:51:57 UTC (rev 20892)
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.demo</groupId>
+ <artifactId>irc-client</artifactId>
+ <name>irc-client</name>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>war</packaging>
+
+ <url>http://jboss.org/richfaces</url>
+
+ <repositories>
+ <repository>
+ <id>jboss-public-repository-group</id>
+ <name>Jboss Repository for Maven</name>
+ <url>https://repository.jboss.org/nexus/content/groups/public/</url>
+ </repository>
+ <repository>
+ <id>java-net</id>
+ <name>Java.net Maven Repository</name>
+ <url>http://download.java.net/maven/2</url>
+ </repository>
+ </repositories>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <hornetq.version>2.1.2.Final</hornetq.version>
+ <org.richfaces.bom.version>4.0.0-SNAPSHOT</org.richfaces.bom.version>
+ </properties>
+
+ <build>
+ <finalName>irc-client-${project.version}</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>${basedir}/src/main/java</directory>
+ <targetPath>/WEB-INF/src</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-bom</artifactId>
+ <version>${org.richfaces.bom.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-core</artifactId>
+ <version>${hornetq.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-jms</artifactId>
+ <version>${hornetq.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-logging</artifactId>
+ <version>${hornetq.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.netty</groupId>
+ <artifactId>netty</artifactId>
+ <version>3.2.2.Final</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.jms</groupId>
+ <artifactId>jms</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.atmosphere</groupId>
+ <artifactId>atmosphere-runtime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>pircbot</groupId>
+ <artifactId>pircbot</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <!-- Tests -->
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.10</version>
+ <classifier>jdk15</classifier>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: sandbox/trunk/examples/irc-client/readme.txt
===================================================================
--- sandbox/trunk/examples/irc-client/readme.txt (rev 0)
+++ sandbox/trunk/examples/irc-client/readme.txt 2011-01-05 12:51:57 UTC (rev 20892)
@@ -0,0 +1,9 @@
+Project generated with richfaces-archetype-simpleapp
+
+To build this project for Tomcat 6 run
+
+ mvn clean package
+
+If you wan to create a binaries for both Tomcat 6 and JBoss 6 run
+
+ mvn clean package -P release
\ No newline at end of file
Added: sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/controller/ChatBean.java
===================================================================
--- sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/controller/ChatBean.java (rev 0)
+++ sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/controller/ChatBean.java 2011-01-05 12:51:57 UTC (rev 20892)
@@ -0,0 +1,185 @@
+package org.ircclient.controller;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.text.MessageFormat;
+import java.util.Date;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+
+import org.jibble.pircbot.IrcException;
+import org.jibble.pircbot.NickAlreadyInUseException;
+import org.jibble.pircbot.PircBot;
+import org.jibble.pircbot.User;
+import org.richfaces.application.push.MessageException;
+import org.richfaces.application.push.TopicKey;
+import org.richfaces.application.push.TopicsContext;
+import org.richfaces.log.LogFactory;
+import org.richfaces.log.Logger;
+
+@ManagedBean
+@SessionScoped
+public class ChatBean extends PircBot implements Serializable {
+
+ private static final long serialVersionUID = -4945680041914388092L;
+ private static final String SERVER_URL = "irc.freenode.org";
+ private static final int SERVER_PORT = 6667;
+ private static final String CHANNEL_PREFIX = "#";
+ private static final String DEFAULT_CHANNEL = "richfaces";
+ private static final Logger LOGGER = LogFactory.getLogger(ChatBean.class);
+
+ private String channelName;
+ private String message;
+ private transient TopicsContext topicsContext;
+
+ public ChatBean() {
+ LOGGER.info("TOPICS CONTEXT INITIALIZED");
+ topicsContext = TopicsContext.lookup();
+ }
+
+ public void connect() {
+ try {
+ this.connect(SERVER_URL, SERVER_PORT);
+ this.joinChannel(CHANNEL_PREFIX + DEFAULT_CHANNEL);
+ channelName = DEFAULT_CHANNEL;
+ } catch (NickAlreadyInUseException e) {
+ FacesContext.getCurrentInstance().addMessage(
+ null,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR, this.getName() + " nick already in use", this.getName()
+ + " nick already in use"));
+ } catch (IOException e) {
+ FacesContext.getCurrentInstance().addMessage(
+ null,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR, "Sorry, server unresponsible. Try again later.",
+ "Sorry, server unresponsible. Try again later."));
+ } catch (IrcException e) {
+ FacesContext.getCurrentInstance().addMessage(
+ null,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ "Sorry, we encountered IRC services problems. Try again later.",
+ "Sorry, we encountered IRC services problems. Try again later."));
+ }
+ }
+
+ public void leave(){
+ this.disconnect();
+ }
+
+ @Override
+ protected void onMessage(String channel, String sender, String login, String hostname, String message) {
+ String channelName = channel.replace(CHANNEL_PREFIX, "");
+ try {
+ topicsContext.publish(new TopicKey("chat", channelName),
+ MessageFormat.format("{0,time,medium} {1}: {2}", new Date(), sender, message));
+ } catch (MessageException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ }
+
+ @Override
+ protected void onUserList(String channel, User[] users) {
+ try {
+ topicsContext.publish(new TopicKey("chat", channelName + "List"), null);
+ } catch (MessageException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ }
+
+ @Override
+ protected void onJoin(String channel, String sender, String login, String hostname) {
+ try {
+ topicsContext.publish(new TopicKey("chat", channelName + "List"), null);
+ topicsContext.publish(new TopicKey("chat", channelName),
+ MessageFormat.format("{0,time,medium} {1}: {2}", new Date(), sender, "joined channel"));
+ } catch (MessageException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ }
+
+ @Override
+ protected void onPart(String channel, String sender, String login, String hostname) {
+ try {
+ topicsContext.publish(new TopicKey("chat", channelName + "List"), null);
+ topicsContext.publish(new TopicKey("chat", channelName),
+ MessageFormat.format("{0,time,medium} {1}: {2}", new Date(), sender, "left channel"));
+ } catch (MessageException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ }
+
+ @Override
+ protected void onNickChange(String oldNick, String login, String hostname, String newNick) {
+ try {
+ topicsContext.publish(new TopicKey("chat", channelName + "List"), null);
+ topicsContext.publish(new TopicKey("chat", channelName),
+ MessageFormat.format("{0,time,medium} {1}", new Date(), oldNick + " changed nick to " + newNick));
+ } catch (MessageException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ }
+
+ @Override
+ protected void onQuit(String sourceNick, String sourceLogin, String sourceHostname, String reason) {
+ try {
+ topicsContext.publish(new TopicKey("chat", channelName + "List"), null);
+ topicsContext.publish(new TopicKey("chat", channelName),
+ MessageFormat.format("{0,time,medium} {1}: {2} {3}", new Date(), sourceNick, "joined channel", reason));
+ } catch (MessageException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ }
+
+ public User[] getUsers() {
+ return this.getUsers(CHANNEL_PREFIX + channelName);
+ }
+
+ public void send() {
+ this.sendMessage(CHANNEL_PREFIX + channelName, message);
+ try {
+ topicsContext.publish(new TopicKey("chat", channelName),
+ MessageFormat.format("{0,time,medium} {1}: {2}", new Date(), this.getName(), message));
+ } catch (MessageException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ }
+
+ public void changeNick(ValueChangeEvent event) {
+ this.changeNick((String) event.getNewValue());
+ }
+
+ public String getServerName() {
+ return SERVER_URL;
+ }
+
+ public void setUserName(String userName) {
+ this.setName(userName);
+ }
+
+ public String getUserName() {
+ if (this.getName().equalsIgnoreCase("PircBot")) {
+ return "";
+ } else {
+ return this.getName();
+ }
+ }
+
+ public String getChannelName() {
+ return channelName;
+ }
+
+ public void setChannelName(String channelName) {
+ this.channelName = channelName;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+}
Added: sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/listeners/HornetQInitializer.java
===================================================================
--- sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/listeners/HornetQInitializer.java (rev 0)
+++ sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/listeners/HornetQInitializer.java 2011-01-05 12:51:57 UTC (rev 20892)
@@ -0,0 +1,118 @@
+/*
+ * 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.ircclient.listeners;
+
+import java.util.HashSet;
+
+import javax.faces.application.Application;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.PostConstructApplicationEvent;
+import javax.faces.event.PreDestroyApplicationEvent;
+import javax.faces.event.SystemEvent;
+import javax.faces.event.SystemEventListener;
+import javax.naming.InitialContext;
+
+import org.hornetq.api.core.TransportConfiguration;
+import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
+import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
+import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.HornetQServers;
+import org.hornetq.jms.server.JMSServerManager;
+import org.hornetq.jms.server.impl.JMSServerManagerImpl;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class HornetQInitializer implements SystemEventListener {
+
+ private JMSServerManager serverManager;
+
+ public void processEvent(SystemEvent event) throws AbortProcessingException {
+ if (event instanceof PostConstructApplicationEvent) {
+ try {
+ startHornetQ();
+ } catch (Exception e) {
+ throw new AbortProcessingException(e);
+ }
+
+ Application application = FacesContext.getCurrentInstance().getApplication();
+ application.subscribeToEvent(PreDestroyApplicationEvent.class, this);
+ } else {
+ try {
+ stopHornetQ();
+ } catch (Exception e) {
+ throw new AbortProcessingException(e);
+ }
+ }
+ }
+
+ /**
+ * @throws Exception
+ *
+ */
+ private void stopHornetQ() throws Exception {
+ serverManager.stop();
+ serverManager = null;
+ }
+
+ /**
+ * @throws Exception
+ *
+ */
+ private void startHornetQ() throws Exception {
+ // Step 2. Create the Configuration, and set the properties accordingly
+ Configuration configuration = new ConfigurationImpl();
+ configuration.setPersistenceEnabled(false);
+ configuration.setSecurityEnabled(false);
+
+ TransportConfiguration transpConf = new TransportConfiguration(NettyAcceptorFactory.class.getName());
+
+ HashSet<TransportConfiguration> setTransp = new HashSet<TransportConfiguration>();
+ setTransp.add(transpConf);
+
+ configuration.setAcceptorConfigurations(setTransp);
+
+ // Step 3. Create and start the server
+ HornetQServer server = HornetQServers.newHornetQServer(configuration);
+
+ serverManager = new JMSServerManagerImpl(server);
+
+ // if you want to use JNDI, simple inject a context here or don't call this method and make sure the JNDI
+ // parameters are set.
+ serverManager.setContext(new InitialContext());
+ serverManager.start();
+
+ serverManager.createConnectionFactory("ConnectionFactory", new TransportConfiguration(
+ NettyConnectorFactory.class.getName()), "ConnectionFactory");
+
+ serverManager.createTopic(false, "chat", "/topic/chat");
+ }
+
+ public boolean isListenerForSource(Object source) {
+ return true;
+ }
+
+}
Added: sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/listeners/TopicsInitializer.java
===================================================================
--- sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/listeners/TopicsInitializer.java (rev 0)
+++ sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/listeners/TopicsInitializer.java 2011-01-05 12:51:57 UTC (rev 20892)
@@ -0,0 +1,92 @@
+/*
+ * 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.ircclient.listeners;
+
+import java.text.MessageFormat;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.SystemEvent;
+import javax.faces.event.SystemEventListener;
+import javax.servlet.http.HttpServletRequest;
+
+import org.ircclient.controller.ChatBean;
+import org.richfaces.application.push.EventAbortedException;
+import org.richfaces.application.push.Session;
+import org.richfaces.application.push.SessionPreSubscriptionEvent;
+import org.richfaces.application.push.SessionSubscriptionEvent;
+import org.richfaces.application.push.SessionTopicListener;
+import org.richfaces.application.push.SessionUnsubscriptionEvent;
+import org.richfaces.application.push.Topic;
+import org.richfaces.application.push.TopicKey;
+import org.richfaces.application.push.TopicsContext;
+import org.richfaces.application.push.impl.DefaultMessageDataSerializer;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class TopicsInitializer implements SystemEventListener {
+
+ public void processEvent(SystemEvent event) throws AbortProcessingException {
+ TopicsContext topicsContext = TopicsContext.lookup();
+
+ Topic topic = topicsContext.getOrCreateTopic(new TopicKey("chat"));
+
+ topic.setMessageDataSerializer(DefaultMessageDataSerializer.instance());
+
+ topic.addTopicListener(new SessionTopicListener() {
+
+ public void processUnsubscriptionEvent(SessionUnsubscriptionEvent event) throws EventAbortedException {
+ TopicKey topicKey = event.getTopicKey();
+ Session session = event.getSession();
+ System.out.println(MessageFormat.format("Session {0} disconnected from {1}", session.getId(),
+ topicKey.getTopicAddress()));
+ }
+
+ public void processSubscriptionEvent(SessionSubscriptionEvent event) throws EventAbortedException {
+ TopicKey topicKey = event.getTopicKey();
+ Session session = event.getSession();
+
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ HttpServletRequest hsr = (HttpServletRequest) facesContext.getExternalContext().getRequest();
+
+ System.out.println(MessageFormat.format("Session {0} connected to {1} from {2}", session.getId(),
+ topicKey.getTopicAddress(), hsr.getRemoteAddr()));
+ }
+
+ public void processPreSubscriptionEvent(SessionPreSubscriptionEvent event) throws EventAbortedException {
+ ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
+ ChatBean chatBean = (ChatBean) externalContext.getSessionMap().get("chatBean");
+ if (chatBean == null || !(chatBean.isConnected())) {
+ throw new EventAbortedException("We are not connected to IRC");
+ }
+ }
+ });
+ }
+
+ public boolean isListenerForSource(Object source) {
+ return true;
+ }
+
+}
Added: sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/view/SkinBean.java
===================================================================
--- sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/view/SkinBean.java (rev 0)
+++ sandbox/trunk/examples/irc-client/src/main/java/org/ircclient/view/SkinBean.java 2011-01-05 12:51:57 UTC (rev 20892)
@@ -0,0 +1,70 @@
+/**
+ *
+ */
+package org.ircclient.view;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.SessionScoped;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author ishaikovsky
+ */
+@ManagedBean(name = "skinBean")
+@SessionScoped
+public class SkinBean implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = -2399884208294434812L;
+ private static final String SKIN_VIEW_PARAMETER = "skin";
+ @ManagedProperty(value = "blueSky")
+ private String skin;
+ private List<String> skins;
+
+ @PostConstruct
+ public void initialize() {
+ skins = new ArrayList<String>();
+ skins.add("blueSky");
+ skins.add("classic");
+ skins.add("deepMarine");
+ skins.add("emeraldTown");
+ skins.add("japanCherry");
+ skins.add("ruby");
+ skins.add("wine");
+ }
+
+ // TODO: move to utility class. used in navigator also.
+ private String getViewParameter(String name) {
+ FacesContext fc = FacesContext.getCurrentInstance();
+ String param = (String) fc.getExternalContext().getRequestParameterMap().get(name);
+ if (param != null && param.trim().length() > 0) {
+ return param;
+ } else {
+ return null;
+ }
+ }
+
+ public String getSkin() {
+ String currentSkin = getViewParameter(SKIN_VIEW_PARAMETER);
+ if (currentSkin != null) {
+ skin = currentSkin;
+ }
+ return skin;
+ }
+
+ public void setSkin(String skin) {
+ this.skin = skin;
+ }
+
+ public List<String> getSkins() {
+ return skins;
+ }
+
+}
Added: sandbox/trunk/examples/irc-client/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- sandbox/trunk/examples/irc-client/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ sandbox/trunk/examples/irc-client/src/main/webapp/WEB-INF/faces-config.xml 2011-01-05 12:51:57 UTC (rev 20892)
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
+
+ <application>
+ <system-event-listener>
+ <system-event-listener-class>org.ircclient.listeners.HornetQInitializer</system-event-listener-class>
+ <system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
+ </system-event-listener>
+ <system-event-listener>
+ <system-event-listener-class>org.ircclient.listeners.TopicsInitializer</system-event-listener-class>
+ <system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
+ </system-event-listener>
+ </application>
+</faces-config>
Added: sandbox/trunk/examples/irc-client/src/main/webapp/WEB-INF/jboss-scanning.xml
===================================================================
--- sandbox/trunk/examples/irc-client/src/main/webapp/WEB-INF/jboss-scanning.xml (rev 0)
+++ sandbox/trunk/examples/irc-client/src/main/webapp/WEB-INF/jboss-scanning.xml 2011-01-05 12:51:57 UTC (rev 20892)
@@ -0,0 +1,11 @@
+<scanning xmlns="urn:jboss:scanning:1.0">
+<!--
+ For JBoss AS 6 integration there is a conflict with guava, and
+ google-collections. JBAS-8361
+-->
+ <path name="WEB-INF/classes"></path>
+
+ <path name="WEB-INF/lib/guava-r07.jar">
+ <exclude name="com.google.common.collect" />
+ </path>
+</scanning>
\ No newline at end of file
Added: sandbox/trunk/examples/irc-client/src/main/webapp/WEB-INF/web.xml
===================================================================
--- sandbox/trunk/examples/irc-client/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ sandbox/trunk/examples/irc-client/src/main/webapp/WEB-INF/web.xml 2011-01-05 12:51:57 UTC (rev 20892)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+ id="WebApp_ID" version="3.0">
+ <display-name>IRC-Client Application</display-name>
+ <context-param>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.SKIP_COMMENTS</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.skin</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <filter>
+ <filter-name>PushFilter</filter-name>
+ <filter-class>org.richfaces.webapp.PushFilter</filter-class>
+ <async-supported>true</async-supported>
+ </filter>
+ <filter-mapping>
+ <filter-name>PushFilter</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ </filter-mapping>
+ <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>*.jsf</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+ <mime-mapping>
+ <extension>ecss</extension>
+ <mime-type>text/css</mime-type>
+ </mime-mapping>
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: sandbox/trunk/examples/irc-client/src/main/webapp/index.jsp
===================================================================
--- sandbox/trunk/examples/irc-client/src/main/webapp/index.jsp (rev 0)
+++ sandbox/trunk/examples/irc-client/src/main/webapp/index.jsp 2011-01-05 12:51:57 UTC (rev 20892)
@@ -0,0 +1,7 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head></head>
+ <body>
+ <jsp:forward page="/welcome.jsf" />
+ </body>
+</html>
\ No newline at end of file
Added: sandbox/trunk/examples/irc-client/src/main/webapp/templates/includes/skin-chooser.xhtml
===================================================================
--- sandbox/trunk/examples/irc-client/src/main/webapp/templates/includes/skin-chooser.xhtml (rev 0)
+++ sandbox/trunk/examples/irc-client/src/main/webapp/templates/includes/skin-chooser.xhtml 2011-01-05 12:51:57 UTC (rev 20892)
@@ -0,0 +1,25 @@
+<!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:rich="http://richfaces.org/rich">
+
+<ui:composition>
+ <h:form>
+ <rich:panel styleClass="skin-chooser">
+ <a4j:repeat var="skin" value="#{skinBean.skins}"
+ iterationStatusVar="iterStatus">
+ <h:link value="#{skin}" includeViewParams="true">
+ <f:param name="skin" value="#{skin}" />
+ <f:attribute name="style"
+ value="#{(skin==skinBean.skin) ? 'color:orange' : ''}" />
+ </h:link>
+ <h:outputText value=" | " rendered="#{not iterStatus.last}" />
+ </a4j:repeat>
+ </rich:panel>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: sandbox/trunk/examples/irc-client/src/main/webapp/templates/template.xhtml
===================================================================
--- sandbox/trunk/examples/irc-client/src/main/webapp/templates/template.xhtml (rev 0)
+++ sandbox/trunk/examples/irc-client/src/main/webapp/templates/template.xhtml 2011-01-05 12:51:57 UTC (rev 20892)
@@ -0,0 +1,21 @@
+<!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">
+<f:view contentType="text/html">
+ <f:metadata>
+ <f:viewParam name="skin" value="#{skinBean.skin}" />
+ </f:metadata>
+ <h:head>
+ <title><ui:define name="title">Application Title</ui:define></title>
+ <meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />
+ </h:head>
+
+ <h:body>
+ <ui:include src="/templates/includes/skin-chooser.xhtml" />
+ <ui:insert name="body">Default content</ui:insert>
+ </h:body>
+</f:view>
+</html>
Added: sandbox/trunk/examples/irc-client/src/main/webapp/welcome.xhtml
===================================================================
--- sandbox/trunk/examples/irc-client/src/main/webapp/welcome.xhtml (rev 0)
+++ sandbox/trunk/examples/irc-client/src/main/webapp/welcome.xhtml 2011-01-05 12:51:57 UTC (rev 20892)
@@ -0,0 +1,80 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition 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:rich="http://richfaces.org/rich"
+ xmlns:c="http://java.sun.com/jsp/jstl/core"
+ template="/templates/template.xhtml">
+ <ui:define name="body">
+ <style>
+.chatOutput {
+ overflow: auto;
+ width: 80%;
+ height: 200px;
+ float: left;
+}
+
+.chatList {
+ float: right;
+ width: 19%;
+ height: 200px;
+ overflow: auto;
+}
+</style>
+ <rich:panel header="Connect to IRC"
+ rendered="#{not chatBean.connected}">
+ <h:form>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:messages style="color:red" />
+ </a4j:outputPanel>
+ <h:panelGrid columns="2">
+ <h:outputText value="Your nickname:" />
+ <h:inputText required="true" id="name" value="#{chatBean.userName}" />
+ <h:outputText value="Channel:" />
+ <h:outputText value="RichFaces" style="font-weight:bold"/>
+ <h:outputText value="Server:" />
+ <h:outputText value="irc.freenode.org" style="font-weight:bold"/>
+ </h:panelGrid>
+ <a4j:commandButton value="Connect" execute="@form" render="@all"
+ action="#{chatBean.connect}" />
+ </h:form>
+ </rich:panel>
+ <rich:panel
+ header="Welcome to #{chatBean.channelName} channel at #{chatBean.serverName}"
+ rendered="#{chatBean.connected}" id="chatpanel">
+ <rich:panel styleClass="chatOutput"
+ bodyClass="#{chatBean.channelName}Output" />
+ <rich:panel styleClass="chatList">
+ <rich:list value="#{chatBean.users}" var="user" id="users"
+ type="unordered">
+ #{user.nick}
+ </rich:list>
+ </rich:panel>
+ <br clear="all" />
+ <hr />
+ <h:form>
+ <a4j:push address="#{chatBean.channelName}List@chat"
+ onerror="alert(event.rf.data)">
+ <a4j:ajax event="dataavailable" render="users" execute="@none" />
+ </a4j:push>
+ <a4j:push address="#{chatBean.channelName}@chat"
+ onerror="alert(event.rf.data)"
+ ondataavailable="jQuery('<div />').prependTo('.#{chatBean.channelName}Output').text(event.rf.data)" />
+ <h:inputTextarea value="#{chatBean.message}" rows="3"
+ style="width:80%" id="nm" />
+ <a4j:commandButton value="Send" action="#{chatBean.send}"
+ render="@none" execute="@form" />
+ </h:form>
+ <hr />
+ <h:form>
+ <rich:panel header="Change nickname:">
+ <h:inputText valueChangeListener="#{chatBean.changeNick}" id="cn" />
+ <a4j:commandButton value="Change" execute="@form" render="@none"/>
+ </rich:panel>
+ <a4j:commandButton value="disconnect" action="#{chatBean.leave}" execute="@none" render="@all"/>
+ </h:form>
+ </rich:panel>
+ </ui:define>
+</ui:composition>
\ No newline at end of file
13 years, 11 months
JBoss Rich Faces SVN: r20891 - in trunk: ui/common/api/src/main/java/org/richfaces/renderkit/util and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2011-01-05 07:19:36 -0500 (Wed, 05 Jan 2011)
New Revision: 20891
Added:
trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java
trunk/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/icons.ecss
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/AccordionRendererTest.java
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/accordionItem.xhtml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/accordionItem.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/collapsiblePanel.xhtml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/collapsiblePanel.xmlunit.xml
Removed:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuIcons.java
Modified:
trunk/examples/output-demo/src/main/webapp/templates/template.xhtml
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/RendererBase.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordion.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordionItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlPanelMenu.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordionItem.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/collapsiblePanel.ecss
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/collapsiblePanelItem.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuGroup.js
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/CollapsiblePanelRendererTest.java
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-group.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-groupDis.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-item.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-itemDis.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroup.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroupDis.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topItem.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topItemDis.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml
Log:
RF-9435, RF-9862
Modified: trunk/examples/output-demo/src/main/webapp/templates/template.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/templates/template.xhtml 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/examples/output-demo/src/main/webapp/templates/template.xhtml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -11,8 +11,22 @@
<meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />
<h:outputScript library="javax.faces" name="jsf.js" target="head" />
+
+ <style type="text/css">
+ .collapsed { display: none; }
+ .menu {
+ background-color:#7fffd4;
+ }
+
+ .selected {
+ background-color:blue;
+ color:white;
+ }
+ </style>
</h:head>
+
+
<h:body>
<ui:insert name="scripts" ></ui:insert>
@@ -41,8 +55,8 @@
<tr valign="top">
<td>
<h:form id="nav">
- <p>Toggle Panel</p>
- <ul>
+ <p class="menu">Toggle Panel</p>
+ <ul class="collapsed" >
<li>
<p>Examples</p>
<ul>
@@ -61,8 +75,8 @@
</ul>
- <p>Accordion</p>
- <ul>
+ <p class="menu">Accordion</p>
+ <ul class="collapsed" >
<li>
<p>Examples</p>
<ul>
@@ -85,8 +99,8 @@
</li>
</ul>
- <p>Collapsible Panel</p>
- <ul>
+ <p class="menu">Collapsible Panel</p>
+ <ul class="collapsed">
<li>
<p>Examples</p>
<ul>
@@ -99,8 +113,8 @@
</li>
</ul>
- <p>Tab Panel</p>
- <ul>
+ <p class="menu">Tab Panel</p>
+ <ul class="collapsed">
<li>
<p>Examples</p>
<ul>
@@ -113,8 +127,8 @@
</li>
</ul>
- <p>Panel Menu</p>
- <ul>
+ <p class="menu">Panel Menu</p>
+ <ul class="collapsed">
<li>
<p>Examples</p>
<ul>
@@ -127,8 +141,8 @@
</li>
</ul>
- <p>Tooltip</p>
- <ul>
+ <p class="menu">Tooltip</p>
+ <ul class="collapsed">
<li>
<p>Examples</p>
<ul>
@@ -145,8 +159,8 @@
</li>
</ul>
- <p>Toolbar</p>
- <ul>
+ <p class="menu">Toolbar</p>
+ <ul class="collapsed">
<li>
<p>Examples</p>
<ul>
@@ -156,9 +170,9 @@
</ul>
</li>
</ul>
-
- <p>DropDown Menu</p>
- <ul>
+
+ <p class="menu">DropDown Menu</p>
+ <ul class="collapsed">
<li>
<p>Examples</p>
<ul>
@@ -167,8 +181,14 @@
</li>
</ul>
</li>
- </ul>
+ </ul>
+ <script type="text/javascript">
+ $(".menu").click(function () {
+ $(this).toggleClass("selected");
+ $(this).next("ul").toggleClass("collapsed")
+ })
+ </script>
</h:form>
</td>
Copied: trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java (from rev 20872, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuIcons.java)
===================================================================
--- trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java (rev 0)
+++ trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -0,0 +1,37 @@
+package org.richfaces.renderkit.util;
+
+public enum PanelIcons {
+ none("rf-ico-none"),
+ disc("rf-ico-disc"),
+ grid("rf-ico-grid"),
+ chevron("rf-ico-chevron"),
+ chevronUp("rf-ico-chevron-up"),
+ chevronDown("rf-ico-chevron-down"),
+ triangle("rf-ico-triangle"),
+ triangleUp("rf-ico-triangle-up"),
+ triangleDown("rf-ico-triangle-down");
+
+ public static final PanelIcons DEFAULT = none;
+
+ private final String cssClass;
+
+ private PanelIcons(String cssClass) {
+ this.cssClass = cssClass;
+ }
+
+ public String cssClass() {
+ return cssClass;
+ }
+
+ public static PanelIcons getIcon(String attrIconCollapsedValue) {
+ if (attrIconCollapsedValue == null) {
+ return null;
+ }
+
+ try {
+ return PanelIcons.valueOf(attrIconCollapsedValue);
+ } catch (IllegalArgumentException e) {
+ return null;
+ }
+ }
+}
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/RendererBase.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/RendererBase.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/RendererBase.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -280,11 +280,11 @@
}
}
- public String concatClasses(Object... objects) {
+ public static String concatClasses(Object... objects) {
return HtmlUtil.concatClasses(objects);
}
- public String concatStyles(Object... objects) {
+ public static String concatStyles(Object... objects) {
return HtmlUtil.concatStyles(objects);
}
}
Added: trunk/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/icons.ecss
===================================================================
--- trunk/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/icons.ecss (rev 0)
+++ trunk/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/icons.ecss 2011-01-05 12:19:36 UTC (rev 20891)
@@ -0,0 +1,13 @@
+
+.rf-ico-none { width: 16px; height: 16px; }
+.rf-ico-chevron { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Chevron.png']})" }
+.rf-ico-chevron-down { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:ChevronDown.png']})" }
+.rf-ico-chevron-left { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:ChevronLeft.png']})" }
+.rf-ico-chevron-up { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:ChevronUp.png']})" }
+.rf-ico-disc { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Disc.png']})" }
+.rf-ico-grid { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Grid.png']})" }
+.rf-ico-spacer { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Spacer.png']})" }
+.rf-ico-triangle { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Triangle.png']})" }
+.rf-ico-triangle-down { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:TriangleDown.png']})" }
+.rf-ico-triangle-left { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:TriangleLeft.png']})" }
+.rf-ico-triangle-up { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:TriangleUp.png']})" }
\ No newline at end of file
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelTitledItem.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -28,6 +28,8 @@
import javax.faces.context.FacesContext;
import java.io.IOException;
+import static org.richfaces.renderkit.html.DivPanelRenderer.capitalize;
+
/**
* @author akolonitsky
* @since 2010-08-05
@@ -52,6 +54,10 @@
public String abbreviation() {
return abbreviation;
}
+
+ public String headerClass() {
+ return "headerClass" + capitalize(this.toString());
+ }
}
protected AbstractTogglePanelTitledItem() {
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordion.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordion.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordion.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -53,6 +53,13 @@
public enum PropertyKeys {
+ itemLeftIconActive,
+ itemLeftIconInactive,
+ itemLeftIconDisabled,
+ itemRightIconActive,
+ itemRightIconInactive,
+ itemRightIconDisabled,
+
itemHeaderClassActive,
itemHeaderClassDisabled,
itemHeaderClassInactive,
@@ -85,6 +92,54 @@
return COMPONENT_FAMILY;
}
+ public String getItemLeftIconActive() {
+ return (String) getStateHelper().eval(PropertyKeys.itemLeftIconActive);
+ }
+
+ public void setItemLeftIconActive(String itemLeftIconActive) {
+ getStateHelper().put(PropertyKeys.itemLeftIconActive, itemLeftIconActive);
+ }
+
+ public String getItemLeftIconInactive() {
+ return (String) getStateHelper().eval(PropertyKeys.itemLeftIconInactive);
+ }
+
+ public void setItemLeftIconInactive(String itemLeftIconInactive) {
+ getStateHelper().put(PropertyKeys.itemLeftIconInactive, itemLeftIconInactive);
+ }
+
+ public String getItemLeftIconDisabled() {
+ return (String) getStateHelper().eval(PropertyKeys.itemLeftIconDisabled);
+ }
+
+ public void setItemLeftIconDisabled(String itemLeftIconDisabled) {
+ getStateHelper().put(PropertyKeys.itemLeftIconDisabled, itemLeftIconDisabled);
+ }
+
+ public String getItemRightIconActive() {
+ return (String) getStateHelper().eval(PropertyKeys.itemRightIconActive);
+ }
+
+ public void setItemRightIconActive(String itemRightIconActive) {
+ getStateHelper().put(PropertyKeys.itemRightIconActive, itemRightIconActive);
+ }
+
+ public String getItemRightIconInactive() {
+ return (String) getStateHelper().eval(PropertyKeys.itemRightIconInactive);
+ }
+
+ public void setItemRightIconInactive(String itemRightIconInactive) {
+ getStateHelper().put(PropertyKeys.itemRightIconInactive, itemRightIconInactive);
+ }
+
+ public String getItemRightIconDisabled() {
+ return (String) getStateHelper().eval(PropertyKeys.itemRightIconDisabled);
+ }
+
+ public void setItemRightIconDisabled(String itemRightIconDisabled) {
+ getStateHelper().put(PropertyKeys.itemRightIconDisabled, itemRightIconDisabled);
+ }
+
public String getWidth() {
return (String) getStateHelper().eval(PropertyKeys.width);
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordionItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordionItem.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlAccordionItem.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -60,6 +60,13 @@
public enum PropertyKeys {
+ leftIconActive,
+ leftIconInactive,
+ leftIconDisabled,
+ rightIconActive,
+ rightIconInactive,
+ rightIconDisabled,
+
headerClassActive,
headerClassDisabled,
headerClassInactive,
@@ -100,6 +107,54 @@
return (HtmlAccordion) ToggleControl.getEnclosedPanel(this);
}
+ public String getLeftIconActive() {
+ return (String) getStateHelper().eval(PropertyKeys.leftIconActive, getAccordion().getItemLeftIconActive());
+ }
+
+ public void setLeftIconActive(String leftIconActive) {
+ getStateHelper().put(PropertyKeys.leftIconActive, leftIconActive);
+ }
+
+ public String getLeftIconInactive() {
+ return (String) getStateHelper().eval(PropertyKeys.leftIconInactive, getAccordion().getItemLeftIconInactive());
+ }
+
+ public void setLeftIconInactive(String leftIconInactive) {
+ getStateHelper().put(PropertyKeys.leftIconInactive, leftIconInactive);
+ }
+
+ public String getLeftIconDisabled() {
+ return (String) getStateHelper().eval(PropertyKeys.leftIconDisabled, getAccordion().getItemLeftIconDisabled());
+ }
+
+ public void setLeftIconDisabled(String leftIconDisabled) {
+ getStateHelper().put(PropertyKeys.leftIconDisabled, leftIconDisabled);
+ }
+
+ public String getRightIconActive() {
+ return (String) getStateHelper().eval(PropertyKeys.rightIconActive, getAccordion().getItemRightIconActive());
+ }
+
+ public void setRightIconActive(String rightIconActive) {
+ getStateHelper().put(PropertyKeys.rightIconActive, rightIconActive);
+ }
+
+ public String getRightIconInactive() {
+ return (String) getStateHelper().eval(PropertyKeys.rightIconInactive, getAccordion().getItemRightIconInactive());
+ }
+
+ public void setRightIconInactive(String rightIconInactive) {
+ getStateHelper().put(PropertyKeys.rightIconInactive, rightIconInactive);
+ }
+
+ public String getRightIconDisabled() {
+ return (String) getStateHelper().eval(PropertyKeys.rightIconDisabled, getAccordion().getItemRightIconDisabled());
+ }
+
+ public void setRightIconDisabled(String rightIconDisabled) {
+ getStateHelper().put(PropertyKeys.rightIconDisabled, rightIconDisabled);
+ }
+
public String getHeaderClassActive() {
return (String) getStateHelper().eval(PropertyKeys.headerClassActive, getAccordion().getItemHeaderClassActive());
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlPanelMenu.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlPanelMenu.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlPanelMenu.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -24,7 +24,7 @@
package org.richfaces.component.html;
import org.richfaces.component.UIPanelMenu;
-import org.richfaces.renderkit.html.PanelMenuIcons;
+import org.richfaces.renderkit.util.PanelIcons;
import javax.faces.component.behavior.ClientBehaviorHolder;
import java.util.Arrays;
@@ -143,7 +143,7 @@
}
public String getItemIconLeft() {
- return (String) getStateHelper().eval(PropertyKeys.itemIconLeft, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.itemIconLeft, PanelIcons.DEFAULT.toString());
}
public void setItemIconLeft(String itemIconLeft) {
@@ -151,7 +151,7 @@
}
public String getItemIconRight() {
- return (String) getStateHelper().eval(PropertyKeys.itemIconRight, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.itemIconRight, PanelIcons.DEFAULT.toString());
}
public void setItemIconRight(String itemIconRight) {
@@ -159,7 +159,7 @@
}
public String getItemDisableIconLeft() {
- return (String) getStateHelper().eval(PropertyKeys.itemDisableIconLeft, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.itemDisableIconLeft, PanelIcons.DEFAULT.toString());
}
public void setItemDisableIconLeft(String itemDisableIconLeft) {
@@ -167,7 +167,7 @@
}
public String getItemDisableIconRight() {
- return (String) getStateHelper().eval(PropertyKeys.itemDisableIconRight, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.itemDisableIconRight, PanelIcons.DEFAULT.toString());
}
public void setItemDisableIconRight(String itemDisableIconRight) {
@@ -191,7 +191,7 @@
}
public String getTopItemIconLeft() {
- return (String) getStateHelper().eval(PropertyKeys.topItemIconLeft, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.topItemIconLeft, PanelIcons.DEFAULT.toString());
}
public void setTopItemIconLeft(String topItemIconLeft) {
@@ -199,7 +199,7 @@
}
public String getTopItemIconRight() {
- return (String) getStateHelper().eval(PropertyKeys.topItemIconRight, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.topItemIconRight, PanelIcons.DEFAULT.toString());
}
public void setTopItemIconRight(String topItemIconRight) {
@@ -207,7 +207,7 @@
}
public String getTopItemDisableIconLeft() {
- return (String) getStateHelper().eval(PropertyKeys.topItemDisableIconLeft, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.topItemDisableIconLeft, PanelIcons.DEFAULT.toString());
}
public void setTopItemDisableIconLeft(String topItemDisableIconLeft) {
@@ -215,7 +215,7 @@
}
public String getTopItemDisableIconRight() {
- return (String) getStateHelper().eval(PropertyKeys.topItemDisableIconRight, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.topItemDisableIconRight, PanelIcons.DEFAULT.toString());
}
public void setTopItemDisableIconRight(String topItemDisableIconRight) {
@@ -239,7 +239,7 @@
}
public String getGroupExpandIconLeft() {
- return (String) getStateHelper().eval(PropertyKeys.groupExpandIconLeft, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.groupExpandIconLeft, PanelIcons.DEFAULT.toString());
}
public void setGroupExpandIconLeft(String groupExpandIconLeft) {
@@ -247,7 +247,7 @@
}
public String getGroupExpandIconRight() {
- return (String) getStateHelper().eval(PropertyKeys.groupExpandIconRight, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.groupExpandIconRight, PanelIcons.DEFAULT.toString());
}
public void setGroupExpandIconRight(String groupExpandIconRight) {
@@ -255,7 +255,7 @@
}
public String getGroupCollapseIconLeft() {
- return (String) getStateHelper().eval(PropertyKeys.groupCollapseIconLeft, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.groupCollapseIconLeft, PanelIcons.DEFAULT.toString());
}
public void setGroupCollapseIconLeft(String groupCollapseIconLeft) {
@@ -263,7 +263,7 @@
}
public String getGroupCollapseIconRight() {
- return (String) getStateHelper().eval(PropertyKeys.groupCollapseIconRight, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.groupCollapseIconRight, PanelIcons.DEFAULT.toString());
}
public void setGroupCollapseIconRight(String groupCollapseIconRight) {
@@ -271,7 +271,7 @@
}
public String getGroupDisableIconLeft() {
- return (String) getStateHelper().eval(PropertyKeys.groupDisableIconLeft, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.groupDisableIconLeft, PanelIcons.DEFAULT.toString());
}
public void setGroupDisableIconLeft(String groupDisableIconLeft) {
@@ -279,7 +279,7 @@
}
public String getGroupDisableIconRight() {
- return (String) getStateHelper().eval(PropertyKeys.groupDisableIconRight, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.groupDisableIconRight, PanelIcons.DEFAULT.toString());
}
public void setGroupDisableIconRight(String groupDisableIconRight) {
@@ -303,7 +303,7 @@
}
public String getTopGroupExpandIconLeft() {
- return (String) getStateHelper().eval(PropertyKeys.topGroupExpandIconLeft, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.topGroupExpandIconLeft, PanelIcons.DEFAULT.toString());
}
public void setTopGroupExpandIconLeft(String topGroupExpandIconLeft) {
@@ -311,7 +311,7 @@
}
public String getTopGroupExpandIconRight() {
- return (String) getStateHelper().eval(PropertyKeys.topGroupExpandIconRight, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.topGroupExpandIconRight, PanelIcons.DEFAULT.toString());
}
public void setTopGroupExpandIconRight(String topGroupExpandIconRight) {
@@ -319,7 +319,7 @@
}
public String getTopGroupCollapseIconLeft() {
- return (String) getStateHelper().eval(PropertyKeys.topGroupCollapseIconLeft, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.topGroupCollapseIconLeft, PanelIcons.DEFAULT.toString());
}
public void setTopGroupCollapseIconLeft(String topGroupCollapseIconLeft) {
@@ -327,7 +327,7 @@
}
public String getTopGroupCollapseIconRight() {
- return (String) getStateHelper().eval(PropertyKeys.topGroupCollapseIconRight, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.topGroupCollapseIconRight, PanelIcons.DEFAULT.toString());
}
public void setTopGroupCollapseIconRight(String topGroupCollapseIconRight) {
@@ -335,7 +335,7 @@
}
public String getTopGroupDisableIconLeft() {
- return (String) getStateHelper().eval(PropertyKeys.topGroupDisableIconLeft, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.topGroupDisableIconLeft, PanelIcons.DEFAULT.toString());
}
public void setTopGroupDisableIconLeft(String topGroupDisableIconLeft) {
@@ -343,7 +343,7 @@
}
public String getTopGroupDisableIconRight() {
- return (String) getStateHelper().eval(PropertyKeys.topGroupDisableIconRight, PanelMenuIcons.DEFAULT.toString());
+ return (String) getStateHelper().eval(PropertyKeys.topGroupDisableIconRight, PanelIcons.DEFAULT.toString());
}
public void setTopGroupDisableIconRight(String topGroupDisableIconRight) {
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -0,0 +1,65 @@
+package org.richfaces.renderkit.html;
+
+import org.richfaces.component.AbstractTogglePanelTitledItem;
+import org.richfaces.component.html.HtmlAccordionItem;
+import org.richfaces.renderkit.RendererBase;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+
+import static org.richfaces.renderkit.HtmlConstants.*;
+import static org.richfaces.renderkit.html.DivPanelRenderer.attributeAsString;
+
+class AccordionItemHeaderRenderer extends TableIconsRendererHelper<HtmlAccordionItem> {
+
+ public AccordionItemHeaderRenderer() {
+ super("header", "rf-ac-itm");
+ }
+
+ protected void encodeHeaderIconLeft(ResponseWriter writer, FacesContext context, HtmlAccordionItem panel) throws IOException {
+ String iconInactive = panel.isDisabled() ? panel.getLeftIconDisabled() : panel.getLeftIconInactive();
+ String iconActive = panel.isDisabled() ? panel.getLeftIconDisabled() : panel.getLeftIconActive();
+
+ encodeTdIcon(writer, context, cssClassPrefix + "-ico", iconInactive, iconActive);
+ }
+
+ protected void encodeHeaderIconRight(ResponseWriter writer, FacesContext context, HtmlAccordionItem panel) throws IOException {
+ String iconInactive = panel.isDisabled() ? panel.getRightIconDisabled() : panel.getRightIconInactive();
+ String iconActive = panel.isDisabled() ? panel.getRightIconDisabled() : panel.getRightIconActive();
+
+ //TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
+ encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", iconInactive, iconActive);
+ }
+
+ @Override
+ protected void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, String attrIconCollapsedValue, String attrIconExpandedValue) throws IOException {
+ writer.startElement(TD_ELEM, null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, cssClass, null);
+
+ encodeIdIcon(writer, context, attrIconCollapsedValue, cssIconsClassPrefix + "-act");
+ encodeIdIcon(writer, context, attrIconExpandedValue, cssIconsClassPrefix + "-inact");
+
+ writer.endElement(TD_ELEM);
+ }
+
+ @Override
+ protected void encodeHeaderTextValue(ResponseWriter writer, FacesContext context, HtmlAccordionItem titledItem) throws IOException {
+ if (titledItem.isDisabled()) {
+ encodeHeader(writer, context, titledItem, AbstractTogglePanelTitledItem.HeaderStates.disabled);
+ } else {
+ encodeHeader(writer, context, titledItem, AbstractTogglePanelTitledItem.HeaderStates.active);
+ encodeHeader(writer, context, titledItem, AbstractTogglePanelTitledItem.HeaderStates.inactive);
+ }
+ }
+
+ private static void encodeHeader(ResponseWriter writer, FacesContext context, AbstractTogglePanelTitledItem component,
+ AbstractTogglePanelTitledItem.HeaderStates state) throws IOException {
+ writer.startElement(DIV_ELEM, component);
+ writer.writeAttribute(CLASS_ATTRIBUTE, RendererBase.concatClasses("rf-ac-itm-lbl-" + state.abbreviation(), attributeAsString(component, state.headerClass())), null);
+
+ writeFacetOrAttr(writer, context, component, "header", component.getHeaderFacet(state));
+
+ writer.endElement(DIV_ELEM);
+ }
+}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -36,24 +36,13 @@
import org.ajax4jsf.javascript.JSObject;
import org.richfaces.component.AbstractTogglePanelTitledItem;
-import org.richfaces.component.AbstractTogglePanelTitledItem.HeaderStates;
+import org.richfaces.component.html.HtmlAccordionItem;
import org.richfaces.component.html.HtmlAccordionItem.PropertyKeys;
import org.richfaces.renderkit.HtmlConstants;
import org.richfaces.renderkit.RenderKitUtils;
/**
*
- * <div id="clientId" class="rf-ac-itm">
- * <div id="clientId:header" class="rf-ac-itm-hdr">
- * <div class="rf-ac-itm-hdr-inact">Level 1</div>
- * <div class="rf-ac-itm-hdr-act" >Level 1</div>
- * <div class="rf-ac-itm-hdr-dis">Level 1</div>
- * </div>
- * <div id="clientId:content" class="rf-ac-itm-cnt">
- * Content will be here.
- * </div>
- * </div>
- *
* @author akolonitsky
* @since 2010-08-05
*/
@@ -76,11 +65,13 @@
.generic("onmousemove", PropertyKeys.onheadermousemove.toString(), "headermousemove")
.generic("onmouseup", PropertyKeys.onheadermouseup.toString(), "headermouseup");
+ private final TableIconsRendererHelper<HtmlAccordionItem> headerRenderer = new AccordionItemHeaderRenderer();
+
@Override
protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
super.doEncodeBegin(writer, context, component);
- encodeHeader(context, component, writer);
+ encodeHeader(writer, context, (HtmlAccordionItem) component);
encodeContentBegin(component, writer);
}
@@ -92,7 +83,7 @@
@Override
protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
- encodeContentEnd(component, writer);
+ encodeContentEnd(writer, component);
super.doEncodeEnd(writer, context, component);
}
@@ -121,48 +112,20 @@
}
}
- private void encodeContentEnd(UIComponent component, ResponseWriter responseWriter) throws IOException {
- responseWriter.endElement(DIV_ELEM);
- }
-
- private void encodeHeader(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException {
-
- writer.startElement(DIV_ELEM, component);
- writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses("rf-ac-itm-hdr", attributeAsString(component, PropertyKeys.headerClass)), null);
- writer.writeAttribute(ID_ATTRIBUTE, component.getClientId() + ":header", null);
- renderPassThroughAttributes(context, component, HEADER_ATTRIBUTES);
-
- AbstractTogglePanelTitledItem titledItem = (AbstractTogglePanelTitledItem) component;
- boolean isActive = titledItem.isActive();
- boolean isDisabled = titledItem.isDisabled();
- encodeHeader(context, titledItem, writer, HeaderStates.inactive, !isActive && !isDisabled);
- encodeHeader(context, titledItem, writer, HeaderStates.active, isActive && !isDisabled);
- encodeHeader(context, titledItem, writer, HeaderStates.disabled, isDisabled);
-
+ private void encodeContentEnd(ResponseWriter writer, UIComponent component) throws IOException {
writer.endElement(DIV_ELEM);
}
- private void encodeHeader(FacesContext facesContext, AbstractTogglePanelTitledItem component, ResponseWriter writer,
- HeaderStates state, Boolean isDisplay) throws IOException {
-
+ private void encodeHeader(ResponseWriter writer, FacesContext context, HtmlAccordionItem component) throws IOException {
writer.startElement(DIV_ELEM, component);
- if (!isDisplay) {
- writer.writeAttribute(STYLE_ATTRIBUTE, "display : none", null);
- }
+ String stateCssClass = "rf-ac-itm-hdr-" + (component.isDisabled() ? "dis" : (component.isActive() ? "act" : "inact"));
+ writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses("rf-ac-itm-hdr", stateCssClass, attributeAsString(component, PropertyKeys.headerClass)), null);
- String name = "headerClass" + capitalize(state.toString());
- writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses("rf-ac-itm-hdr-" + state.abbreviation(), attributeAsString(component, name)), null);
+ writer.writeAttribute(ID_ATTRIBUTE, component.getClientId() + ":header", null);
+ renderPassThroughAttributes(context, component, HEADER_ATTRIBUTES);
- UIComponent headerFacet = component.getHeaderFacet(state);
- if (headerFacet != null && headerFacet.isRendered()) {
- headerFacet.encodeAll(facesContext);
- } else {
- Object headerText = component.getAttributes().get("header");
- if (headerText != null && !headerText.equals("")) {
- writer.writeText(headerText, null);
- }
- }
+ headerRenderer.encodeHeader(writer, context, component);
writer.endElement(DIV_ELEM);
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionRenderer.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionRenderer.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -46,6 +46,7 @@
@ResourceDependency(name = "richfaces.js"),
@ResourceDependency(name = "richfaces-base-component.js"),
@ResourceDependency(library = "org.richfaces", name = "accordion.ecss"),
+ @ResourceDependency(library = "org.richfaces", name = "icons.ecss"),
@ResourceDependency(library = "org.richfaces", name = "togglePanel.js"),
@ResourceDependency(library = "org.richfaces", name = "accordion.js") })
public class AccordionRenderer extends TogglePanelRenderer {
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -53,28 +53,38 @@
@ResourceDependency(library = "org.richfaces", name = "togglePanelItem.js"),
@ResourceDependency(library = "org.richfaces", name = "collapsiblePanel.js"),
@ResourceDependency(library = "org.richfaces", name = "collapsiblePanelItem.js"),
+ @ResourceDependency(library = "org.richfaces", name = "icons.ecss"),
@ResourceDependency(library = "org.richfaces", name = "collapsiblePanel.ecss") })
public class CollapsiblePanelRenderer extends TogglePanelRenderer {
public static final String SWITCH = "switch";
public static final String BEFORE_SWITCH = "beforeswitch";
- private final TableIconsRendererHelper headerRenderer = new TableIconsRendererHelper("header", "rf-cp", "rf-cp-ico-") {
+ private final TableIconsRendererHelper<HtmlCollapsiblePanel> headerRenderer = new TableIconsRendererHelper<HtmlCollapsiblePanel>("header", "rf-cp") {
- protected void encodeHeaderIconLeft(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
- HtmlCollapsiblePanel panel = (HtmlCollapsiblePanel) component;
-
- encodeTdIcon(writer, context, cssClassPrefix + "-ico", panel.isExpanded(),
+ protected void encodeHeaderIconLeft(ResponseWriter writer, FacesContext context, HtmlCollapsiblePanel panel) throws IOException {
+ encodeTdIcon(writer, context, cssClassPrefix + "-ico",
panel.getLeftCollapsedIcon(), panel.getLeftExpandedIcon());
}
- protected void encodeHeaderIconRight(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
- HtmlCollapsiblePanel panel = (HtmlCollapsiblePanel) component;
-
+ protected void encodeHeaderIconRight(ResponseWriter writer, FacesContext context, HtmlCollapsiblePanel panel) throws IOException {
//TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
- encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", panel.isExpanded(),
+ encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico",
panel.getRightCollapsedIcon(), panel.getRightExpandedIcon());
}
+
+ @Override
+ protected void encodeHeaderTextValue(ResponseWriter writer, FacesContext context, HtmlCollapsiblePanel component) throws IOException {
+ writer.startElement(DIV_ELEM, null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, cssClassPrefix + "-lbl-exp", null);
+ writeFacetOrAttr(writer, context, component, text, text + "Expanded");
+ writer.endElement(DIV_ELEM);
+
+ writer.startElement(DIV_ELEM, null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, cssClassPrefix + "-lbl-colps", null);
+ writeFacetOrAttr(writer, context, component, text, text + "Collapsed");
+ writer.endElement(DIV_ELEM);
+ }
};
public TableIconsRendererHelper getHeaderRenderer() {
@@ -108,7 +118,7 @@
protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent comp) throws IOException {
super.doEncodeBegin(writer, context, comp);
- encodeHeader(context, comp, writer);
+ encodeHeader(writer, context, (HtmlCollapsiblePanel) comp);
}
@Override
@@ -137,10 +147,12 @@
return options;
}
- private void encodeHeader(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException {
- writer.startElement(DIV_ELEM, component);
+ private void encodeHeader(ResponseWriter writer, FacesContext context, HtmlCollapsiblePanel component) throws IOException {
+ writer.startElement(DIV_ELEM, null);
writer.writeAttribute(ID_ATTRIBUTE, component.getClientId(context) + ":header", null);
- writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses("rf-cp-hdr", attributeAsString(component, "headerClass")), null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses("rf-cp-hdr",
+ "rf-cp-hdr-" + (component.isExpanded() ? "exp" : "colps"),
+ attributeAsString(component, "headerClass")), null);
headerRenderer.encodeHeader(writer, context, component);
@@ -204,7 +216,7 @@
}
private String getPlaceHolder(String id) {
- return "<div id=\"" + id + "\" style=\"display: none\" ></div>";
+ return "<div id=\"" + id + "\" style=\"display:none\" ></div>";
}
private void encodeContent(ResponseWriter writer, FacesContext context, UIComponent component, boolean visible) throws IOException {
Added: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java (rev 0)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -0,0 +1,29 @@
+package org.richfaces.renderkit.html;
+
+import org.richfaces.component.html.HtmlPanelMenuGroup;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+
+class PanelMenuGroupHeaderRenderer extends TableIconsRendererHelper<HtmlPanelMenuGroup> {
+
+ PanelMenuGroupHeaderRenderer(String cssClassPrefix) {
+ super("label", cssClassPrefix, "rf-pm-ico");
+ }
+
+ protected void encodeHeaderIconLeft(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup group) throws IOException {
+ String iconCollapsed = group.isDisabled() ? group.getIconLeftDisabled() : group.getIconLeftCollapsed();
+ String iconExpanded = group.isDisabled() ? group.getIconLeftDisabled() : group.getIconLeftExpanded();
+
+ encodeTdIcon(writer, context, cssClassPrefix + "-ico", iconCollapsed, iconExpanded);
+ }
+
+ protected void encodeHeaderIconRight(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup group) throws IOException {
+ String iconCollapsed = group.isDisabled() ? group.getIconRightDisabled() : group.getIconRightCollapsed();
+ String iconExpanded = group.isDisabled() ? group.getIconRightDisabled() : group.getIconRightExpanded();
+
+ //TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
+ encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", iconCollapsed, iconExpanded);
+ }
+}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -56,36 +56,9 @@
//TODO nick - shouldn't this be rf-pm-gr-top?
private static final String TOP_CSS_CLASS_PREFIX = "rf-pm-top-gr";
- private static class HeaderRenderer extends TableIconsRendererHelper {
+ private final TableIconsRendererHelper<HtmlPanelMenuGroup> headerRenderer = new PanelMenuGroupHeaderRenderer(CSS_CLASS_PREFIX);
+ private final TableIconsRendererHelper<HtmlPanelMenuGroup> topHeaderRenderer = new PanelMenuGroupHeaderRenderer(TOP_CSS_CLASS_PREFIX);
- public HeaderRenderer(String cssClassPrefix) {
- super("label", cssClassPrefix, "rf-pm-ico-");
- }
-
- protected void encodeHeaderIconLeft(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
- HtmlPanelMenuGroup group = (HtmlPanelMenuGroup) component;
-
- String iconCollapsed = group.isDisabled() ? group.getIconLeftDisabled() : group.getIconLeftCollapsed();
- String iconExpanded = group.isDisabled() ? group.getIconLeftDisabled() : group.getIconLeftExpanded();
-
- encodeTdIcon(writer, context, cssClassPrefix + "-ico", group.isExpanded(), iconCollapsed, iconExpanded);
- }
-
- protected void encodeHeaderIconRight(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
- HtmlPanelMenuGroup group = (HtmlPanelMenuGroup) component;
-
- String iconCollapsed = group.isDisabled() ? group.getIconRightDisabled() : group.getIconRightCollapsed();
- String iconExpanded = group.isDisabled() ? group.getIconRightDisabled() : group.getIconRightExpanded();
-
- //TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
- encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", group.isExpanded(), iconCollapsed, iconExpanded);
- }
-
- }
-
- private final TableIconsRendererHelper headerRenderer = new HeaderRenderer(CSS_CLASS_PREFIX);
- private final TableIconsRendererHelper topHeaderRenderer = new HeaderRenderer(TOP_CSS_CLASS_PREFIX);
-
@Override
protected void doDecode(FacesContext context, UIComponent component) {
AbstractPanelMenuGroup menuGroup = (AbstractPanelMenuGroup) component;
@@ -132,7 +105,8 @@
private void encodeHeader(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup menuGroup) throws IOException {
writer.startElement(DIV_ELEM, null);
writer.writeAttribute(ID_ATTRIBUTE, menuGroup.getClientId(context) + ":hdr", null);
- writer.writeAttribute(CLASS_ATTRIBUTE, getCssClass(menuGroup, "-hdr"), null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(getCssClass(menuGroup, "-hdr"),
+ getCssClass(menuGroup, "-hdr-" + (menuGroup.isExpanded() ? "exp" : "colps"))), null);
(menuGroup.isTopItem() ? topHeaderRenderer : headerRenderer).encodeHeader(writer, context, menuGroup);
Deleted: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuIcons.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuIcons.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuIcons.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -1,25 +0,0 @@
-package org.richfaces.renderkit.html;
-
-public enum PanelMenuIcons {
- none("rf-pm-none"),
- disc("rf-pm-disc"),
- grid("rf-pm-grid"),
- chevron("rf-pm-chevron"),
- chevronUp("rf-pm-chevron-up"),
- chevronDown("rf-pm-chevron-down"),
- triangle("rf-pm-triangle"),
- triangleUp("rf-pm-triangle-up"),
- triangleDown("rf-pm-triangle-down");
-
- public static final PanelMenuIcons DEFAULT = none;
-
- private final String cssClass;
-
- private PanelMenuIcons(String cssClass) {
- this.cssClass = cssClass;
- }
-
- public String cssClass() {
- return cssClass;
- }
-}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -40,6 +40,7 @@
import org.richfaces.component.html.HtmlPanelMenuItem;
import org.richfaces.renderkit.HtmlConstants;
import org.richfaces.renderkit.RenderKitUtils;
+import org.richfaces.renderkit.util.PanelIcons;
/**
* @author akolonitsky
@@ -107,7 +108,7 @@
public void encodeTdIcon(ResponseWriter writer, FacesContext context, String classPrefix, String attrIconValue) throws IOException {
writer.startElement(TD_ELEM, null);
try {
- PanelMenuIcons icon = PanelMenuIcons.valueOf(attrIconValue);
+ PanelIcons icon = PanelIcons.valueOf(attrIconValue);
writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(classPrefix, icon.cssClass()), null);
} catch (IllegalArgumentException e) {
writer.writeAttribute(CLASS_ATTRIBUTE, classPrefix, null);
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -55,6 +55,7 @@
@ResourceDependency(library = "org.richfaces", name = "panelMenu.js"),
@ResourceDependency(library = "org.richfaces", name = "panelMenuItem.js"),
@ResourceDependency(library = "org.richfaces", name = "panelMenuGroup.js"),
+ @ResourceDependency(library = "org.richfaces", name = "icons.ecss"),
@ResourceDependency(library = "org.richfaces", name = "panelMenu.ecss") })
public class PanelMenuRenderer extends DivPanelRenderer {
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TabPanelRenderer.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -146,9 +146,8 @@
writer.startElement(TD_ELEM, tab);
writer.writeAttribute(ID_ATTRIBUTE, tab.getClientId() + ":header:" + state.toString(), null);
renderPassThroughAttributes(context, tab, HEADER_ATTRIBUTES);
- String name = "headerClass" + capitalize(state.toString());
writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses("rf-tb-hdr rf-tb-hdr-" + state.abbreviation(),
- attributeAsString(tab, HtmlTab.PropertyKeys.headerClass), attributeAsString(tab, name)), null);
+ attributeAsString(tab, HtmlTab.PropertyKeys.headerClass), attributeAsString(tab, state.headerClass())), null);
writer.writeAttribute(STYLE_ATTRIBUTE, concatStyles(isDisplay ? "" : "display : none", attributeAsString(tab, HtmlTab.PropertyKeys.headerStyle.toString())), null);
writer.startElement("span", tab);
@@ -223,4 +222,3 @@
return AbstractTabPanel.class;
}
}
-
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -1,6 +1,7 @@
package org.richfaces.renderkit.html;
import org.richfaces.renderkit.RenderKitUtils;
+import org.richfaces.renderkit.util.PanelIcons;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -9,21 +10,24 @@
import static org.richfaces.component.util.HtmlUtil.concatClasses;
import static org.richfaces.renderkit.HtmlConstants.*;
-import static org.richfaces.renderkit.html.DivPanelRenderer.styleElement;
-public abstract class TableIconsRendererHelper {
+public abstract class TableIconsRendererHelper<T extends UIComponent> {
protected final String text;
protected final String cssClassPrefix;
protected final String cssIconsClassPrefix;
- public TableIconsRendererHelper(String text, String cssClassPrefix, String cssIconsClassPrefix) {
+ protected TableIconsRendererHelper(String text, String cssClassPrefix, String cssIconsClassPrefix) {
this.text = text;
this.cssClassPrefix = cssClassPrefix;
this.cssIconsClassPrefix = cssIconsClassPrefix;
}
- public void encodeHeader(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ protected TableIconsRendererHelper(String text, String cssClassPrefix) {
+ this(text, cssClassPrefix, cssClassPrefix + "-ico");
+ }
+
+ public void encodeHeader(ResponseWriter writer, FacesContext context, T component) throws IOException {
writer.startElement(TABLE_ELEMENT, null);
writer.writeAttribute(CLASS_ATTRIBUTE, cssClassPrefix + "-gr", null);
writer.startElement(TBODY_ELEMENT, null);
@@ -38,68 +42,64 @@
writer.endElement(TABLE_ELEMENT);
}
- private void encodeHeaderText(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ protected void encodeHeaderText(ResponseWriter writer, FacesContext context, T component) throws IOException {
writer.startElement(TD_ELEM, null);
writer.writeAttribute(CLASS_ATTRIBUTE, cssClassPrefix + "-lbl", null);
+
encodeHeaderTextValue(writer, context, component);
+
writer.endElement(TD_ELEM);
}
- protected void encodeHeaderTextValue(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
- UIComponent headerFacet = component.getFacet(text);
+ protected void encodeHeaderTextValue(ResponseWriter writer, FacesContext context, T component) throws IOException {
+ writeFacetOrAttr(writer, context, component, text, text);
+ }
+
+ public static void writeFacetOrAttr(ResponseWriter writer, FacesContext context, UIComponent component, String attr, String facetName) throws IOException {
+ writeFacetOrAttr(writer, context, component, attr, component.getFacet(facetName));
+ }
+
+ public static void writeFacetOrAttr(ResponseWriter writer, FacesContext context, UIComponent component, String attr, UIComponent headerFacet) throws IOException {
if (headerFacet != null && headerFacet.isRendered()) {
headerFacet.encodeAll(context);
} else {
- Object label = component.getAttributes().get(text);
+ Object label = component.getAttributes().get(attr);
if (label != null && !label.equals("")) {
writer.writeText(label, null);
}
}
}
- protected abstract void encodeHeaderIconLeft(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException;
+ protected abstract void encodeHeaderIconLeft(ResponseWriter writer, FacesContext context, T component) throws IOException;
- protected abstract void encodeHeaderIconRight(ResponseWriter writer, FacesContext context, UIComponent menuItem) throws IOException;
+ protected abstract void encodeHeaderIconRight(ResponseWriter writer, FacesContext context, T menuItem) throws IOException;
- protected void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, boolean isExpanded, String attrIconCollapsedValue, String attrIconExpandedValue) throws IOException {
+ protected void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, String attrIconCollapsedValue, String attrIconExpandedValue) throws IOException {
writer.startElement(TD_ELEM, null);
writer.writeAttribute(CLASS_ATTRIBUTE, cssClass, null);
- encodeIdIcon(writer, context, isExpanded, attrIconCollapsedValue, cssIconsClassPrefix + "colps");
- encodeIdIcon(writer, context, !isExpanded, attrIconExpandedValue, cssIconsClassPrefix + "exp");
+ encodeIdIcon(writer, context, attrIconCollapsedValue, cssIconsClassPrefix + "-colps");
+ encodeIdIcon(writer, context, attrIconExpandedValue, cssIconsClassPrefix + "-exp");
writer.endElement(TD_ELEM);
}
- protected void encodeIdIcon(ResponseWriter writer, FacesContext context, boolean isExpanded, String attrIconValue, String styleClass) throws IOException {
+ protected void encodeIdIcon(ResponseWriter writer, FacesContext context, String attrIconValue, String styleClass) throws IOException {
if (attrIconValue == null || attrIconValue.trim().length() <= 0) {
- encodeDivIcon(writer, isExpanded, PanelMenuIcons.none, styleClass);
+ encodeDivIcon(writer, PanelIcons.none, styleClass);
} else {
- PanelMenuIcons icon = getIcon(attrIconValue);
+ PanelIcons icon = PanelIcons.getIcon(attrIconValue);
if (icon != null) {
- encodeDivIcon(writer, isExpanded, icon, styleClass);
+ encodeDivIcon(writer, icon, styleClass);
} else {
encodeImage(writer, context, attrIconValue);
}
}
}
- protected PanelMenuIcons getIcon(String attrIconCollapsedValue) {
- if (attrIconCollapsedValue == null) {
- return null;
- }
-
- try {
- return PanelMenuIcons.valueOf(attrIconCollapsedValue);
- } catch (IllegalArgumentException e) {
- return null;
- }
- }
-
- public static void encodeDivIcon(ResponseWriter writer, boolean isDisplay, PanelMenuIcons icon, String styleClass) throws IOException {
+ public static void encodeDivIcon(ResponseWriter writer, PanelIcons icon, String styleClass) throws IOException {
writer.startElement(DIV_ELEM, null);
writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(styleClass, icon.cssClass()), null);
- writer.writeAttribute(STYLE_ATTRIBUTE, styleElement("display", isDisplay ? "none" : "block"), null);
writer.endElement(DIV_ELEM);
}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss 2011-01-05 12:19:36 UTC (rev 20891)
@@ -26,10 +26,6 @@
min-height: 0px;
}
-.rf-ac-itm-hdr-act {}
-.rf-ac-itm-hdr-inact {}
-.rf-ac-itm-hdr-dis {}
-
.rf-ac-itm-cnt {
border-bottom-width: 1px;
border-bottom-style: solid;
@@ -40,3 +36,33 @@
padding: 10px;
}
+.rf-ac-itm-hdr-act {}
+.rf-ac-itm-hdr-inact {}
+.rf-ac-itm-hdr-dis {}
+
+
+.rf-ac-itm-gr { width: 100%}
+
+.rf-ac-itm-ico { width: 16px; height: 16px;}
+.rf-ac-itm-exp-ico { width: 16px; height: 16px;}
+.rf-ac-itm-ico-act {}
+.rf-ac-itm-ico-inact {}
+
+.rf-ac-itm-lbl {}
+.rf-ac-itm-lbl-act {}
+.rf-ac-itm-lbl-inact {}
+
+.rf-ac-itm-hdr-act .rf-ac-itm-ico-act { display: block; }
+.rf-ac-itm-hdr-act .rf-ac-itm-ico-inact { display: none; }
+.rf-ac-itm-hdr-act .rf-ac-itm-lbl-act { display: block; }
+.rf-ac-itm-hdr-act .rf-ac-itm-lbl-inact { display: none; }
+
+.rf-ac-itm-hdr-inact .rf-ac-itm-ico-act { display: none; }
+.rf-ac-itm-hdr-inact .rf-ac-itm-ico-inact { display: block; }
+.rf-ac-itm-hdr-inact .rf-ac-itm-lbl-act { display: none; }
+.rf-ac-itm-hdr-inact .rf-ac-itm-lbl-inact { display: block; }
+
+.rf-ac-itm-hdr-dis .rf-ac-itm-ico-act { display: none; }
+.rf-ac-itm-hdr-dis .rf-ac-itm-ico-inact { display: block; }
+.rf-ac-itm-hdr-dis .rf-ac-itm-lbl-act { display: none; }
+.rf-ac-itm-hdr-dis .rf-ac-itm-lbl-inact { display: block; }
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordionItem.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordionItem.js 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordionItem.js 2011-01-05 12:19:36 UTC (rev 20891)
@@ -66,12 +66,7 @@
* @return {jQuery Object}
* */
__header : function (state) {
- var res = $(rf.getDomElement(this.id + ":header"));
- if (state) {
- return res.find(".rf-ac-itm-hdr-" + state);
- }
-
- return res;
+ return $(rf.getDomElement(this.id + ":header"));
},
/**
@@ -97,8 +92,7 @@
}
this.__content().show();
- this.__header("inact").hide();
- this.__header("act").show();
+ this.__header().addClass("rf-ac-itm-hdr-act").removeClass("rf-ac-itm-hdr-inact");
return this.__fireEnter();
},
@@ -134,8 +128,7 @@
}
this.__content().hide();
- this.__header("act").hide();
- this.__header("inact").show();
+ this.__header().removeClass("rf-ac-itm-hdr-act").addClass("rf-ac-itm-hdr-inact");
return true;
},
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/collapsiblePanel.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/collapsiblePanel.ecss 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/collapsiblePanel.ecss 2011-01-05 12:19:36 UTC (rev 20891)
@@ -30,4 +30,25 @@
color:'#{richSkin.generalTextColor}';
font-family:'#{richSkin.generalFamilyFont}';
padding:10px;
-}
\ No newline at end of file
+}
+
+.rf-cp-gr { width: 100%}
+
+.rf-cp-ico { width: 16px; height: 16px;}
+.rf-cp-exp-ico { width: 16px; height: 16px;}
+.rf-cp-ico-colps {}
+.rf-cp-ico-exp {}
+
+.rf-cp-lbl {}
+.rf-cp-lbl-colps {}
+.rf-cp-lbl-exp {}
+
+.rf-cp-hdr-exp .rf-cp-ico-exp { display: block; }
+.rf-cp-hdr-exp .rf-cp-ico-colps { display: none; }
+.rf-cp-hdr-exp .rf-cp-lbl-exp { display: block; }
+.rf-cp-hdr-exp .rf-cp-lbl-colps { display: none; }
+
+.rf-cp-hdr-colps .rf-cp-ico-exp { display: none; }
+.rf-cp-hdr-colps .rf-cp-ico-colps { display: block; }
+.rf-cp-hdr-colps .rf-cp-lbl-exp { display: none; }
+.rf-cp-hdr-colps .rf-cp-lbl-colps { display: block; }
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/collapsiblePanelItem.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/collapsiblePanelItem.js 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/collapsiblePanelItem.js 2011-01-05 12:19:36 UTC (rev 20891)
@@ -28,18 +28,20 @@
init : function (componentId, options) {
rf.ui.TogglePanelItem.call(this, componentId, options);
+
+ this.headerClass = "rf-cp-hdr-" + this.__state();
},
__enter : function () {
- rf.getDomElement(this.id).style.display = "block";
- this.__header(this.__state()).show();
+ this.__content().show();
+ this.__header().addClass(this.headerClass);
return true;
},
__leave : function () {
- rf.getDomElement(this.id).style.display = "none";
- this.__header(this.__state()).hide();
+ this.__content().hide();
+ this.__header().removeClass(this.headerClass);
return true;
},
@@ -48,13 +50,12 @@
return this.getName() === "true" ? "exp" : "colps";
},
- __header : function (state) {
- var res = $(rf.getDomElement(this.togglePanelId + ":header"));
- if (state) {
- return res.find(".rf-cp-hdr-" + state);
- }
+ __content : function () {
+ return $(rf.getDomElement(this.id));
+ },
- return res;
+ __header : function () {
+ return $(rf.getDomElement(this.togglePanelId + ":header"));
}
});
})(jQuery, RichFaces);
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2011-01-05 12:19:36 UTC (rev 20891)
@@ -270,18 +270,13 @@
.rf-pm-ico-colps {}
.rf-pm-ico-exp {}
+.rf-pm-ico {}
+.rf-pm-ico-colps {}
+.rf-pm-ico-exp {}
-/* Icons */
-.rf-pm-chevron { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Chevron.png']})" }
-.rf-pm-chevron-down { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:ChevronDown.png']})" }
-.rf-pm-chevron-left { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:ChevronLeft.png']})" }
-.rf-pm-chevron-up { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:ChevronUp.png']})" }
-.rf-pm-disc { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Disc.png']})" }
-.rf-pm-grid { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Grid.png']})" }
-.rf-pm-none { width: 16px; height: 16px; }
-.rf-pm-spacer { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Spacer.png']})" }
-.rf-pm-triangle { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:Triangle.png']})" }
-.rf-pm-triangle-down { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:TriangleDown.png']})" }
-.rf-pm-triangle-left { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:TriangleLeft.png']})" }
-.rf-pm-triangle-up { width: 16px; height: 16px; background-image: "url(#{resource['org.richfaces.images:TriangleUp.png']})" }
\ No newline at end of file
+.rf-pm-hdr-exp .rf-pm-ico-exp { display: block; }
+.rf-pm-hdr-exp .rf-pm-ico-colps { display: none; }
+
+.rf-pm-hdr-colps .rf-pm-ico-exp { display: none; }
+.rf-pm-hdr-colps .rf-pm-ico-colps { display: block; }
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuGroup.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuGroup.js 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuGroup.js 2011-01-05 12:19:36 UTC (rev 20891)
@@ -196,10 +196,8 @@
__expand : function () {
this.__content().removeClass("rf-pm-colps").addClass("rf-pm-exp");
- var header = this.__header();
- header.find(".rf-pm-ico-colps").hide();
- header.find(".rf-pm-ico-exp").show();
-
+ this.__header().removeClass("rf-pm-gr-hdr-colps").addClass("rf-pm-hdr-exp");
+
this.__setExpandValue(true);
},
@@ -222,9 +220,7 @@
__collapse : function () {
this.__content().addClass("rf-pm-colps").removeClass("rf-pm-exp");
- var header = this.__header();
- header.find(".rf-pm-ico-exp").hide();
- header.find(".rf-pm-ico-colps").show();
+ this.__header().addClass("rf-pm-hdr-colps").removeClass("rf-pm-hdr-exp");
this.__setExpandValue(false);
},
Added: trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/AccordionRendererTest.java
===================================================================
--- trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/AccordionRendererTest.java (rev 0)
+++ trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/AccordionRendererTest.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -0,0 +1,14 @@
+package org.richfaces.renderkit.html;
+
+import org.junit.Test;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+
+public class AccordionRendererTest extends RendererTestBase {
+
+ @Test
+ public void testAccordionItem() throws IOException, SAXException {
+ doTest("accordionItem", "f:item");
+ }
+}
Modified: trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/CollapsiblePanelRendererTest.java
===================================================================
--- trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/CollapsiblePanelRendererTest.java 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/CollapsiblePanelRendererTest.java 2011-01-05 12:19:36 UTC (rev 20891)
@@ -9,6 +9,6 @@
@Test
public void testEmpty() throws IOException, SAXException {
-// doTest("panelMenuGroup", "f:panelMenuGroup");
+ doTest("collapsiblePanel", "f:panel");
}
}
Added: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/accordionItem.xhtml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/accordionItem.xhtml (rev 0)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/accordionItem.xhtml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -0,0 +1,47 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright ${year}, 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.
+-->
+
+
+<!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:fn="http://java.sun.com/jsp/jstl/functions"
+ 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:pn="http://richfaces.org/pn"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <h:head>
+ <title>Richfaces MenuItem Test</title>
+ </h:head>
+
+<h:body>
+ <h:form id="f">
+ <pn:accordion>
+ <pn:accordionItem id="item"></pn:accordionItem>
+ </pn:accordion>
+ </h:form>
+</h:body>
+</html>
+
+
Added: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/accordionItem.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/accordionItem.xmlunit.xml (rev 0)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/accordionItem.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -0,0 +1,26 @@
+<div class="rf-ac-itm" id="f:item">
+ <div id="f:item:header" class="rf-ac-itm-hdr rf-ac-itm-hdr-act">
+ <table class="rf-ac-itm-gr">
+ <tbody>
+ <tr>
+ <td class="rf-ac-itm-ico">
+ <div class="rf-ac-itm-ico-act rf-ico-none"></div>
+ <div class="rf-ac-itm-ico-inact rf-ico-none"></div>
+ </td>
+ <td class="rf-ac-itm-lbl">
+ <div class="rf-ac-itm-lbl-act">item</div>
+ <div class="rf-ac-itm-lbl-inact">item</div>
+ </td>
+ <td class="rf-ac-itm-exp-ico">
+ <div class="rf-ac-itm-ico-act rf-ico-none"></div>
+ <div class="rf-ac-itm-ico-inact rf-ico-none"></div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="f:item:content" class="rf-ac-itm-cnt"></div>
+ <script type="text/javascript">new
+ Text
+ </script>
+</div>
\ No newline at end of file
Added: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/collapsiblePanel.xhtml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/collapsiblePanel.xhtml (rev 0)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/collapsiblePanel.xhtml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -0,0 +1,45 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright ${year}, 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.
+-->
+
+
+<!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:fn="http://java.sun.com/jsp/jstl/functions"
+ 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:pn="http://richfaces.org/pn"
+ xmlns:rich="http://richfaces.org/rich">
+
+ <h:head>
+ <title>Richfaces MenuItem Test</title>
+ </h:head>
+
+<h:body>
+ <h:form id="f">
+ <pn:collapsiblePanel id="panel"></pn:collapsiblePanel>
+ </h:form>
+</h:body>
+</html>
+
+
Added: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/collapsiblePanel.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/collapsiblePanel.xmlunit.xml (rev 0)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/collapsiblePanel.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -0,0 +1,28 @@
+<div class="rf-cp rf-tgp" id="f:panel">
+ <input type="hidden" name="f:panel-value" id="f:panel-value" value="true"></input>
+ <div class="rf-cp-hdr rf-cp-hdr-exp" id="f:panel:header">
+ <table class="rf-cp-gr">
+ <tbody>
+ <tr>
+ <td class="rf-cp-ico">
+ <div class="rf-cp-ico-colps rf-ico-none"></div>
+ <div class="rf-cp-ico-exp rf-ico-none"></div>
+ </td>
+ <td class="rf-cp-lbl">
+ <div class="rf-cp-lbl-exp"></div>
+ <div class="rf-cp-lbl-colps"></div>
+ </td>
+ <td class="rf-cp-exp-ico">
+ <div class="rf-cp-ico-colps rf-ico-none"></div>
+ <div class="rf-cp-ico-exp rf-ico-none"></div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="f:panel:content" class="rf-cp-b" style="display:block"></div>
+ <div id="f:panel:empty" style="display:none"></div>
+ <script type="text/javascript">
+ Text
+ </script>
+</div>
\ No newline at end of file
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-group.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-group.xmlunit.xml 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-group.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -1,17 +1,17 @@
<div id="f:panelMenuGroup" class="rf-pm-gr groupClass">
<input id="f:panelMenuGroup:expanded" name="f:panelMenuGroup:expanded" type="hidden" value="false"/>
- <div id="f:panelMenuGroup:hdr" class="rf-pm-gr-hdr">
+ <div id="f:panelMenuGroup:hdr" class="rf-pm-gr-hdr rf-pm-gr-hdr-colps">
<table class="rf-pm-gr-gr">
<tbody>
<tr>
<td class="rf-pm-gr-ico">
- <div class="rf-pm-ico-colps rf-pm-triangle-down" style="display:block"></div>
- <div class="rf-pm-ico-exp rf-pm-disc" style="display:none"></div>
+ <div class="rf-pm-ico-colps rf-ico-triangle-down"></div>
+ <div class="rf-pm-ico-exp rf-ico-disc"></div>
</td>
<td class="rf-pm-gr-lbl"></td>
<td class="rf-pm-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-pm-triangle-up" style="display:block"></div>
- <div class="rf-pm-ico-exp rf-pm-disc" style="display:none"></div>
+ <div class="rf-pm-ico-colps rf-ico-triangle-up"></div>
+ <div class="rf-pm-ico-exp rf-ico-disc"></div>
</td>
</tr>
</tbody>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-groupDis.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-groupDis.xmlunit.xml 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-groupDis.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -1,17 +1,17 @@
<div id="f:panelMenuGroup-dis" class="rf-pm-gr groupClass rf-pm-gr-dis groupDisableClass">
<input id="f:panelMenuGroup-dis:expanded" name="f:panelMenuGroup-dis:expanded" type="hidden" value="false"/>
- <div id="f:panelMenuGroup-dis:hdr" class="rf-pm-gr-hdr">
+ <div id="f:panelMenuGroup-dis:hdr" class="rf-pm-gr-hdr rf-pm-gr-hdr-colps">
<table class="rf-pm-gr-gr">
<tbody>
<tr>
<td class="rf-pm-gr-ico">
- <div class="rf-pm-ico-colps rf-pm-chevron-down" style="display:block"></div>
- <div class="rf-pm-ico-exp rf-pm-chevron-down" style="display:none"></div>
+ <div class="rf-pm-ico-colps rf-ico-chevron-down"></div>
+ <div class="rf-pm-ico-exp rf-ico-chevron-down"></div>
</td>
<td class="rf-pm-gr-lbl"></td>
<td class="rf-pm-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-pm-chevron-up" style="display:block"></div>
- <div class="rf-pm-ico-exp rf-pm-chevron-up" style="display:none"></div>
+ <div class="rf-pm-ico-colps rf-ico-chevron-up"></div>
+ <div class="rf-pm-ico-exp rf-ico-chevron-up"></div>
</td>
</tr>
</tbody>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-item.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-item.xmlunit.xml 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-item.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -2,9 +2,9 @@
<table class="rf-pm-itm-gr">
<tbody>
<tr>
- <td class="rf-pm-itm-ico rf-pm-triangle-down"></td>
+ <td class="rf-pm-itm-ico rf-ico-triangle-down"></td>
<td class="rf-pm-itm-lbl">panelMenuItem</td>
- <td class="rf-pm-itm-exp-ico rf-pm-triangle-up"></td>
+ <td class="rf-pm-itm-exp-ico rf-ico-triangle-up"></td>
</tr>
</tbody>
</table>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-itemDis.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-itemDis.xmlunit.xml 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-itemDis.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -2,9 +2,9 @@
<table class="rf-pm-itm-gr">
<tbody>
<tr>
- <td class="rf-pm-itm-ico rf-pm-chevron-down"></td>
+ <td class="rf-pm-itm-ico rf-ico-chevron-down"></td>
<td class="rf-pm-itm-lbl">panelMenuItem</td>
- <td class="rf-pm-itm-exp-ico rf-pm-chevron-up"></td>
+ <td class="rf-pm-itm-exp-ico rf-ico-chevron-up"></td>
</tr>
</tbody>
</table>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroup.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroup.xmlunit.xml 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroup.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -1,17 +1,17 @@
<div id="f:panelMenuGroup-top" class="rf-pm-top-gr topGroupClass">
<input id="f:panelMenuGroup-top:expanded" name="f:panelMenuGroup-top:expanded" type="hidden" value="false"/>
- <div id="f:panelMenuGroup-top:hdr" class="rf-pm-top-gr-hdr">
+ <div id="f:panelMenuGroup-top:hdr" class="rf-pm-top-gr-hdr rf-pm-top-gr-hdr-colps">
<table class="rf-pm-top-gr-gr">
<tbody>
<tr>
<td class="rf-pm-top-gr-ico">
- <div class="rf-pm-ico-colps rf-pm-triangle" style="display:block"></div>
- <div class="rf-pm-ico-exp rf-pm-disc" style="display:none"></div>
+ <div class="rf-pm-ico-colps rf-ico-triangle"></div>
+ <div class="rf-pm-ico-exp rf-ico-disc"></div>
</td>
<td class="rf-pm-top-gr-lbl"></td>
<td class="rf-pm-top-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-pm-triangle" style="display:block"></div>
- <div class="rf-pm-ico-exp rf-pm-disc" style="display:none"></div>
+ <div class="rf-pm-ico-colps rf-ico-triangle"></div>
+ <div class="rf-pm-ico-exp rf-ico-disc"></div>
</td>
</tr>
</tbody>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroupDis.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroupDis.xmlunit.xml 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroupDis.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -1,17 +1,17 @@
<div id="f:panelMenuGroup-topDis" class="rf-pm-top-gr topGroupClass rf-pm-top-gr-dis topGroupDisableClass">
<input id="f:panelMenuGroup-topDis:expanded" name="f:panelMenuGroup-topDis:expanded" type="hidden" value="false"/>
- <div id="f:panelMenuGroup-topDis:hdr" class="rf-pm-top-gr-hdr">
+ <div id="f:panelMenuGroup-topDis:hdr" class="rf-pm-top-gr-hdr rf-pm-top-gr-hdr-colps">
<table class="rf-pm-top-gr-gr">
<tbody>
<tr>
<td class="rf-pm-top-gr-ico">
- <div class="rf-pm-ico-colps rf-pm-chevron" style="display:block"></div>
- <div class="rf-pm-ico-exp rf-pm-chevron" style="display:none"></div>
+ <div class="rf-pm-ico-colps rf-ico-chevron"></div>
+ <div class="rf-pm-ico-exp rf-ico-chevron"></div>
</td>
<td class="rf-pm-top-gr-lbl"></td>
<td class="rf-pm-top-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-pm-chevron" style="display:block"></div>
- <div class="rf-pm-ico-exp rf-pm-chevron" style="display:none"></div>
+ <div class="rf-pm-ico-colps rf-ico-chevron"></div>
+ <div class="rf-pm-ico-exp rf-ico-chevron"></div>
</td>
</tr>
</tbody>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topItem.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topItem.xmlunit.xml 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topItem.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -2,9 +2,9 @@
<table class="rf-pm-top-itm-gr">
<tbody>
<tr>
- <td class="rf-pm-top-itm-ico rf-pm-triangle"></td>
+ <td class="rf-pm-top-itm-ico rf-ico-triangle"></td>
<td class="rf-pm-top-itm-lbl">panelMenuItem</td>
- <td class="rf-pm-top-itm-exp-ico rf-pm-triangle"></td>
+ <td class="rf-pm-top-itm-exp-ico rf-ico-triangle"></td>
</tr>
</tbody>
</table>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topItemDis.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topItemDis.xmlunit.xml 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topItemDis.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -2,9 +2,9 @@
<table class="rf-pm-top-itm-gr">
<tbody>
<tr>
- <td class="rf-pm-top-itm-ico rf-pm-chevron"></td>
+ <td class="rf-pm-top-itm-ico rf-ico-chevron"></td>
<td class="rf-pm-top-itm-lbl">panelMenuItem</td>
- <td class="rf-pm-top-itm-exp-ico rf-pm-chevron"></td>
+ <td class="rf-pm-top-itm-exp-ico rf-ico-chevron"></td>
</tr>
</tbody>
</table>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-expanded.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -1,17 +1,17 @@
<div id="f:panelMenuGroup" class="rf-pm-gr">
<input id="f:panelMenuGroup:expanded" name="f:panelMenuGroup:expanded" type="hidden" value="true"/>
- <div id="f:panelMenuGroup:hdr" class="rf-pm-gr-hdr">
+ <div id="f:panelMenuGroup:hdr" class="rf-pm-gr-hdr rf-pm-gr-hdr-exp">
<table class="rf-pm-gr-gr">
<tbody>
<tr>
<td class="rf-pm-gr-ico">
- <div class="rf-pm-ico-colps rf-pm-none" style="display:none"></div>
- <div class="rf-pm-ico-exp rf-pm-none" style="display:block"></div>
+ <div class="rf-pm-ico-colps rf-ico-none"></div>
+ <div class="rf-pm-ico-exp rf-ico-none"></div>
</td>
<td class="rf-pm-gr-lbl">Group Label</td>
<td class="rf-pm-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-pm-none" style="display:none"></div>
- <div class="rf-pm-ico-exp rf-pm-none" style="display:block"></div>
+ <div class="rf-pm-ico-colps rf-ico-none"></div>
+ <div class="rf-pm-ico-exp rf-ico-none"></div>
</td>
</tr>
</tbody>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -1,17 +1,17 @@
<div id="f:panelMenuGroup" class="rf-pm-top-gr">
<input id="f:panelMenuGroup:expanded" name="f:panelMenuGroup:expanded" type="hidden" value="true"/>
- <div id="f:panelMenuGroup:hdr" class="rf-pm-top-gr-hdr">
+ <div id="f:panelMenuGroup:hdr" class="rf-pm-top-gr-hdr rf-pm-top-gr-hdr-exp">
<table class="rf-pm-top-gr-gr">
<tbody>
<tr>
<td class="rf-pm-top-gr-ico">
- <div class="rf-pm-ico-colps rf-pm-none" style="display:none"></div>
- <div class="rf-pm-ico-exp rf-pm-none" style="display:block"></div>
+ <div class="rf-pm-ico-colps rf-ico-none"></div>
+ <div class="rf-pm-ico-exp rf-ico-none"></div>
</td>
<td class="rf-pm-top-gr-lbl">Group Label</td>
<td class="rf-pm-top-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-pm-none" style="display:none"></div>
- <div class="rf-pm-ico-exp rf-pm-none" style="display:block"></div>
+ <div class="rf-pm-ico-colps rf-ico-none"></div>
+ <div class="rf-pm-ico-exp rf-ico-none"></div>
</td>
</tr>
</tbody>
@@ -23,4 +23,4 @@
</script>
</div>
-</div>
\ No newline at end of file
+</div>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -1,17 +1,17 @@
<div id="f:panelMenuGroup" class="rf-pm-gr">
<input id="f:panelMenuGroup:expanded" name="f:panelMenuGroup:expanded" type="hidden" value="false"/>
- <div id="f:panelMenuGroup:hdr" class="rf-pm-gr-hdr">
+ <div id="f:panelMenuGroup:hdr" class="rf-pm-gr-hdr rf-pm-gr-hdr-colps">
<table class="rf-pm-gr-gr">
<tbody>
<tr>
<td class="rf-pm-gr-ico">
- <div class="rf-pm-ico-colps rf-pm-none" style="display:block"></div>
- <div class="rf-pm-ico-exp rf-pm-none" style="display:none"></div>
+ <div class="rf-pm-ico-colps rf-ico-none"></div>
+ <div class="rf-pm-ico-exp rf-ico-none"></div>
</td>
<td class="rf-pm-gr-lbl"></td>
<td class="rf-pm-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-pm-none" style="display:block"></div>
- <div class="rf-pm-ico-exp rf-pm-none" style="display:none"></div>
+ <div class="rf-pm-ico-colps rf-ico-none"></div>
+ <div class="rf-pm-ico-exp rf-ico-none"></div>
</td>
</tr>
</tbody>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml 2011-01-05 10:40:01 UTC (rev 20890)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuItem.xmlunit.xml 2011-01-05 12:19:36 UTC (rev 20891)
@@ -2,9 +2,9 @@
<table class="rf-pm-itm-gr">
<tbody>
<tr>
- <td class="rf-pm-itm-ico rf-pm-none"></td>
+ <td class="rf-pm-itm-ico rf-ico-none"></td>
<td class="rf-pm-itm-lbl">My MY Item</td>
- <td class="rf-pm-itm-exp-ico rf-pm-none"></td>
+ <td class="rf-pm-itm-exp-ico rf-ico-none"></td>
</tr>
</tbody>
</table>
13 years, 11 months
JBoss Rich Faces SVN: r20890 - in modules/tests/metamer/trunk: ftest and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-05 05:40:01 -0500 (Wed, 05 Jan 2011)
New Revision: 20890
Modified:
modules/tests/metamer/trunk/ftest-source/pom.xml
modules/tests/metamer/trunk/ftest/pom.xml
modules/tests/metamer/trunk/pom.xml
Log:
reverting back to snapshot versions
Modified: modules/tests/metamer/trunk/ftest/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/pom.xml 2011-01-05 09:55:08 UTC (rev 20889)
+++ modules/tests/metamer/trunk/ftest/pom.xml 2011-01-05 10:40:01 UTC (rev 20890)
@@ -25,7 +25,7 @@
<parent>
<artifactId>functional-test-jboss-ci-template</artifactId>
<groupId>org.jboss.test.richfaces-selenium</groupId>
- <version>1.5.2.SP3</version>
+ <version>1.5.3-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.tests</groupId>
@@ -80,8 +80,8 @@
<properties>
<context.path>/metamer/</context.path>
<deployable.classifier>mojarra</deployable.classifier>
- <deployable.version>4.0.0.20110104-M5</deployable.version>
- <ftest.source.version>4.0.0.20110104-M5</ftest.source.version>
+ <deployable.version>4.0.0-SNAPSHOT</deployable.version>
+ <ftest.source.version>4.0.0-SNAPSHOT</ftest.source.version>
<testng.suite.xml>src/test/resources/testng.xml</testng.suite.xml>
<container.home>target/installs/${container.dir.deflatted}/${container.dir.unflatted}</container.home>
<jsf.config>Mojarra-2.0</jsf.config>
Modified: modules/tests/metamer/trunk/ftest-source/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest-source/pom.xml 2011-01-05 09:55:08 UTC (rev 20889)
+++ modules/tests/metamer/trunk/ftest-source/pom.xml 2011-01-05 10:40:01 UTC (rev 20890)
@@ -37,7 +37,7 @@
<dependency>
<artifactId>root</artifactId>
<groupId>org.jboss.test.richfaces-selenium</groupId>
- <version>1.5.2.SP3</version>
+ <version>1.5.3-SNAPSHOT</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Modified: modules/tests/metamer/trunk/pom.xml
===================================================================
--- modules/tests/metamer/trunk/pom.xml 2011-01-05 09:55:08 UTC (rev 20889)
+++ modules/tests/metamer/trunk/pom.xml 2011-01-05 10:40:01 UTC (rev 20890)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.richfaces.examples</groupId>
<artifactId>richfaces-example-parent</artifactId>
- <version>4.0.0.20101226-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.tests</groupId>
@@ -124,7 +124,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<richfaces.checkstyle.version>2</richfaces.checkstyle.version>
- <version.richfaces>4.0.0.20101226-M5</version.richfaces>
+ <version.richfaces>4.0.0-SNAPSHOT</version.richfaces>
</properties>
<dependencyManagement>
13 years, 11 months
JBoss Rich Faces SVN: r20889 - trunk/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2011-01-05 04:55:08 -0500 (Wed, 05 Jan 2011)
New Revision: 20889
Modified:
trunk/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/pom.xml
Log:
https://issues.jboss.org/browse/RF-10121
Modified: trunk/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/pom.xml
===================================================================
--- trunk/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/pom.xml 2011-01-05 05:56:16 UTC (rev 20888)
+++ trunk/archetypes/richfaces-archetype-simpleapp/src/main/resources/archetype-resources/pom.xml 2011-01-05 09:55:08 UTC (rev 20889)
@@ -145,8 +145,11 @@
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-ui</artifactId>
</dependency>
-
<dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ </dependency>
+ <dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
</dependency>
13 years, 11 months
JBoss Rich Faces SVN: r20888 - in modules/docs/trunk: Component_Development_Kit_Guide and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-01-05 00:56:16 -0500 (Wed, 05 Jan 2011)
New Revision: 20888
Modified:
modules/docs/trunk/Component_Development_Kit_Guide/pom.xml
modules/docs/trunk/Component_Reference/pom.xml
modules/docs/trunk/Developer_Guide/pom.xml
modules/docs/trunk/Migration_Guide/pom.xml
modules/docs/trunk/parent/pom.xml
modules/docs/trunk/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: modules/docs/trunk/Component_Development_Kit_Guide/pom.xml
===================================================================
--- modules/docs/trunk/Component_Development_Kit_Guide/pom.xml 2011-01-05 05:56:03 UTC (rev 20887)
+++ modules/docs/trunk/Component_Development_Kit_Guide/pom.xml 2011-01-05 05:56:16 UTC (rev 20888)
@@ -4,14 +4,14 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>richfaces-cdk-guide</artifactId>
- <version>4.0.0.20110105-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
<packaging>jdocbook</packaging>
<name>RichFaces CDK Guide</name>
<parent>
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0.20110105-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -106,9 +106,9 @@
</profiles>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011010...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/Compo...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/Componen...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/Component_De...</url>
</scm>
</project>
Modified: modules/docs/trunk/Component_Reference/pom.xml
===================================================================
--- modules/docs/trunk/Component_Reference/pom.xml 2011-01-05 05:56:03 UTC (rev 20887)
+++ modules/docs/trunk/Component_Reference/pom.xml 2011-01-05 05:56:16 UTC (rev 20888)
@@ -4,14 +4,14 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>richfaces-component-reference</artifactId>
- <version>4.0.0.20110105-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
<packaging>jdocbook</packaging>
<name>RichFaces Component Reference</name>
<parent>
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0.20110105-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -106,9 +106,9 @@
</profiles>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011010...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/Compo...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/Componen...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/Component_Re...</url>
</scm>
</project>
Modified: modules/docs/trunk/Developer_Guide/pom.xml
===================================================================
--- modules/docs/trunk/Developer_Guide/pom.xml 2011-01-05 05:56:03 UTC (rev 20887)
+++ modules/docs/trunk/Developer_Guide/pom.xml 2011-01-05 05:56:16 UTC (rev 20888)
@@ -4,14 +4,14 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>richfaces-developer-guide</artifactId>
- <version>4.0.0.20110105-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
<packaging>jdocbook</packaging>
<name>RichFaces Developer Guide</name>
<parent>
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0.20110105-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -107,9 +107,9 @@
</profiles>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011010...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/Devel...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/Develope...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/Developer_Guide</url>
</scm>
</project>
Modified: modules/docs/trunk/Migration_Guide/pom.xml
===================================================================
--- modules/docs/trunk/Migration_Guide/pom.xml 2011-01-05 05:56:03 UTC (rev 20887)
+++ modules/docs/trunk/Migration_Guide/pom.xml 2011-01-05 05:56:16 UTC (rev 20888)
@@ -4,14 +4,14 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>richfaces-migration-guide</artifactId>
- <version>4.0.0.20110105-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
<packaging>jdocbook</packaging>
<name>RichFaces Migration Guide</name>
<parent>
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0.20110105-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -107,9 +107,9 @@
</profiles>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011010...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/Migra...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/Migratio...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/Migration_Guide</url>
</scm>
</project>
Modified: modules/docs/trunk/parent/pom.xml
===================================================================
--- modules/docs/trunk/parent/pom.xml 2011-01-05 05:56:03 UTC (rev 20887)
+++ modules/docs/trunk/parent/pom.xml 2011-01-05 05:56:16 UTC (rev 20888)
@@ -28,7 +28,7 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0.20110105-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
<name>Richfaces Docs: Parent</name>
<packaging>pom</packaging>
<url>http://richfaces.org</url>
@@ -219,8 +219,8 @@
-->
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011010...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/parent</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/parent</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/parent</url>
</scm>
</project>
Modified: modules/docs/trunk/pom.xml
===================================================================
--- modules/docs/trunk/pom.xml 2011-01-05 05:56:03 UTC (rev 20887)
+++ modules/docs/trunk/pom.xml 2011-01-05 05:56:16 UTC (rev 20888)
@@ -9,7 +9,7 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-aggregator</artifactId>
- <version>4.0.0.20110105-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>RichFaces Document Aggregator</name>
@@ -22,9 +22,9 @@
</modules>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011010...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk</url>
</scm>
</project>
13 years, 11 months
JBoss Rich Faces SVN: r20887 - modules/docs/tags.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-01-05 00:56:03 -0500 (Wed, 05 Jan 2011)
New Revision: 20887
Added:
modules/docs/tags/4.0.0.20110105-M5/
Log:
[maven-scm] copy for tag 4.0.0.20110105-M5
Copied: modules/docs/tags/4.0.0.20110105-M5 (from rev 20886, modules/docs/trunk)
13 years, 11 months
JBoss Rich Faces SVN: r20886 - in modules/docs/trunk: Component_Development_Kit_Guide and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-01-05 00:55:35 -0500 (Wed, 05 Jan 2011)
New Revision: 20886
Modified:
modules/docs/trunk/Component_Development_Kit_Guide/pom.xml
modules/docs/trunk/Component_Reference/pom.xml
modules/docs/trunk/Developer_Guide/pom.xml
modules/docs/trunk/Migration_Guide/pom.xml
modules/docs/trunk/parent/pom.xml
modules/docs/trunk/pom.xml
Log:
[maven-release-plugin] prepare release 4.0.0.20110105-M5
Modified: modules/docs/trunk/Component_Development_Kit_Guide/pom.xml
===================================================================
--- modules/docs/trunk/Component_Development_Kit_Guide/pom.xml 2011-01-05 05:28:28 UTC (rev 20885)
+++ modules/docs/trunk/Component_Development_Kit_Guide/pom.xml 2011-01-05 05:55:35 UTC (rev 20886)
@@ -4,14 +4,14 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>richfaces-cdk-guide</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110105-M5</version>
<packaging>jdocbook</packaging>
<name>RichFaces CDK Guide</name>
<parent>
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110105-M5</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -106,9 +106,9 @@
</profiles>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/Compo...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/Componen...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/Component_De...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011010...</url>
</scm>
</project>
Modified: modules/docs/trunk/Component_Reference/pom.xml
===================================================================
--- modules/docs/trunk/Component_Reference/pom.xml 2011-01-05 05:28:28 UTC (rev 20885)
+++ modules/docs/trunk/Component_Reference/pom.xml 2011-01-05 05:55:35 UTC (rev 20886)
@@ -4,14 +4,14 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>richfaces-component-reference</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110105-M5</version>
<packaging>jdocbook</packaging>
<name>RichFaces Component Reference</name>
<parent>
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110105-M5</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -106,9 +106,9 @@
</profiles>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/Compo...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/Componen...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/Component_Re...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011010...</url>
</scm>
</project>
Modified: modules/docs/trunk/Developer_Guide/pom.xml
===================================================================
--- modules/docs/trunk/Developer_Guide/pom.xml 2011-01-05 05:28:28 UTC (rev 20885)
+++ modules/docs/trunk/Developer_Guide/pom.xml 2011-01-05 05:55:35 UTC (rev 20886)
@@ -4,14 +4,14 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>richfaces-developer-guide</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110105-M5</version>
<packaging>jdocbook</packaging>
<name>RichFaces Developer Guide</name>
<parent>
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110105-M5</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -107,9 +107,9 @@
</profiles>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/Devel...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/Develope...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/Developer_Guide</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011010...</url>
</scm>
</project>
Modified: modules/docs/trunk/Migration_Guide/pom.xml
===================================================================
--- modules/docs/trunk/Migration_Guide/pom.xml 2011-01-05 05:28:28 UTC (rev 20885)
+++ modules/docs/trunk/Migration_Guide/pom.xml 2011-01-05 05:55:35 UTC (rev 20886)
@@ -4,14 +4,14 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>richfaces-migration-guide</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110105-M5</version>
<packaging>jdocbook</packaging>
<name>RichFaces Migration Guide</name>
<parent>
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110105-M5</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -107,9 +107,9 @@
</profiles>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/Migra...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/Migratio...</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/Migration_Guide</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011010...</url>
</scm>
</project>
Modified: modules/docs/trunk/parent/pom.xml
===================================================================
--- modules/docs/trunk/parent/pom.xml 2011-01-05 05:28:28 UTC (rev 20885)
+++ modules/docs/trunk/parent/pom.xml 2011-01-05 05:55:35 UTC (rev 20886)
@@ -28,7 +28,7 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110105-M5</version>
<name>Richfaces Docs: Parent</name>
<packaging>pom</packaging>
<url>http://richfaces.org</url>
@@ -219,8 +219,8 @@
-->
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk/parent</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk/parent</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk/parent</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011010...</url>
</scm>
</project>
Modified: modules/docs/trunk/pom.xml
===================================================================
--- modules/docs/trunk/pom.xml 2011-01-05 05:28:28 UTC (rev 20885)
+++ modules/docs/trunk/pom.xml 2011-01-05 05:55:35 UTC (rev 20886)
@@ -9,7 +9,7 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>docs-aggregator</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110105-M5</version>
<packaging>pom</packaging>
<name>RichFaces Document Aggregator</name>
@@ -22,9 +22,9 @@
</modules>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/trunk</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0....</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/docs/tags/4.0.0.201...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/richfaces/modules/docs/tags/4.0.0.2011010...</url>
</scm>
</project>
13 years, 11 months
JBoss Rich Faces SVN: r20885 - in modules/docs/trunk/Component_Reference/src/main/docbook/en-US: extras and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-01-05 00:28:28 -0500 (Wed, 05 Jan 2011)
New Revision: 20885
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richfileUpload-Basic_usage.xml_sample
Log:
Updated fileUpload based on technical review RFPL-972
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2011-01-05 00:46:22 UTC (rev 20884)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2011-01-05 05:28:28 UTC (rev 20885)
@@ -426,13 +426,13 @@
<section id="sect-Component_Reference-Rich_inputs-richfileUpload">
<title><sgmltag><rich:fileUpload></sgmltag></title>
<para>
- The <sgmltag><rich:fileUpload></sgmltag> component allows the user to upload files to a server. It features multiple uploads, automatic uploads, progress bars, restrictions on file types and sizes to be uploaded, and an embedded Flash module.
+ The <sgmltag><rich:fileUpload></sgmltag> component allows the user to upload files to a server. It features multiple uploads, progress bars, restrictions on file types, and restrictions on sizes to be uploaded.
</para>
<section id="sect-Component_Reference-richfileUpload-Basic_usage">
<title>Basic usage</title>
<para>
- Basic usage requires the <varname>uploadData</varname> attribute, pointing to the collection of uploaded files.
+ Basic usage requires the <varname>fileUploadListener</varname> attribute. Use the attribute to call a function on the server side after each file is uploaded.
</para>
<example id="exam-Component_Reference-richfileUpload-Basic_usage">
<title>Basic usage</title>
@@ -440,23 +440,67 @@
</example>
</section>
- <section id="sect-Component_Reference-richfileUpload-Interactivity_options">
- <title>Interactivity options</title>
+ <section id="sect-Component_Reference-richfileUpload-Upload_settings">
+ <title>Upload settings</title>
<para>
- Files are uploaded to either the temporary folder (different for each operating system) or to <acronym>RAM</acronym> (random-access memory), depending on the value of the <parameter>createTempFile</parameter> parameter of the Ajax4jsf Filter section in the <filename>web.xml</filename> for the project.
+ Files are uploaded to either the temporary folder (different for each operating system) or to <acronym>RAM</acronym> (random-access memory), depending on the value of the <parameter>org.richfaces.fileUpload.createTempFile</parameter> parameter of the <filename>web.xml</filename> settings file for the project. If the parameter is set to <literal>true</literal>, the files are uploaded to the temporary folder.
</para>
<para>
- Use the <varname>fileUploadListener</varname> attribute to call a function on the server side after each file is uploaded.
+ To limit the maximum size of the uploaded files, define the byte size with the <parameter>org.richfaces.fileUpload.maxRequestSize</parameter> parameter of the <filename>web.xml</filename> settings file for the project.
</para>
+ </section>
+
+ <section id="sect-Component_Reference-richfileUpload-Interactivity_options">
+ <title>Interactivity options</title>
+ <!--
<para>
Set the <varname>immediateUpload</varname> attribute to <literal>true</literal> to upload files as soon as they are added to the list, rather than waiting for the user to press the <guibutton>Upload</guibutton> button. Set the <varname>autoclear</varname> attribute to <literal>true</literal> to automatically remove files from the list once they have been successfully uploaded.
</para>
<para>
The <sgmltag><rich:fileUpload></sgmltag> component can place restrictions on the files that can be uploaded. The <varname>acceptedTypes</varname> attribute restricts the file types to just those listed. The <varname>maxFilesQuantity</varname> attribute restricts the maximum number of files that can be uploaded. To enforce size restrictions on individual files, set the <parameter>maxRequestSize</parameter> parameter of the Ajax4jsf Filter section in the <filename>web.xml</filename> file for the project.
</para>
+ -->
<para>
- The text labels used in the component can be completely customized. Labels for the various controls of the component can be set using <varname>addControlLabel</varname>, <varname>clearAllControlLabel</varname>, <varname>clearControlLabel</varname>, <varname>stopEntryControlLabel</varname>, and <varname>uploadControlLabel</varname>. The status label for the upload can be set using the <varname>label</varname> attribute and the following wildcards:
+ The text labels used in the component can be completely customized. Labels for the various controls of the component can be set using the following parameters:
</para>
+ <variablelist>
+ <varlistentry>
+ <term><varname>addLabel</varname></term>
+ <listitem>
+ <para>
+ The <varname>addLabel</varname> parameter sets the label for the <guibutton>Add</guibutton> button.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>clearAllLabel</varname></term>
+ <listitem>
+ <para>
+ The <varname>clearAllLabel</varname> parameter sets the label for the <guibutton>Clear All</guibutton> button.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>clearLabel</varname></term>
+ <listitem>
+ <para>
+ The <varname>clearLabel</varname> parameter sets the label for the <guibutton>Clear</guibutton> button.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>uploadLabel</varname></term>
+ <listitem>
+ <para>
+ The <varname>uploadLabel</varname> parameter sets the label for the <guibutton>Upload</guibutton> button.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <!--
+ <para>
+ The status label for the upload can be set using the <varname>label</varname> attribute and the following wildcards:
+ </para>
<itemizedlist>
<listitem>
<para>
@@ -474,29 +518,38 @@
</para>
</listitem>
</itemizedlist>
+ -->
+ <para>
+ The progress of a file upload operation can be represented using either a referencing <sgmltag><rich:progressBar></sgmltag> component, or the <literal>progress</literal> facet. Refer to <xref linkend="sect-Component_Reference-Output_and_messages-richprogressBar" /> for details on the <sgmltag><rich:progressBar></sgmltag> component.
+ </para>
+ <para>
+ To disable the <sgmltag><rich:fileUpload></sgmltag> component, use the <varname>disabled</varname> attribute.
+ </para>
</section>
-
+ <!--
<section id="sect-Component_Reference-richfileUpload-Flash_module">
<title>Flash module</title>
<para>
The <sgmltag><rich:fileUpload></sgmltag> component has an embedded Flash module that adds extra functionality. To enable the Flash module, set <code>allowFlash="true"</code>. The Flash module adds additional features to file selection, such as the ability to choose multiple files at once and the filtering of files by their type. Additionally, the Flash module provides a smoother animation of the progress bar during the upload process, as the progress polling is performed by Flash rather than Ajax.
</para>
</section>
-
+ -->
<section id="sect-Component_Reference-richfileUpload-richfileUpload_client-side_events">
<title><sgmltag><rich:fileUpload></sgmltag> client-side events</title>
<para>
There are a number of event handlers specific to the <sgmltag><rich:fileUpload></sgmltag> component:
</para>
<itemizedlist>
+ <!--
<listitem>
<para>
<varname>onadd</varname> is triggered before a file is added to the list.
</para>
</listitem>
+ -->
<listitem>
<para>
- <varname>onupload</varname> is triggered before a file is uploaded.
+ <varname>onfilesubmit</varname> is triggered before a file is uploaded.
</para>
</listitem>
<listitem>
@@ -504,6 +557,7 @@
<varname>onuploadcomplete</varname> is triggered after all files in the list have finished uploading.
</para>
</listitem>
+ <!--
<listitem>
<para>
<varname>onuploadcanceled</varname> is triggered after an upload has been canceled.
@@ -514,6 +568,7 @@
<varname>onerror</varname> is triggered when an error occurs during the upload process.
</para>
</listitem>
+ -->
</itemizedlist>
</section>
@@ -522,29 +577,24 @@
<itemizedlist>
<listitem>
<para>
- <parameter>component-type</parameter>: <classname>org.richfaces.fileUpload</classname>
+ <parameter>component-type</parameter>: <classname>org.richfaces.FileUpload</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>component-class</parameter>: <classname>org.richfaces.component.html.HtmlFileUpload</classname>
+ <parameter>component-class</parameter>: <classname>org.richfaces.component.UIFileUpload</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>component-family</parameter>: <classname>org.richfaces.fileUpload</classname>
+ <parameter>component-family</parameter>: <classname>org.richfaces.FileUpload</classname>
</para>
</listitem>
<listitem>
<para>
- <parameter>renderer-type</parameter>: <classname>org.richfaces.renderkit.inplaceFileUpload</classname>
+ <parameter>renderer-type</parameter>: <classname>org.richfaces.FileUploadRenderer</classname>
</para>
</listitem>
- <listitem>
- <para>
- <parameter>tag-class</parameter>: <classname>org.richfaces.taglib.fileUploadTag</classname>
- </para>
- </listitem>
</itemizedlist>
</section>
</section>
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richfileUpload-Basic_usage.xml_sample
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richfileUpload-Basic_usage.xml_sample 2011-01-05 00:46:22 UTC (rev 20884)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richfileUpload-Basic_usage.xml_sample 2011-01-05 05:28:28 UTC (rev 20885)
@@ -1 +1 @@
-<rich:fileUpload uploadData="#{bean.data}" />
+<rich:fileUpload fileUploadListener="#{bean.listener}" />
13 years, 11 months
JBoss Rich Faces SVN: r20884 - in branches/RF-9323/cdk: generator/src/main/java/org/richfaces/cdk/model and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2011-01-04 19:46:22 -0500 (Tue, 04 Jan 2011)
New Revision: 20884
Modified:
branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessorImpl.java
branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/model/ComponentModel.java
branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java
branches/RF-9323/cdk/generator/src/test/java/org/richfaces/cdk/model/validator/ModelValidatorTest.java
branches/RF-9323/cdk/maven-cdk-plugin/src/it/annotated-component/pom.xml
branches/RF-9323/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java
Log:
CODING IN PROGRESS - issue RF-9323: CDK annotation @RendererSpecificComponent.attributes doesn't work
https://issues.jboss.org/browse/RF-9323
Modified: branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessorImpl.java
===================================================================
--- branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessorImpl.java 2011-01-04 17:16:29 UTC (rev 20883)
+++ branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessorImpl.java 2011-01-05 00:46:22 UTC (rev 20884)
@@ -36,7 +36,6 @@
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.TypeElement;
-import javax.tools.Diagnostic.Kind;
import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.CdkProcessingException;
Modified: branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/model/ComponentModel.java
===================================================================
--- branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/model/ComponentModel.java 2011-01-04 17:16:29 UTC (rev 20883)
+++ branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/model/ComponentModel.java 2011-01-05 00:46:22 UTC (rev 20884)
@@ -61,7 +61,6 @@
ComponentLibrary.merge(getFacets(), otherComponent.getFacets());
ComponentLibrary.merge(getEvents(), otherComponent.getEvents());
ComponentLibrary.merge(this, otherComponent);
- this.setGenerate(this.getGenerate() || otherComponent.getGenerate());
}
@Override
Modified: branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java
===================================================================
--- branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java 2011-01-04 17:16:29 UTC (rev 20883)
+++ branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/model/validator/ValidatorImpl.java 2011-01-05 00:46:22 UTC (rev 20884)
@@ -45,6 +45,7 @@
import org.richfaces.cdk.model.ClassName;
import org.richfaces.cdk.model.ComponentLibrary;
import org.richfaces.cdk.model.ComponentModel;
+import org.richfaces.cdk.model.ConverterModel;
import org.richfaces.cdk.model.DescriptionGroup;
import org.richfaces.cdk.model.EventModel;
import org.richfaces.cdk.model.FacesComponent;
@@ -56,6 +57,7 @@
import org.richfaces.cdk.model.RendererModel;
import org.richfaces.cdk.model.TagModel;
import org.richfaces.cdk.model.Taglib;
+import org.richfaces.cdk.model.ValidatorModel;
import org.richfaces.cdk.util.Strings;
import com.google.common.base.Predicate;
@@ -133,7 +135,78 @@
throw new CallbackException("Cannot infer Java class name for behavior " + this.behavior);
}
}
+
+ private final class ConverterTypeCallback implements NamingConventionsCallback {
+ private final ConverterModel converter;
+
+ public ConverterTypeCallback(ConverterModel converter) {
+ this.converter = converter;
+ }
+ @Override
+ public FacesId inferType(ClassName targetClass) throws CallbackException {
+ // TODO use actual methods
+ return namingConventions.inferComponentType(targetClass);
+ }
+
+ @Override
+ public FacesId inferType() throws CallbackException {
+ throw new CallbackException("Cannot infer type for converter " + this.converter);
+ }
+
+ @Override
+ public ClassName inferClass(FacesId id) throws CallbackException {
+ throw new CallbackException("Cannot infer target Java class name for converter " + this.converter);
+ }
+
+ @Override
+ public ClassName getDefaultBaseClass() throws CallbackException {
+ throw new CallbackException("Cannot infer base Java class name for converter " + this.converter);
+ }
+
+ @Override
+ public ClassName getDefaultClass() throws CallbackException {
+ return ClassName.get(Object.class);
+ }
+
+ }
+
+ private final class ValidatorTypeCallback implements NamingConventionsCallback {
+
+ private final ValidatorModel validator;
+
+ public ValidatorTypeCallback(ValidatorModel validator) {
+ this.validator = validator;
+ }
+
+ @Override
+ public FacesId inferType(ClassName targetClass) throws CallbackException {
+ // TODO use actual methods
+ return namingConventions.inferComponentType(targetClass);
+ }
+
+ @Override
+ public FacesId inferType() throws CallbackException {
+ throw new CallbackException("Cannot infer type for validator " + this.validator);
+ }
+
+ @Override
+ public ClassName inferClass(FacesId id) throws CallbackException {
+ throw new CallbackException("Cannot infer target Java class name for validator " + this.validator);
+ }
+
+ @Override
+ public ClassName getDefaultBaseClass() throws CallbackException {
+ throw new CallbackException("Cannot infer default Java class name for validator " + this.validator);
+ }
+
+ @Override
+ public ClassName getDefaultClass() throws CallbackException {
+ return ClassName.get(Object.class);
+ }
+
+ }
+
private final class RendererTypeCallback implements NamingConventionsCallback {
private final ComponentLibrary library;
private final RendererModel renderer;
@@ -226,8 +299,23 @@
verifyBehaviors(library);
verifyRenderers(library);
verifyTaglib(library);
+ verifyConverters(library);
+ verifyValidators(library);
}
+ private void verifyValidators(ComponentLibrary library) {
+ for (ValidatorModel validator : library.getValidators()) {
+ verifyTypes(validator, new ValidatorTypeCallback(validator));
+ }
+
+ }
+
+ protected void verifyConverters(ComponentLibrary library) {
+ for (ConverterModel converter : library.getConverters()) {
+ verifyTypes(converter, new ConverterTypeCallback(converter));
+ }
+ }
+
protected void verifyEvents(ComponentLibrary library) {
for (EventModel event : library.getEvents()) {
ClassName listenerInterface = event.getListenerInterface();
@@ -246,7 +334,7 @@
if (null == sourceInterface) {
// TODO - infer source interface.
}
- event.setGenerateSource(!sourceUtils.isClassExists(listenerInterface));
+ event.setGenerateSource(!sourceUtils.isClassExists(sourceInterface));
// Propagate event to corresponding components.
for (ComponentModel component : library.getComponents()) {
for (EventModel componentEvent : component.getEvents()) {
@@ -464,14 +552,14 @@
}
}
// Check classes.
- if (Boolean.TRUE.equals(component.getGenerate())) {
- if (null == component.getBaseClass()) {
- component.setBaseClass(callback.getDefaultBaseClass());
- // return;
- }
+ if (null == component.getGenerate()) {
if (null == component.getTargetClass()) {
component.setTargetClass(callback.inferClass(component.getId()));
}
+ component.setGenerate(!sourceUtilsProvider.get().isClassExists(component.getTargetClass()));
+ }
+ if (component.getGenerate()) {
+ verifyGeneratedClasses(component, callback);
} else if (null == component.getTargetClass()) {
if (null == component.getBaseClass()) {
component.setBaseClass(callback.getDefaultClass());
@@ -485,6 +573,16 @@
return true;
}
+ private void verifyGeneratedClasses(FacesComponent component, NamingConventionsCallback callback) throws CallbackException {
+ if (null == component.getBaseClass()) {
+ component.setBaseClass(callback.getDefaultBaseClass());
+ // return;
+ }
+ if (null == component.getTargetClass()) {
+ component.setTargetClass(callback.inferClass(component.getId()));
+ }
+ }
+
protected void verifyAttribute(PropertyBase attribute, FacesComponent component) {
// Check name.
if (Strings.isEmpty(attribute.getName())) {
Modified: branches/RF-9323/cdk/generator/src/test/java/org/richfaces/cdk/model/validator/ModelValidatorTest.java
===================================================================
--- branches/RF-9323/cdk/generator/src/test/java/org/richfaces/cdk/model/validator/ModelValidatorTest.java 2011-01-04 17:16:29 UTC (rev 20883)
+++ branches/RF-9323/cdk/generator/src/test/java/org/richfaces/cdk/model/validator/ModelValidatorTest.java 2011-01-05 00:46:22 UTC (rev 20884)
@@ -87,6 +87,7 @@
component.setTargetClass(className);
expect(namiingConventions.inferComponentType(className)).andReturn(type);
expect(namiingConventions.inferUIComponentFamily(type)).andReturn(FOO_BAZ);
+ expect(utils.isClassExists(className)).andReturn(true);
replay(log, utils, namiingConventions);
// Validator should set component type from base class.
validator.verifyComponentType(component);
Modified: branches/RF-9323/cdk/maven-cdk-plugin/src/it/annotated-component/pom.xml
===================================================================
--- branches/RF-9323/cdk/maven-cdk-plugin/src/it/annotated-component/pom.xml 2011-01-04 17:16:29 UTC (rev 20883)
+++ branches/RF-9323/cdk/maven-cdk-plugin/src/it/annotated-component/pom.xml 2011-01-05 00:46:22 UTC (rev 20884)
@@ -31,6 +31,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
<configuration>
<!-- http://maven.apache.org/plugins/maven-compiler-plugin/ -->
<source>1.6</source>
Modified: branches/RF-9323/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java
===================================================================
--- branches/RF-9323/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java 2011-01-04 17:16:29 UTC (rev 20883)
+++ branches/RF-9323/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/java/org/richfaces/cdk/test/component/AbstractTestComponent.java 2011-01-05 00:46:22 UTC (rev 20884)
@@ -68,8 +68,9 @@
renderer=@JsfRenderer(type="org.richfaces.cdk.test.HtmlAbbrRenderer")),
@RendererSpecificComponent(type = "org.richfaces.cdk.test.TestHtmlDfn",
tag=@Tag(name="dfn"),
- generate="org.richfaces.cdk.test.component.html.HtmlTestDfn",
- attributes="html5.xml")
+ generate="org.richfaces.cdk.test.component.html.HtmlTestDfn"
+ /*,
+ attributes="html5.xml"*/)
}
)
public abstract class AbstractTestComponent extends UIComponentBase /*implements ValueHolder */{
13 years, 12 months