[JBoss JIRA] (RF-12093) ResourceServlet can't handle resources outside of specific libraries
by Lukáš Fryč (JIRA)
Lukáš Fryč created RF-12093:
-------------------------------
Summary: ResourceServlet can't handle resources outside of specific libraries
Key: RF-12093
URL: https://issues.jboss.org/browse/RF-12093
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: core
Affects Versions: 4.2.0.Final
Reporter: Lukáš Fryč
Assignee: Lukáš Fryč
Fix For: 4.2.1.CR1
{{ResourceServlet}} is limited to what it can serve to only several specific libraries:
* [{{CKEditorLibrary}}|https://github.com/richfaces/core/blob/develop/impl/src/main/java/org/richfaces/webapp/ResourceServlet.java#L194]
* [{{StaticResourceLibrary}}|https://github.com/richfaces/core/blob/develop/impl/src/main/java/org/richfaces/webapp/ResourceServlet.java#L213]
* [{{RichFacesImageLibrary}}|https://github.com/richfaces/core/blob/develop/impl/src/main/java/org/richfaces/webapp/ResourceServlet.java#L213]
----
We should allow to serve any resource.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (RF-12083) Components: Output UI module doesn't pass unit tests (MenuItemRendererTest and DropDownMenuRendererTest)
by Jan Papousek (JIRA)
Jan Papousek created RF-12083:
---------------------------------
Summary: Components: Output UI module doesn't pass unit tests (MenuItemRendererTest and DropDownMenuRendererTest)
Key: RF-12083
URL: https://issues.jboss.org/browse/RF-12083
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-output
Affects Versions: 4.2.1.CR1
Reporter: Jan Papousek
Priority: Critical
{code}
-------------------------------------------------------------------------------
Test set: org.richfaces.renderkit.html.MenuItemRendererTest
-------------------------------------------------------------------------------
Tests run: 6, Failures: 3, Errors: 0, Skipped: 1, Time elapsed: 3.172 sec <<< FAILURE!
testDoEncodeServerMode(org.richfaces.renderkit.html.MenuItemRendererTest) Time elapsed: 0.566 sec <<< FAILURE!
java.lang.AssertionError: XML was not similar:org.custommonkey.xmlunit.Diff
[different] Expected element tag name 'div' but was 'span' - comparing <div...> at /div[1]/div[1] to <span...> at /div[1]/span[1]
<div class="rf-ddm-itm rf-ddm-itm-unsel " id="form:menuItem">
<span class="rf-ddm-itm-ic ">
<span class="rf-ddm-emptyIcon">
</span>
</span>
<span class="rf-ddm-itm-lbl ">
Test
</span>
<script type="text/javascript">
//<![CDATA[
new RichFaces.ui.MenuItem("form:menuItem",{"onClickHandler":function(event){RichFaces.submitForm(event.form, event.itemId);return false;}} );
//]]>
</script>
</div>
at org.junit.Assert.fail(Assert.java:91)
at org.junit.Assert.assertTrue(Assert.java:43)
at org.richfaces.renderkit.html.RendererTestBase.checkXmlStructure(RendererTestBase.java:93)
at org.richfaces.renderkit.html.RendererTestBase.doTest(RendererTestBase.java:81)
at org.richfaces.renderkit.html.RendererTestBase.doTest(RendererTestBase.java:73)
at org.richfaces.renderkit.html.MenuItemRendererTest.testDoEncodeServerMode(MenuItemRendererTest.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
testDoEncodeAjaxMode(org.richfaces.renderkit.html.MenuItemRendererTest) Time elapsed: 0.613 sec <<< FAILURE!
java.lang.AssertionError: XML was not similar:org.custommonkey.xmlunit.Diff
[different] Expected element tag name 'div' but was 'span' - comparing <div...> at /div[1]/div[1] to <span...> at /div[1]/span[1]
<div class="rf-ddm-itm rf-ddm-itm-unsel " id="form:menuItem">
<span class="rf-ddm-itm-ic ">
<span class="rf-ddm-emptyIcon">
</span>
</span>
<span class="rf-ddm-itm-lbl ">
Test
</span>
<script type="text/javascript">
//<![CDATA[
new RichFaces.ui.MenuItem("form:menuItem",{"mode":"ajax","onClickHandler":function(event){RichFaces.ajax("form:menuItem",event,{"incId":"1"} );return false;}} );
//]]>
</script>
</div>
at org.junit.Assert.fail(Assert.java:91)
at org.junit.Assert.assertTrue(Assert.java:43)
at org.richfaces.renderkit.html.RendererTestBase.checkXmlStructure(RendererTestBase.java:93)
at org.richfaces.renderkit.html.RendererTestBase.doTest(RendererTestBase.java:81)
at org.richfaces.renderkit.html.RendererTestBase.doTest(RendererTestBase.java:73)
at org.richfaces.renderkit.html.MenuItemRendererTest.testDoEncodeAjaxMode(MenuItemRendererTest.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
testDoEncodeClientMode(org.richfaces.renderkit.html.MenuItemRendererTest) Time elapsed: 0.724 sec <<< FAILURE!
java.lang.AssertionError: XML was not similar:org.custommonkey.xmlunit.Diff
[different] Expected element tag name 'div' but was 'span' - comparing <div...> at /div[1]/div[1] to <span...> at /div[1]/span[1]
<div class="rf-ddm-itm rf-ddm-itm-unsel " id="form:menuItem">
<span class="rf-ddm-itm-ic ">
<span class="rf-ddm-emptyIcon">
</span>
</span>
<span class="rf-ddm-itm-lbl ">
Test
</span>
<script type="text/javascript">
//<![CDATA[
new RichFaces.ui.MenuItem("form:menuItem",{"mode":"client","onClickHandler":function(event){;return false;}} );
//]]>
</script>
</div>
at org.junit.Assert.fail(Assert.java:91)
at org.junit.Assert.assertTrue(Assert.java:43)
at org.richfaces.renderkit.html.RendererTestBase.checkXmlStructure(RendererTestBase.java:93)
at org.richfaces.renderkit.html.RendererTestBase.doTest(RendererTestBase.java:81)
at org.richfaces.renderkit.html.RendererTestBase.doTest(RendererTestBase.java:73)
at org.richfaces.renderkit.html.MenuItemRendererTest.testDoEncodeClientMode(MenuItemRendererTest.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
{code}
{code}
-------------------------------------------------------------------------------
Test set: org.richfaces.renderkit.html.DropDownMenuRendererTest
-------------------------------------------------------------------------------
Tests run: 4, Failures: 2, Errors: 0, Skipped: 1, Time elapsed: 2.206 sec <<< FAILURE!
testDoEncodeServerMode(org.richfaces.renderkit.html.DropDownMenuRendererTest) Time elapsed: 0.729 sec <<< FAILURE!
java.lang.AssertionError: XML was not similar:org.custommonkey.xmlunit.Diff
[different] Expected element tag name 'div' but was 'span' - comparing <div...> at /div[1]/div[2]/div[1]/div[1]/div[1]/div[1] to <span...> at /div[1]/div[2]/div[1]/div[1]/div[1]/span[1]
<div class="rf-ddm-lbl rf-ddm-unsel " id="form:ddmenu">
<div class="rf-ddm-lbl-dec" id="form:ddmenu_label">
<img src="/images/ddmenu/copy.gif" class="pic"/>
File
</div>
<div class="rf-ddm-pos">
<div class="rf-ddm-lst" id="form:ddmenu_list" style="display:none;min-width:250px;" tabindex="-1">
<div class="rf-ddm-lst-bg">
<div class="rf-ddm-itm rf-ddm-itm-unsel " id="form:open">
<span class="rf-ddm-itm-ic ">
<span class="rf-ddm-emptyIcon">
</span>
</span>
<span class="rf-ddm-itm-lbl ">
Open
</span>
<script type="text/javascript">
//<![CDATA[
new RichFaces.ui.MenuItem("form:open",{"onClickHandler":function(event){RichFaces.submitForm(event.form, event.itemId);return false;}} );
//]]>
</script>
</div>
<div class="rf-ddm-itm rf-ddm-itm-unsel " id="form:group">
<span class="rf-ddm-itm-ic ">
<span class="rf-ddm-emptyIcon">
</span>
</span>
<span class="rf-ddm-itm-lbl ">
Save As...
</span>
<div class="rf-ddm-nd">
<div class="rf-ddm-lst rf-ddm-sublst" id="form:group_list" style="display:none;min-width:250px;" tabindex="-1">
<div class="rf-ddm-lst-bg">
<div class="rf-ddm-itm rf-ddm-itm-unsel " id="form:save">
<span class="rf-ddm-itm-ic ">
<img src="/images/ddmenu/save.gif"/>
</span>
<span class="rf-ddm-itm-lbl ">
Save
</span>
<script type="text/javascript">
//<![CDATA[
new RichFaces.ui.MenuItem("form:save",{"onClickHandler":function(event){RichFaces.submitForm(event.form, event.itemId);return false;}} );
//]]>
</script>
</div>
<div class="rf-ddm-sep">
</div>
<div class="rf-ddm-itm rf-ddm-itm-unsel " id="form:saveAll">
<span class="rf-ddm-itm-ic ">
<span class="rf-ddm-emptyIcon">
</span>
</span>
<span class="rf-ddm-itm-lbl ">
SaveAll
</span>
<script type="text/javascript">
//<![CDATA[
new RichFaces.ui.MenuItem("form:saveAll",{"onClickHandler":function(event){RichFaces.submitForm(event.form, event.itemId);return false;}} );
//]]>
</script>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
new
RichFaces.ui.Menu("form:ddmenu").initiateGroups([{"id":"form:group"} ] );
//]]>
</script>
</div>
at org.junit.Assert.fail(Assert.java:91)
at org.junit.Assert.assertTrue(Assert.java:43)
at org.richfaces.renderkit.html.RendererTestBase.checkXmlStructure(RendererTestBase.java:93)
at org.richfaces.renderkit.html.RendererTestBase.doTest(RendererTestBase.java:81)
at org.richfaces.renderkit.html.RendererTestBase.doTest(RendererTestBase.java:73)
at org.richfaces.renderkit.html.DropDownMenuRendererTest.testDoEncodeServerMode(DropDownMenuRendererTest.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
testDoEncodeAjaxMode(org.richfaces.renderkit.html.DropDownMenuRendererTest) Time elapsed: 0.677 sec <<< FAILURE!
java.lang.AssertionError: XML was not similar:org.custommonkey.xmlunit.Diff
[different] Expected element tag name 'div' but was 'span' - comparing <div...> at /div[1]/div[2]/div[1]/div[1]/div[1]/div[1] to <span...> at /div[1]/div[2]/div[1]/div[1]/div[1]/span[1]
<div class="rf-ddm-lbl rf-ddm-unsel " id="form:ddmenu">
<div class="rf-ddm-lbl-dec" id="form:ddmenu_label">
<img src="/images/ddmenu/copy.gif" class="pic"/>
File
</div>
<div class="rf-ddm-pos">
<div class="rf-ddm-lst" id="form:ddmenu_list" style="display:none;min-width:250px;" tabindex="-1">
<div class="rf-ddm-lst-bg">
<div class="rf-ddm-itm rf-ddm-itm-unsel " id="form:open">
<span class="rf-ddm-itm-ic ">
<span class="rf-ddm-emptyIcon">
</span>
</span>
<span class="rf-ddm-itm-lbl ">
Open
</span>
<script type="text/javascript">
//<![CDATA[
new RichFaces.ui.MenuItem("form:open",{"mode":"ajax","onClickHandler":function(event){RichFaces.ajax("form:open",event,{"incId":"1"} );return false;}} );
//]]>
</script>
</div>
<div class="rf-ddm-itm rf-ddm-itm-unsel " id="form:group">
<span class="rf-ddm-itm-ic ">
<span class="rf-ddm-emptyIcon">
</span>
</span>
<span class="rf-ddm-itm-lbl ">
Save As...
</span>
<div class="rf-ddm-nd">
<div class="rf-ddm-lst rf-ddm-sublst" id="form:group_list" style="display:none;min-width:250px;" tabindex="-1">
<div class="rf-ddm-lst-bg">
<div class="rf-ddm-itm rf-ddm-itm-unsel " id="form:save">
<span class="rf-ddm-itm-ic ">
<img src="/images/ddmenu/save.gif"/>
</span>
<span class="rf-ddm-itm-lbl ">
Save
</span>
<script type="text/javascript">
//<![CDATA[
new RichFaces.ui.MenuItem("form:save",{"mode":"ajax","onClickHandler":function(event){RichFaces.ajax("form:save",event,{"incId":"1"} );return false;}} );
//]]>
</script>
</div>
<div class="rf-ddm-sep">
</div>
<div class="rf-ddm-itm rf-ddm-itm-unsel " id="form:saveAll">
<span class="rf-ddm-itm-ic ">
<span class="rf-ddm-emptyIcon">
</span>
</span>
<span class="rf-ddm-itm-lbl ">
SaveAll
</span>
<script type="text/javascript">
//<![CDATA[
new RichFaces.ui.MenuItem("form:saveAll",{"mode":"ajax","onClickHandler":function(event){RichFaces.ajax("form:saveAll",event,{"incId":"1"} );return false;}} );
//]]>
</script>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
new
RichFaces.ui.Menu("form:ddmenu",{"mode":"ajax"} ).initiateGroups([{"id":"form:group"} ] );
//]]>
</script>
</div>
at org.junit.Assert.fail(Assert.java:91)
at org.junit.Assert.assertTrue(Assert.java:43)
at org.richfaces.renderkit.html.RendererTestBase.checkXmlStructure(RendererTestBase.java:93)
at org.richfaces.renderkit.html.RendererTestBase.doTest(RendererTestBase.java:81)
at org.richfaces.renderkit.html.RendererTestBase.doTest(RendererTestBase.java:73)
at org.richfaces.renderkit.html.DropDownMenuRendererTest.testDoEncodeAjaxMode(DropDownMenuRendererTest.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (RF-6026) PickList doesn't accept comma in string value of SelectItem
by Andrzej Haczewski (JIRA)
PickList doesn't accept comma in string value of SelectItem
-----------------------------------------------------------
Key: RF-6026
URL: https://jira.jboss.org/jira/browse/RF-6026
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.3.0
Environment: WebLogic 10, JSF 1.2, RichFaces 3.3.0, Hibernate JPA, Facelets 1.1.14
Reporter: Andrzej Haczewski
When you use a List<SelectItem> where SelectItems are created like this:
new SelectItem("SOME STRING,CONTAINING COMMA", "A nice string to show in list")
as a PickList <h:selectItems>, and use List<String> as PickList value, then PickList doesn't validate when you add that item to target list.
The reason is that UISelectMany is trying to validate values "SOME STRINGS" and "CONTAINING COMMA" with available items.
The exact point is the UISelectMany.matchValue() method, which returns false on validation of that PickList.
Sample code:
--- BackingBean.java
class BackingBean {
private List<SelectItem> picklistItems;
private List<String> result;
public BackingBean() {
picklistItems = new ArrayList<SelectItem>();
picklistItems.add(new SelectItem("SAMPLE,EXAMPLE", "Sample example"));
}
// then comes getters and setters for picklistItems and result
}
--- PickList.xhtml
<rich:pickList value="#{backingBean.result}">
<h:selectItems value="#{backingBean.picklistItems}">
</rich:pickList>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (RF-12072) Lost event in push
by Stian Thorgersen (JIRA)
Stian Thorgersen created RF-12072:
-------------------------------------
Summary: Lost event in push
Key: RF-12072
URL: https://issues.jboss.org/browse/RF-12072
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Stian Thorgersen
Event can be lost if produced while a response is being prepared. I've attached an example where a push event is used to refresh a count whenever an event is fired. It's using Thread.sleep to simulate an event being produced while the response is being prepared. Note, if the sleep just before returning the count is removed it all works fine, and the page is refreshed every 5 seconds, but without it the event is lost.
View:
{code}
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</h:head>
<h:body>
<h:form id="myForm">
<a4j:push address="chat">
<a4j:ajax event="dataavailable" render="count" />
</a4j:push>
<h:outputText value="#{myBean.count}" id="count" />
</h:form>
</h:body>
</html>
{code}
Bean:
{code}
package com.example;
import java.io.Serializable;
import java.util.concurrent.atomic.AtomicInteger;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
import org.richfaces.application.push.TopicKey;
import org.richfaces.application.push.TopicsContext;
@Named
@SessionScoped
public class MyBean implements Serializable
{
private AtomicInteger count = new AtomicInteger();
public int getCount()
{
int c = count.get();
new Thread()
{
public void run()
{
try
{
Thread.sleep(5000);
count.incrementAndGet();
TopicKey topicKey = new TopicKey("chat");
TopicsContext topicsContext = TopicsContext.lookup();
topicsContext.publish(topicKey, "");
}
catch (Exception e)
{
e.printStackTrace();
}
};
}.start();
try
{
Thread.sleep(10000);
}
catch (InterruptedException e)
{
}
return c;
}
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (RF-12095) Incorrect behavior of two pushes on the page
by Lukáš Fryč (JIRA)
Lukáš Fryč created RF-12095:
-------------------------------
Summary: Incorrect behavior of two pushes on the page
Key: RF-12095
URL: https://issues.jboss.org/browse/RF-12095
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-push/poll
Affects Versions: 4.2.0.Final
Reporter: Lukáš Fryč
When you have 2 pushes on the page and one is conditionally rendered, rerendering it causes unsubscribing of second push:
{code:xml}
<!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:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j">
<f:view>
<h:head>
</h:head>
<h:body>
<h:form>
<br /><br /><br /><br />
<!-- PUSH 1 -->
<a4j:commandButton value="Push 1!" action="#{richBean.push}" />
<a4j:outputPanel id="pushPanel">
<a4j:push id="push" rendered="#{not pushDisabled}" address="sampleAddress" ondataavailable="$('*[id$=outputDate]').text(event.rf.data)" onsubscribed="alert('subscribed')" />
</a4j:outputPanel>
<a4j:outputPanel id="pushDisablementPanel">
<h:selectBooleanCheckbox value="#{pushDisabled}">
<a4j:ajax render="pushPanel pushDisablementPanel" />
</h:selectBooleanCheckbox>
<h:outputText value="#{pushDisabled ? 'disabled' : 'enabled'}" />
</a4j:outputPanel>
<br />
<a4j:outputPanel id="outputDate">
#{richBean.date}
</a4j:outputPanel>
<br />
<!-- PUSH 2 -->
<a4j:commandButton value="Push 2!" action="#{richBean.push2}" />
<a4j:push id="push2" address="sampleAddress2" ondataavailable="$('*[id$=outputDate2]').text(event.rf.data)" onsubscribed="alert('subscribed2')" />
<br />
<a4j:outputPanel id="outputDate2">
#{richBean.date}
</a4j:outputPanel>
</h:form>
</h:body>
</f:view>
</html>
{code}
{code:java}
@ManagedBean
public class RichBean {
public Date getDate() {
return new Date();
}
public void push() throws MessageException {
TopicKey topicKey = new TopicKey("sampleAddress");
TopicsContext topicsContext = TopicsContext.lookup();
topicsContext.publish(topicKey, new Date().toString());
System.out.println("push event");
}
public void push2() throws MessageException {
TopicKey topicKey = new TopicKey("sampleAddress2");
TopicsContext topicsContext = TopicsContext.lookup();
topicsContext.publish(topicKey, new Date().toString());
System.out.println("push event 2");
}
}
{code}
Steps to reproduce:
1. open the page
2. you can see "subscribed" and "subscribed2" alert messages
3. both, Push! and Push 2! buttons reloads respective dates
4. click on checkbox and on the right of Push! button
EXPECTED: only Push! should stop to work
ACTUAL: both Push! and Push 2! stops to work
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (RF-11990) client-side validation and ajax calls create maleformed javascript
by Daniel G (JIRA)
Daniel G created RF-11990:
-----------------------------
Summary: client-side validation and ajax calls create maleformed javascript
Key: RF-11990
URL: https://issues.jboss.org/browse/RF-11990
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-validators
Affects Versions: 4.1.0.Final, 4.0.0.Final
Environment: MyFaces 2.1.5, Hibernate-Validation 4.2.0.Final
Reporter: Daniel G
Using rich:validation and f:ajax together, maleformed JavaScript is generated.
I'm having a composite component, that has to be able to refresh given other components on change, but the JavaScript code generated by:
{quote}
<h:inputText id="input" value="#\{cc.attrs.value\}"
<f:ajax event="change" render="#\{cc.attrs.render\}" />
<rich:validator />
</h:inputText>
{quote}
the generated content is missing a comma between the Chain parameters.
see the red {color:red}'{color}
{quote}
<input id="idForm:bNr:input" name="idForm:bNr:input" type="text" value="123"
onchange="jsf.util.chain(document.getElementById('idForm:bNr:input'),
event,'jsf.ajax.request(\'idForm:bNr:input\',event,\{render:\'idForm:idToolBar:idSaveButton\',\'javax.faces.behavior.event\':\'change\'\}){color:red}''{color}idForm_3AbNr_3Ainput_3Av(event,"idForm:kopf:bezugNr:input","idForm:kopf:bezugNr:input")'); return false;" />
{quote}
the code is tanken from 4.0.0.Final, but looks similar in 4.1.0.Final
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] (RF-12079) <rich:treeNode> ignores <a4j:ajax>
by Wesley Menezes (JIRA)
Wesley Menezes created RF-12079:
-----------------------------------
Summary: <rich:treeNode> ignores <a4j:ajax>
Key: RF-12079
URL: https://issues.jboss.org/browse/RF-12079
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-tree
Affects Versions: 4.2.0.Final
Environment: RichFaces 4.2.0 and JSF 2.2 with CDI (Bean type "javax.inject.Named")
Application Server GlassFish Server Open Source Edition 3.1.2 (build 23)
Reporter: Wesley Menezes
In JSF with a <rich:tree> and this have <rich:treeNode> nested, if <a4j:ajax> is applied in <rich:treeNode>, the ajax listener isn't called.
Obs. In RichFaces 4.2.0 Final showcase, the <rich:tree> has the attribute "selectionChangeListener", but I found only "treeSelectionChangeListener" in jars of RichFaces (like attribute of the <rich:tree> tag, or like a tag <rich:treeSelectionChangeListener>) - "Component_Reference.pdf" is ok.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months