[
https://issues.jboss.org/browse/RF-10885?page=com.atlassian.jira.plugin.s...
]
Adrian Meredith edited comment on RF-10885 at 4/14/11 6:46 AM:
---------------------------------------------------------------
Thanks for trying this so quickly, the page is too complex to show here (we have our own
datatable component and modalwindow component ) I would have expected that to show the
same symptoms. I'll try it to.
In my program i have two composite components a datatable and a modal window. when
progressbar is placed in the datatable the modalwindow no longer closes as onevent is
never called. Removing progress bar restores the functionality.
the save button looks like this
{code:xml}
<h:commandButton style="float: right;" id="save">
<f:ajax execute="#{cc.attrs.execute}"
render="#{cc.attrs.render}"/>
<f:ajax execute="@none" render="@none"
onevent="doValidateMessages"/>
<f:ajax execute="@none" render="#{cc.attrs.update}"
onevent="#{cc.attrs.onevent}"/>
</h:commandButton>
for the purposes of this bug lets say there are two js functions like below
<script type="text/javascript">
function doValidateMessages(data) {
alert('Onevent fired! '+data.status);
}
function doValidateMessages2() {
alert('Onevent fired!');
}
</script>
{code}
when the save button is pressed I get 3 alerts for each status like i would expect however
when I add progress bar, no alert appears at all. In other words the contents of one
composite component is breaking another! but it i rename the onevent to
doValidateMessages2() i get one alert (surely i should still get 3?).
Since my application already uses existing jquery I also have
{code:xml}
<script type="text/javascript">
jQuery.noConflict();
</script>
{code}
at the top of each page.
was (Author: adriaaaaan):
Thanks for trying this so quickly, the page is too complex to show here (we have our
own datatable component and modalwindow component ) I would have expected that to show the
same symptoms. I'll try it to.
In my program i have two composite components a datatable and a modal window. when
progressbar is placed in the datatable the modalwindow no longer closes as onevent is
never called. Removing progress bar restores the functionality.
the save button looks like this
{code:xml}
<h:commandButton style="float: right;" id="save">
<f:ajax execute="#{cc.attrs.execute}"
render="#{cc.attrs.render}"/>
<f:ajax execute="@none" render="@none"
oneerror="doValidateMessages"/>
<f:ajax execute="@none" render="#{cc.attrs.update}"
onevent="#{cc.attrs.onevent}"/>
</h:commandButton>
for the purposes of this bug lets say there are two js functions like below
<script type="text/javascript">
function doValidateMessages(data) {
alert('Onevent fired! '+data.status);
}
function doValidateMessages2() {
alert('Onevent fired!');
}
</script>
{code}
when the save button is pressed I get 3 alerts for each status like i would expect however
when I add progress bar, no alert appears at all. In other words the contents of one
composite component is breaking another! but it i rename the onevent to
doValidateMessages2() i get one alert (surely i should still get 3?).
Since my application already uses existing jquery I also have
{code:xml}
<script type="text/javascript">
jQuery.noConflict();
</script>
{code}
at the top of each page.
Using rich:progressBar on a page breaks f:ajax onevent
------------------------------------------------------
Key: RF-10885
URL:
https://issues.jboss.org/browse/RF-10885
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-output
Affects Versions: 4.0.0.Final
Environment: glassfish 3.1 mojarra 2.1
Reporter: Adrian Meredith
Labels: backwardcompatibility, jsf2, richfaces4
When using rich:progress bar on a page onevent no longer functions the same way. When
using mojarra onevent takes the name of a js function that takes one parameter (data).
After inserting a rich component on the page onevent now requires attributes breaking
compatability with standard jsf (and introducing untold amount of unpredictable bugs).
mojarra :
<f:ajax onevent="doValidateMessages"/>
richfaces:
<f:ajax onevent="doValidateMessages()"/>
This means i have to use diffent syntax depending on whether i'm using richfaces on a
particular page!! This is already a well established jsf2 application so rewriting it
using the aforementioned workaround isn't very practical.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira