From richfaces-svn-commits at lists.jboss.org Tue Dec 29 14:11:57 2009 Content-Type: multipart/mixed; boundary="===============6846755364550794949==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r16224 - in root: ui/trunk/components/core/src/main/config and 4 other directories. Date: Tue, 29 Dec 2009 14:11:57 -0500 Message-ID: <200912291911.nBTJBvcs028695@svn01.web.mwc.hst.phx2.redhat.com> --===============6846755364550794949== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: nbelaevski Date: 2009-12-29 14:11:56 -0500 (Tue, 29 Dec 2009) New Revision: 16224 Added: root/examples/trunk/components/core-demo/src/main/webapp/queue.xhtml root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIQu= eue.java root/ui/trunk/components/core/src/main/java/org/richfaces/component/html= /HtmlQueue.java root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/html= /QueueRenderer.java Modified: root/examples/trunk/components/core-demo/src/main/webapp/welcome.xhtml root/ui/trunk/components/core/src/main/config/faces-config.xml root/ui/trunk/components/core/src/main/resources/META-INF/a4j.taglib.xml Log: https://jira.jboss.org/jira/browse/RF-7896 Added: root/examples/trunk/components/core-demo/src/main/webapp/queue.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- root/examples/trunk/components/core-demo/src/main/webapp/queue.xhtml = (rev 0) +++ root/examples/trunk/components/core-demo/src/main/webapp/queue.xhtml 20= 09-12-29 19:11:56 UTC (rev 16224) @@ -0,0 +1,19 @@ + + + + + + + + + = + + + + + + \ No newline at end of file Modified: root/examples/trunk/components/core-demo/src/main/webapp/welcome.= xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- root/examples/trunk/components/core-demo/src/main/webapp/welcome.xhtml = 2009-12-29 18:05:21 UTC (rev 16223) +++ root/examples/trunk/components/core-demo/src/main/webapp/welcome.xhtml = 2009-12-29 19:11:56 UTC (rev 16224) @@ -39,6 +39,9 @@
  • Server side execute/render
  • +
  • +a4j:queue +
  • Modified: root/ui/trunk/components/core/src/main/config/faces-config.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- root/ui/trunk/components/core/src/main/config/faces-config.xml 2009-12-= 29 18:05:21 UTC (rev 16223) +++ root/ui/trunk/components/core/src/main/config/faces-config.xml 2009-12-= 29 19:11:56 UTC (rev 16224) @@ -67,6 +67,14 @@ = + + org.richfaces.Queue + org.richfaces.component.html.HtmlQueue + + false + + + HTML_BASIC @@ -89,5 +97,10 @@ org.richfaces.StatusRenderer org.richfaces.renderkit.html.AjaxStatusRenderer + + org.richfaces.Queue + org.richfaces.QueueRenderer + org.richfaces.renderkit.html.QueueRenderer + \ No newline at end of file Added: root/ui/trunk/components/core/src/main/java/org/richfaces/component/= UIQueue.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIQ= ueue.java (rev 0) +++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/UIQ= ueue.java 2009-12-29 19:11:56 UTC (rev 16224) @@ -0,0 +1,67 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2009, Red Hat, Inc. and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.richfaces.component; + +import javax.faces.component.UIComponentBase; + +/** + * @author Nick Belaevski + * = + */ +public class UIQueue extends UIComponentBase { + + public static final String GLOBAL_QUEUE_NAME =3D "org.richfaces.queue.= global"; + + public static final String COMPONENT_TYPE =3D "org.richfaces.Queue"; + + public static final String COMPONENT_FAMILY =3D "org.richfaces.Queue"; + + private enum PropertyKeys { + requestDelay, status + } + + public UIQueue() { + setRendererType("org.richfaces.QueueRenderer"); + } + + public int getRequestDelay() { + return (Integer) getStateHelper().eval(PropertyKeys.requestDelay, = Integer.MIN_VALUE); + } + + public void setRequestDelay(int requestDelay) { + getStateHelper().put(PropertyKeys.requestDelay, requestDelay); + } + = + public String getStatus() { + return (String) getStateHelper().eval(PropertyKeys.status); + } + = + public void setStatus(String status) { + getStateHelper().put(PropertyKeys.status, status); + } + + @Override + public String getFamily() { + return COMPONENT_FAMILY; + } + +} Added: root/ui/trunk/components/core/src/main/java/org/richfaces/component/= html/HtmlQueue.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- root/ui/trunk/components/core/src/main/java/org/richfaces/component/htm= l/HtmlQueue.java (rev 0) +++ root/ui/trunk/components/core/src/main/java/org/richfaces/component/htm= l/HtmlQueue.java 2009-12-29 19:11:56 UTC (rev 16224) @@ -0,0 +1,100 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2009, Red Hat, Inc. and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.richfaces.component.html; + +import org.richfaces.component.UIQueue; + +/** + * @author Nick Belaevski + * = + */ +public class HtmlQueue extends UIQueue { + + public static final String COMPONENT_TYPE =3D "org.richfaces.Queue"; + + public static final String COMPONENT_FAMILY =3D "org.richfaces.Queue"; + + private enum PropertyKeys { + onsubmit, oncomplete, onbeforedomupdate, onerror, onevent, onreque= stqueue, onrequestdequeue + } + + public HtmlQueue() { + setRendererType("org.richfaces.QueueRenderer"); + } + + public String getOnsubmit() { + return (String) getStateHelper().eval(PropertyKeys.onsubmit); + } + + public void setOnsubmit(String onsubmit) { + getStateHelper().put(PropertyKeys.onsubmit, onsubmit); + } + + public String getOncomplete() { + return (String) getStateHelper().eval(PropertyKeys.oncomplete); + } + + public void setOncomplete(String oncomplete) { + getStateHelper().put(PropertyKeys.oncomplete, oncomplete); + } + + public String getOnbeforedomupdate() { + return (String) getStateHelper().eval(PropertyKeys.onbeforedomupda= te); + } + + public void setOnbeforedomupdate(String onbeforedomupdate) { + getStateHelper().put(PropertyKeys.onbeforedomupdate, onbeforedomup= date); + } + + public String getOnerror() { + return (String) getStateHelper().eval(PropertyKeys.onerror); + } + + public void setOnerror(String onerror) { + getStateHelper().put(PropertyKeys.onerror, onerror); + } + + public String getOnevent() { + return (String) getStateHelper().eval(PropertyKeys.onevent); + } + + public void setOnevent(String onevent) { + getStateHelper().put(PropertyKeys.onevent, onevent); + } + + public String getOnrequestqueue() { + return (String) getStateHelper().eval(PropertyKeys.onrequestqueue); + } + + public void setOnrequestqueue(String onrequestqueue) { + getStateHelper().put(PropertyKeys.onrequestqueue, onrequestqueue); + } + + public String getOnrequestdequeue() { + return (String) getStateHelper().eval(PropertyKeys.onrequestdequeu= e); + } + + public void setOnrequestdequeue(String onrequestdequeue) { + getStateHelper().put(PropertyKeys.onrequestdequeue, onrequestdeque= ue); + } + +} Added: root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/= html/QueueRenderer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/htm= l/QueueRenderer.java (rev 0) +++ root/ui/trunk/components/core/src/main/java/org/richfaces/renderkit/htm= l/QueueRenderer.java 2009-12-29 19:11:56 UTC (rev 16224) @@ -0,0 +1,47 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2009, Red Hat, Inc. and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.richfaces.renderkit.html; + +import javax.faces.application.ResourceDependencies; +import javax.faces.application.ResourceDependency; +import javax.faces.event.AbortProcessingException; +import javax.faces.event.ComponentSystemEvent; +import javax.faces.event.ComponentSystemEventListener; +import javax.faces.event.ListenerFor; +import javax.faces.event.PostAddToViewEvent; +import javax.faces.render.Renderer; + +/** + * @author Nick Belaevski + * = + */ +(a)ResourceDependencies( { @ResourceDependency(library =3D "javax.faces", = name =3D "jsf.js"), + @ResourceDependency(name =3D "jquery.js"), @ResourceDependency(name = =3D "richfaces.js"), + @ResourceDependency(name =3D "richfaces-queue.js") + }) +(a)ListenerFor(systemEventClass =3D PostAddToViewEvent.class) +public class QueueRenderer extends Renderer implements ComponentSystemEven= tListener { + + public void processEvent(ComponentSystemEvent event) throws AbortProce= ssingException { + //TODO encode queue settings + } +} Modified: root/ui/trunk/components/core/src/main/resources/META-INF/a4j.tag= lib.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- root/ui/trunk/components/core/src/main/resources/META-INF/a4j.taglib.xm= l 2009-12-29 18:05:21 UTC (rev 16223) +++ root/ui/trunk/components/core/src/main/resources/META-INF/a4j.taglib.xm= l 2009-12-29 19:11:56 UTC (rev 16224) @@ -61,6 +61,13 @@ org.richfaces.CommandButtonRenderer + + queue + + org.richfaces.Queue + org.richfaces.QueueRenderer + + = ajax --===============6846755364550794949==--