From jira-events at lists.jboss.org Thu Jul 15 12:57:11 2010 Content-Type: multipart/mixed; boundary="===============5039357683447924161==" MIME-Version: 1.0 From: Anton Belevich (JIRA) To: richfaces-issues at lists.jboss.org Subject: [richfaces-issues] [JBoss JIRA] Created: (RF-8941) Setting 'richfaces.queue.enabled' to 'false' force java.lang.IllegalStateException Date: Thu, 15 Jul 2010 12:57:07 -0400 Message-ID: <1735858577.6378.1279213027322.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com> --===============5039357683447924161== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Setting 'richfaces.queue.enabled' to 'false' force java.lang.IllegalStateEx= ception = ---------------------------------------------------------------------------= -------- Key: RF-8941 URL: https://jira.jboss.org/browse/RF-8941 Project: RichFaces Issue Type: Bug Security Level: Public (Everyone can see) Affects Versions: 4.0.0.Milestone1 Reporter: Anton Belevich Assignee: Nick Belaevski Priority: Critical steps to reproduce: = add to the web.xml in richfaces-showcase application = org.richfaces.queue.enabled false try to use a4j:queue sample = exception log: = 15.07.2010 19:53:06 com.sun.faces.util.Util checkIdUniqueness SEVERE: JSF1007: Duplicate component ID j_idt26:j_id11 found in view. 15.07.2010 19:53:06 com.sun.faces.util.Util checkIdUniqueness SEVERE: +id: j_id1 type: javax.faces.component.UIViewRoot(a)10cec16 +id: javax_faces_location_HEAD type: com.sun.faces.component.ComponentResourceContainer(a)85e57 +id: j_id7 type: javax.faces.component.UIOutput(a)169a1c5 +id: j_id8 type: javax.faces.component.UIOutput(a)1fb9fb3 +id: j_id9 type: javax.faces.component.UIOutput(a)b1be82 +id: j_id10 type: javax.faces.component.UIOutput(a)15264db +id: j_idt9 type: javax.faces.component.UIOutput(a)17aaa0e +id: j_id12 type: javax.faces.component.UIOutput(a)5b8e8c +id: j_id13 type: javax.faces.component.UIOutput(a)eb9f0d +id: j_id14 type: javax.faces.component.UIOutput(a)1174031 +id: j_idt80 type: javax.faces.component.UIOutput(a)1c313da +id: j_idt42 type: javax.faces.component.UIOutput(a)1e3c2c6 +id: j_id2 type: javax.faces.component.UIPanel(a)17757ad +id: j_idt1 type: javax.faces.component.UIViewParameter(a)f6852d +id: j_idt2 type: javax.faces.component.UIViewParameter(a)a16157 +id: j_idt3 type: javax.faces.component.UIViewParameter(a)fd981a +id: j_idt4 type: +id: j_idt5 type: +id: j_idt6 type: javax.faces.component.UIOutput(a)15fc606 +id: j_idt7 type: = Components Gallery +id: j_idt8 type: javax.faces.component.UIOutput(a)c1e4d5 +id: j_idt10 type: = =
= +id: j_idt11 type: javax.faces.component.html.HtmlOutputLink(a)1959352 +id: j_idt12 type: Project Site +id: j_idt13 type: javax.faces.component.html.HtmlOutputText(a)fb1135 +id: j_idt14 type: javax.faces.component.html.HtmlOutputLink(a)126c5a5 +id: j_idt15 type: Project Wiki +id: j_idt16 type: javax.faces.component.html.HtmlOutputText(a)79df82 +id: j_idt17 type: javax.faces.component.html.HtmlOutputLink(a)1410a85 +id: j_idt18 type: RichFaces Community Space +id: j_idt19 type: javax.faces.component.html.HtmlOutputText(a)119b1ca +id: j_idt20 type: javax.faces.component.html.HtmlOutputLink(a)1e779a7 +id: j_idt21 type: Download +id: j_idt22 type: javax.faces.component.html.HtmlOutputText(a)1e3e7d2 +id: j_idt23 type: javax.faces.component.html.HtmlOutputLink(a)1a81bd5 +id: j_idt24 type: Sources +id: j_idt25 type: =
= +id: j_idt26 type: javax.faces.component.UINamingContainer(a)1bb60ad +id: j_id11 type: javax.faces.component.UIPanel(a)1d590d +id: j_idt27 type: javax.faces.component.html.HtmlOutputText(a)c80e21 +id: j_id11 type: javax.faces.component.UIPanel(a)c18e99 +id: j_idt43 type: = =
= +id: j_idt44 type: javax.faces.component.html.HtmlPanelGroup(a)5ba50e +id: j_idt45 type: =
= +id: j_idt46 type: javax.faces.component.UIOutput(a)b173c3 +id: j_idt47 type: =
= = +id: j_idt48 type: =
= = +id: j_idt49 type: =
= =
= +id: j_idt28 type: =
    = +id: j_idt29 type: org.richfaces.component.UIRepeat(a)328c40 +id: j_idt30 type: =
  • = +id: j_idt31 type: javax.faces.component.html.HtmlOutputText(a)95ef17 +id: j_idt32 type: javax.faces.component.html.HtmlOutputText(a)183da96 +id: j_idt33 type: =
    • = +id: j_idt34 type: org.richfaces.component.UIRepeat(a)183d59c +id: j_idt35 type: =
    • = +id: j_idt36 type: javax.faces.component.html.HtmlOutcomeTargetLink(a)3cfaab +id: j_idt37 type: javax.faces.component.UIParameter(a)16d3046 +id: j_idt38 type: javax.faces.component.html.HtmlOutputText(a)17c4779 +id: j_idt39 type: =
    • = +id: j_idt40 type: =
    = +id: j_idt41 type: =
= +id: j_idt50 type:
= = = +id: j_idt51 type: javax.faces.component.UINamingContainer(a)270fc4 +id: j_id8 type: javax.faces.component.UIPanel(a)178e13f +id: j_idt43 type: = =
= +id: j_idt44 type: javax.faces.component.html.HtmlPanelGroup(a)187e184 +id: j_idt45 type: =
= +id: j_idt46 type: javax.faces.component.UIOutput(a)1e6cf07 +id: j_idt47 type: =
= = +id: j_idt48 type: =
= = +id: j_idt49 type: =
= =
= +id: j_idt52 type: org.richfaces.component.UIRepeat(a)1a37fac +id: j_idt53 type: javax.faces.component.html.HtmlOutcomeTargetLink(a)1132e76 +id: j_idt54 type: javax.faces.component.UIParameter(a)4f71a3 +id: j_idt55 type: javax.faces.component.html.HtmlOutputText(a)1ad9b0f +id: j_idt56 type: javax.faces.component.UINamingContainer(a)2209db +id: j_id8 type: javax.faces.component.UIPanel(a)10c0fa7 +id: j_idt43 type: = =
= +id: j_idt44 type: javax.faces.component.html.HtmlPanelGroup(a)19ae493 +id: j_idt45 type: =
= +id: j_idt46 type: javax.faces.component.UIOutput(a)14a616 +id: j_idt47 type: =
= = +id: j_idt48 type: =
= = +id: j_idt49 type: =
= =
= +id: j_idt57 type: com.sun.faces.facelets.component.UIRepeat(a)b101cf +id: j_idt58 type: javax.faces.component.html.HtmlOutcomeTargetLink(a)edf4c8 +id: j_idt59 type: javax.faces.component.UIParameter(a)5b55a9 +id: j_idt60 type: javax.faces.component.html.HtmlOutputText(a)54f169 +id: j_idt61 type: =
#{demoNavigator.currentSample.name} = +id: j_idt69 type: =

JSF 2 provides queue mechanism out-of the box already. And RichFaces que= ue just provides some additional customizations to improve the queue usability and allow to = tune your performance while using Ajax as much as possible.

The only big difference which the developers who used queue in 3.3.x sho= uld remember: as JSF 2 already provides single queue and not allows to have more than one= queue instance(currently) you can't really fire concurrent requests anymore. So the queue in RF now n= ot actually defines = logical queue but just a component for defining queueing options.

Here you could explore additional optimization parameters of the queue a= nd learn how they = influence Ajax requests. This example is a good start to learn about Ajax r= equests = flood protection.

Pay attention to next point in the example:

  • Setting request delay to greater value reduces the greatly requests cou= nt on fast typing. (More similar requests are combined in the result)
Also pay your attention to the queue definition. Such definition (inside so= me form without a name) means that the queue options becomes global for the= form. = = +id: j_idt70 type: javax.faces.component.UINamingContainer(a)1a3f178 +id: j_id7 type: javax.faces.component.UIPanel(a)d7a9c9 +id: j_idt43 type: = =
= +id: j_idt44 type: javax.faces.component.html.HtmlPanelGroup(a)17892d5 +id: j_idt45 type: =
= +id: j_idt46 type: javax.faces.component.UIOutput(a)eff545 +id: j_idt47 type: =
= = +id: j_idt48 type: =
= = +id: j_idt49 type: =
= =
= +id: form type: javax.faces.component.html.HtmlForm(a)7a3a30 +id: j_idt71 type: org.richfaces.component.UIQueue(a)825cf3 +id: j_idt72 type: javax.faces.component.html.HtmlPanelGrid(a)a47cc3 +id: j_idt73 type: javax.faces.component.html.HtmlPanelGrid(a)fae78f +id: j_idt74 type: javax.faces.component.html.HtmlOutputText(a)789d63 +id: myinput type: javax.faces.component.html.HtmlInputText(a)a4ed99 +id: j_idt75 type: javax.faces.component.html.HtmlOutputText(a)1eae15f +id: outtext type: javax.faces.component.html.HtmlOutputText(a)172290f +id: j_idt76 type: javax.faces.component.html.HtmlOutputText(a)1e5a5dc +id: events type: javax.faces.component.html.HtmlOutputText(a)1ec41c0 +id: j_idt77 type: javax.faces.component.html.HtmlOutputText(a)1d0e2c9 +id: requests type: javax.faces.component.html.HtmlOutputText(a)d8fd1a +id: j_idt78 type: javax.faces.component.html.HtmlOutputText(a)1d0e17a +id: updates type: javax.faces.component.html.HtmlOutputText(a)834af6 +id: j_idt79 type: javax.faces.component.UINamingContainer(a)1ae81ab +id: null type: javax.faces.component.UIPanel(a)cbffde +id: j_idt81 type: org.richfaces.component.UIOutputPanel(a)4c585f +id: j_idt82 type: javax.faces.component.html.HtmlMessage(a)3de2df +id: j_idt83 type: javax.faces.component.html.HtmlPanelGrid(a)f9d4f7 +id: j_idt85 type: javax.faces.component.html.HtmlCommandButton(a)12efcfe +id: j_idt84 type: javax.faces.component.html.HtmlOutputText(a)ca6ae +id: delay type: javax.faces.component.html.HtmlInputText(a)930120 +id: j_idt86 type: =

Queue could be defined as

  • Default for view. In this case - the parameters will be use= d for all = the Ajax requests in view(if not redefined). In order to define such queue= - just place = a4j:queu outside of any forms without defining name
  • Default for form. Similar to view-scoped but should be defiend= in some form without defining name
  • Referenced from ajax behaviors/components. Queue should be def= ined with name and referenced using attachQueue tag(see corresponding sampl= e).
+id: j_idt66 type:
= +id: j_idt67 type:
#{a4j}
+id: j_idt68 type: = 15.07.2010 19:53:06 com.sun.faces.application.view.FaceletViewHandlingStrat= egy handleRenderException SEVERE: Error Rendering View[/richfaces/component-sample.xhtml] java.lang.IllegalStateException: Component ID j_idt26:j_id11 has already be= en found in the view. at com.sun.faces.util.Util.checkIdUniqueness(Util.java:820) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:804) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:804) at com.sun.faces.application.view.StateManagementStrategyImpl.saveView(Sta= teManagementStrategyImpl.java:134) at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.ja= va:126) at javax.faces.application.StateManager.getViewState(StateManager.java:529) at com.sun.faces.context.PartialViewContextImpl.renderState(PartialViewCon= textImpl.java:390) at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialView= ContextImpl.java:285) at org.richfaces.context.PartialViewContextImpl.processPartial(PartialView= ContextImpl.java:189) at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:989) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(F= aceletViewHandlingStrategy.java:378) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHan= dler.java:127) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase= .java:117) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic= ationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil= terChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal= ve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal= ve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav= a:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav= a:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve= .java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:= 293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:8= 49) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process= (Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) java.lang.IllegalStateException: Component ID j_idt26:j_id11 has already be= en found in the view. at com.sun.faces.util.Util.checkIdUniqueness(Util.java:820) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:804) at com.sun.faces.util.Util.checkIdUniqueness(Util.java:804) at com.sun.faces.application.view.StateManagementStrategyImpl.saveView(Sta= teManagementStrategyImpl.java:134) at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.ja= va:126) at javax.faces.application.StateManager.getViewState(StateManager.java:529) at com.sun.faces.context.PartialViewContextImpl.renderState(PartialViewCon= textImpl.java:390) at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialView= ContextImpl.java:285) at org.richfaces.context.PartialViewContextImpl.processPartial(PartialView= ContextImpl.java:189) at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:989) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(F= aceletViewHandlingStrategy.java:378) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHan= dler.java:127) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase= .java:117) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic= ationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil= terChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal= ve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal= ve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav= a:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav= a:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve= .java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:= 293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:8= 49) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process= (Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) 15.07.2010 19:53:06 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet Faces Servlet threw exception java.lang.IllegalStateException: CDATA tags may not nest at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startCDATA(HtmlRe= sponseWriter.java:626) at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrap= per.java:172) at javax.faces.context.PartialResponseWriter.startError(PartialResponseWri= ter.java:334) at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseErr= or(AjaxExceptionHandlerImpl.java:196) at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHand= lerImpl.java:119) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:115) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic= ationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil= terChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal= ve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal= ve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav= a:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav= a:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve= .java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:= 293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:8= 49) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process= (Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= ps://jira.jboss.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============5039357683447924161==-- From jira-events at lists.jboss.org Thu Jul 15 15:38:59 2010 Content-Type: multipart/mixed; boundary="===============2396332543763724309==" MIME-Version: 1.0 From: Nick Belaevski (JIRA) To: richfaces-issues at lists.jboss.org Subject: [richfaces-issues] [JBoss JIRA] Resolved: (RF-8941) Setting 'richfaces.queue.enabled' to 'false' force java.lang.IllegalStateException Date: Thu, 15 Jul 2010 15:38:59 -0400 Message-ID: <352543157.6656.1279222739009.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com> In-Reply-To: 1735858577.6378.1279213027322.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com --===============2396332543763724309== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ https://jira.jboss.org/browse/RF-8941?page=3Dcom.atlassian.jira.plug= in.system.issuetabpanels:all-tabpanel ] Nick Belaevski resolved RF-8941. -------------------------------- Resolution: Duplicate Issue > Setting 'richfaces.queue.enabled' to 'false' force java.lang.IllegalState= Exception = > -------------------------------------------------------------------------= ---------- > > Key: RF-8941 > URL: https://jira.jboss.org/browse/RF-8941 > Project: RichFaces > Issue Type: Bug > Security Level: Public(Everyone can see) = > Affects Versions: 4.0.0.Milestone1 > Reporter: Anton Belevich > Assignee: Nick Belaevski > Priority: Critical > > steps to reproduce: = > add to the web.xml in richfaces-showcase application = > > org.richfaces.queue.enabled > false > > try to use a4j:queue sample = > exception log: = > 15.07.2010 19:53:06 com.sun.faces.util.Util checkIdUniqueness > SEVERE: JSF1007: Duplicate component ID j_idt26:j_id11 found in view. > 15.07.2010 19:53:06 com.sun.faces.util.Util checkIdUniqueness > SEVERE: +id: j_id1 > type: javax.faces.component.UIViewRoot(a)10cec16 > +id: javax_faces_location_HEAD > type: com.sun.faces.component.ComponentResourceContainer(a)85e57 > +id: j_id7 > type: javax.faces.component.UIOutput(a)169a1c5 > +id: j_id8 > type: javax.faces.component.UIOutput(a)1fb9fb3 > +id: j_id9 > type: javax.faces.component.UIOutput(a)b1be82 > +id: j_id10 > type: javax.faces.component.UIOutput(a)15264db > +id: j_idt9 > type: javax.faces.component.UIOutput(a)17aaa0e > +id: j_id12 > type: javax.faces.component.UIOutput(a)5b8e8c > +id: j_id13 > type: javax.faces.component.UIOutput(a)eb9f0d > +id: j_id14 > type: javax.faces.component.UIOutput(a)1174031 > +id: j_idt80 > type: javax.faces.component.UIOutput(a)1c313da > +id: j_idt42 > type: javax.faces.component.UIOutput(a)1e3c2c6 > +id: j_id2 > type: javax.faces.component.UIPanel(a)17757ad > +id: j_idt1 > type: javax.faces.component.UIViewParameter(a)f6852d > +id: j_idt2 > type: javax.faces.component.UIViewParameter(a)a16157 > +id: j_idt3 > type: javax.faces.component.UIViewParameter(a)fd981a > +id: j_idt4 > type: > +id: j_idt5 > type: > +id: j_idt6 > type: javax.faces.component.UIOutput(a)15fc606 > +id: j_idt7 > type: = > Components Gallery > +id: j_idt8 > type: javax.faces.component.UIOutput(a)c1e4d5 > +id: j_idt10 > type: = > > > > > > > > = > > > > > >
>
>

Welcome to RichFaces demo!

>
>
> > > > > > > >
>
> = > +id: j_idt26 > type: javax.faces.component.UINamingContainer(a)1bb60ad > +id: j_id11 > type: javax.faces.component.UIPanel(a)1d590d > +id: j_idt27 > type: javax.faces.component.html.HtmlOutputText(a)c80e21 > +id: j_id11 > type: javax.faces.component.UIPanel(a)c18e99 > +id: j_idt43 > type: = > = >
> = > +id: j_idt44 > type: javax.faces.component.html.HtmlPanelGroup(a)5ba50e > +id: j_idt45 > type: = >
> = > +id: j_idt46 > type: javax.faces.component.UIOutput(a)b173c3 > +id: j_idt47 > type: = >
= > = > +id: j_idt48 > type: = >
= > = > +id: j_idt49 > type: = >
= > = >
= > +id: j_idt28 > type: = >
    > = > +id: j_idt29 > type: org.richfaces.component.UIRepeat(a)328c40 > +id: j_idt30 > type: = >
  • > = > +id: j_idt31 > type: javax.faces.component.html.HtmlOutputText(a)95ef17 > +id: j_idt32 > type: javax.faces.component.html.HtmlOutputText(a)183da96 > +id: j_idt33 > type: = >
  • >
      > = > +id: j_idt34 > type: org.richfaces.component.UIRepeat(a)183d59c > +id: j_idt35 > type: = >
    • > = > +id: j_idt36 > type: javax.faces.component.html.HtmlOutcomeTargetLink(a)3cf= aab > +id: j_idt37 > type: javax.faces.component.UIParameter(a)16d3046 > +id: j_idt38 > type: javax.faces.component.html.HtmlOutputText(a)17c4779 > +id: j_idt39 > type: = >
    • > = > +id: j_idt40 > type: = >
    > = > +id: j_idt41 > type: = >
> = > +id: j_idt50 > type:
> = > = > = > +id: j_idt51 > type: javax.faces.component.UINamingContainer(a)270fc4 > +id: j_id8 > type: javax.faces.component.UIPanel(a)178e13f > +id: j_idt43 > type: = > = >
> = > +id: j_idt44 > type: javax.faces.component.html.HtmlPanelGroup(a)187e184 > +id: j_idt45 > type: = >
> = > +id: j_idt46 > type: javax.faces.component.UIOutput(a)1e6cf07 > +id: j_idt47 > type: = >
= > = > +id: j_idt48 > type: = >
= > = > +id: j_idt49 > type: = >
= > = >
= > +id: j_idt52 > type: org.richfaces.component.UIRepeat(a)1a37fac > +id: j_idt53 > type: javax.faces.component.html.HtmlOutcomeTargetLink(a)1132e= 76 > +id: j_idt54 > type: javax.faces.component.UIParameter(a)4f71a3 > +id: j_idt55 > type: javax.faces.component.html.HtmlOutputText(a)1ad9b0f > +id: j_idt56 > type: javax.faces.component.UINamingContainer(a)2209db > +id: j_id8 > type: javax.faces.component.UIPanel(a)10c0fa7 > +id: j_idt43 > type: = > = >
> = > +id: j_idt44 > type: javax.faces.component.html.HtmlPanelGroup(a)19ae493 > +id: j_idt45 > type: = >
> = > +id: j_idt46 > type: javax.faces.component.UIOutput(a)14a616 > +id: j_idt47 > type: = >
= > = > +id: j_idt48 > type: = >
= > = > +id: j_idt49 > type: = >
= > = >
= > +id: j_idt57 > type: com.sun.faces.facelets.component.UIRepeat(a)b101cf > +id: j_idt58 > type: javax.faces.component.html.HtmlOutcomeTargetLink(a)edf4c8 > +id: j_idt59 > type: javax.faces.component.UIParameter(a)5b55a9 > +id: j_idt60 > type: javax.faces.component.html.HtmlOutputText(a)54f169 > +id: j_idt61 > type: = >
#{demoNavigator.currentSample.name} > = > +id: j_idt69 > type: = >

JSF 2 provides queue mechanism out-of the box already. And RichFaces q= ueue just provides > some additional customizations to improve the queue usability and allow t= o tune your > performance while using Ajax as much as possible.

>

The only big difference which the developers who used queue in 3.3.x s= hould remember: > as JSF 2 already provides single queue and not allows to have more than o= ne queue instance(currently) > you can't really fire concurrent requests anymore. So the queue in RF now= not actually defines = > logical queue but just a component for defining queueing options. >

>

Here you could explore additional optimization parameters of the queue= and learn how they = > influence Ajax requests. This example is a good start to learn about Ajax= requests = > flood protection.

>

Pay attention to next point in the example:

>
    >
  • Setting request delay to greater value reduces the greatly requests c= ount on fast typing. (More similar requests are combined in the result)
  • >
> Also pay your attention to the queue definition. Such definition (inside = some form without a name) means that the queue options becomes global for t= he form. = > = > +id: j_idt70 > type: javax.faces.component.UINamingContainer(a)1a3f178 > +id: j_id7 > type: javax.faces.component.UIPanel(a)d7a9c9 > +id: j_idt43 > type: = > = >
> = > +id: j_idt44 > type: javax.faces.component.html.HtmlPanelGroup(a)17892d5 > +id: j_idt45 > type: = >
> = > +id: j_idt46 > type: javax.faces.component.UIOutput(a)eff545 > +id: j_idt47 > type: = >
= > = > +id: j_idt48 > type: = >
= > = > +id: j_idt49 > type: = >
= > = >
= > +id: form > type: javax.faces.component.html.HtmlForm(a)7a3a30 > +id: j_idt71 > type: org.richfaces.component.UIQueue(a)825cf3 > +id: j_idt72 > type: javax.faces.component.html.HtmlPanelGrid(a)a47cc3 > +id: j_idt73 > type: javax.faces.component.html.HtmlPanelGrid(a)fae78f > +id: j_idt74 > type: javax.faces.component.html.HtmlOutputText(a)789d63 > +id: myinput > type: javax.faces.component.html.HtmlInputText(a)a4ed99 > +id: j_idt75 > type: javax.faces.component.html.HtmlOutputText(a)1eae15f > +id: outtext > type: javax.faces.component.html.HtmlOutputText(a)172290f > +id: j_idt76 > type: javax.faces.component.html.HtmlOutputText(a)1e5a5dc > +id: events > type: javax.faces.component.html.HtmlOutputText(a)1ec41c0 > +id: j_idt77 > type: javax.faces.component.html.HtmlOutputText(a)1d0e2c9 > +id: requests > type: javax.faces.component.html.HtmlOutputText(a)d8fd1a > +id: j_idt78 > type: javax.faces.component.html.HtmlOutputText(a)1d0e17a > +id: updates > type: javax.faces.component.html.HtmlOutputText(a)834af6 > +id: j_idt79 > type: javax.faces.component.UINamingContainer(a)1ae81ab > +id: null > type: javax.faces.component.UIPanel(a)cbffde > +id: j_idt81 > type: org.richfaces.component.UIOutputPanel(a)4c585f > +id: j_idt82 > type: javax.faces.component.html.HtmlMessage(a)3de2df > +id: j_idt83 > type: javax.faces.component.html.HtmlPanelGrid(a)f9d4f7 > +id: j_idt85 > type: javax.faces.component.html.HtmlCommandButton(a)12efc= fe > +id: j_idt84 > type: javax.faces.component.html.HtmlOutputText(a)ca6ae > +id: delay > type: javax.faces.component.html.HtmlInputText(a)930120 > +id: j_idt86 > type: = > >

Queue could be defined as

>
  • Default for view. In this case - the parameters will be u= sed for all = > the Ajax requests in view(if not redefined). In order to define such que= ue - just place = > a4j:queu outside of any forms without defining name
  • >
  • Default for form. Similar to view-scoped but should be defie= nd in some form without defining name
  • >
  • Referenced from ajax behaviors/components. Queue should be d= efined with name and referenced using attachQueue tag(see corresponding sam= ple).
> +id: j_idt66 > type:
> = > +id: j_idt67 > type:
>
>
> #{a4j} >
>
> +id: j_idt68 > type: = > > 15.07.2010 19:53:06 com.sun.faces.application.view.FaceletViewHandlingStr= ategy handleRenderException > SEVERE: Error Rendering View[/richfaces/component-sample.xhtml] > java.lang.IllegalStateException: Component ID j_idt26:j_id11 has already = been found in the view. > at com.sun.faces.util.Util.checkIdUniqueness(Util.java:820) > at com.sun.faces.util.Util.checkIdUniqueness(Util.java:804) > at com.sun.faces.util.Util.checkIdUniqueness(Util.java:804) > at com.sun.faces.application.view.StateManagementStrategyImpl.saveView(S= tateManagementStrategyImpl.java:134) > at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.= java:126) > at javax.faces.application.StateManager.getViewState(StateManager.java:5= 29) > at com.sun.faces.context.PartialViewContextImpl.renderState(PartialViewC= ontextImpl.java:390) > at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialVi= ewContextImpl.java:285) > at org.richfaces.context.PartialViewContextImpl.processPartial(PartialVi= ewContextImpl.java:189) > at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:989) > at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613) > at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView= (FaceletViewHandlingStrategy.java:378) > at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewH= andler.java:127) > at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePha= se.java:117) > at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) > at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135) > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl= icationFilterChain.java:290) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF= ilterChain.java:206) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV= alve.java:233) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV= alve.java:191) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j= ava:128) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j= ava:102) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal= ve.java:109) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav= a:293) > at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java= :849) > at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce= ss(Http11Protocol.java:583) > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:45= 4) > at java.lang.Thread.run(Thread.java:619) > java.lang.IllegalStateException: Component ID j_idt26:j_id11 has already = been found in the view. > at com.sun.faces.util.Util.checkIdUniqueness(Util.java:820) > at com.sun.faces.util.Util.checkIdUniqueness(Util.java:804) > at com.sun.faces.util.Util.checkIdUniqueness(Util.java:804) > at com.sun.faces.application.view.StateManagementStrategyImpl.saveView(S= tateManagementStrategyImpl.java:134) > at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.= java:126) > at javax.faces.application.StateManager.getViewState(StateManager.java:5= 29) > at com.sun.faces.context.PartialViewContextImpl.renderState(PartialViewC= ontextImpl.java:390) > at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialVi= ewContextImpl.java:285) > at org.richfaces.context.PartialViewContextImpl.processPartial(PartialVi= ewContextImpl.java:189) > at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:989) > at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613) > at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView= (FaceletViewHandlingStrategy.java:378) > at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewH= andler.java:127) > at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePha= se.java:117) > at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) > at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135) > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl= icationFilterChain.java:290) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF= ilterChain.java:206) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV= alve.java:233) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV= alve.java:191) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j= ava:128) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j= ava:102) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal= ve.java:109) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav= a:293) > at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java= :849) > at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce= ss(Http11Protocol.java:583) > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:45= 4) > at java.lang.Thread.run(Thread.java:619) > 15.07.2010 19:53:06 org.apache.catalina.core.StandardWrapperValve invoke > SEVERE: Servlet.service() for servlet Faces Servlet threw exception > java.lang.IllegalStateException: CDATA tags may not nest > at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startCDATA(Html= ResponseWriter.java:626) > at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWr= apper.java:172) > at javax.faces.context.PartialResponseWriter.startError(PartialResponseW= riter.java:334) > at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseE= rror(AjaxExceptionHandlerImpl.java:196) > at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHa= ndlerImpl.java:119) > at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:115) > at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135) > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl= icationFilterChain.java:290) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF= ilterChain.java:206) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV= alve.java:233) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV= alve.java:191) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j= ava:128) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j= ava:102) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal= ve.java:109) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav= a:293) > at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java= :849) > at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce= ss(Http11Protocol.java:583) > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:45= 4) > at java.lang.Thread.run(Thread.java:619) -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= ps://jira.jboss.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============2396332543763724309==--