[JBoss JIRA] (RF-13142) Showcase: mediaOutput sample is not working with MyFaces
by Jiří Štefek (JIRA)
[ https://issues.jboss.org/browse/RF-13142?page=com.atlassian.jira.plugin.s... ]
Jiří Štefek edited comment on RF-13142 at 8/23/13 1:55 AM:
-----------------------------------------------------------
Worked in 4.2.2.
Yes, both myfaces api and impl are there.
The war: https://repository.jboss.org/nexus/content/groups/staging/org/richfaces/e...
was (Author: jstefek):
Yes, both myfaces api and impl are there.
The war: https://repository.jboss.org/nexus/content/groups/staging/org/richfaces/e...
> Showcase: mediaOutput sample is not working with MyFaces
> --------------------------------------------------------
>
> Key: RF-13142
> URL: https://issues.jboss.org/browse/RF-13142
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-a4j-core
> Affects Versions: 4.3.3, 4.3.4
> Environment: MyFaces 2.1.10
> Apache Tomcat 7.0.34
> Reporter: Jiří Štefek
> Assignee: Brian Leathem
>
> The generated image from media output is not displayed.
> Stack trace from logs:
> {code}
> java.lang.ClassNotFoundException: javax.faces.component.StateHolderSaver
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:188)
> at org.richfaces.util.LookAheadObjectInputStream.loadWhitelist(LookAheadObjectInputStream.java:141)
> at org.richfaces.util.LookAheadObjectInputStream.<clinit>(LookAheadObjectInputStream.java:76)
> at org.richfaces.util.Util.decodeObjectData(Util.java:236)
> at org.richfaces.resource.DefaultCodecResourceRequestData.getData(DefaultCodecResourceRequestData.java:97)
> at org.richfaces.resource.ResourceFactoryImpl.createResource(ResourceFactoryImpl.java:337)
> at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:156)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.richfaces.webapp.PushFilter.doFilter(PushFilter.java:129)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:172)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:722)
> {code}
> {code}
> java.lang.NoClassDefFoundError: Could not initialize class org.richfaces.util.LookAheadObjectInputStream
> at org.richfaces.util.Util.decodeObjectData(Util.java:236)
> at org.richfaces.resource.DefaultCodecResourceRequestData.getData(DefaultCodecResourceRequestData.java:97)
> at org.richfaces.resource.ResourceFactoryImpl.createResource(ResourceFactoryImpl.java:337)
> at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:156)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.richfaces.webapp.PushFilter.doFilter(PushFilter.java:129)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:172)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:722)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months
[JBoss JIRA] (RF-13142) Showcase: mediaOutput sample is not working with MyFaces
by Jiří Štefek (JIRA)
[ https://issues.jboss.org/browse/RF-13142?page=com.atlassian.jira.plugin.s... ]
Jiří Štefek reassigned RF-13142:
--------------------------------
Assignee: Brian Leathem (was: Jiří Štefek)
Yes, both myfaces api and impl are there.
The war: https://repository.jboss.org/nexus/content/groups/staging/org/richfaces/e...
> Showcase: mediaOutput sample is not working with MyFaces
> --------------------------------------------------------
>
> Key: RF-13142
> URL: https://issues.jboss.org/browse/RF-13142
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-a4j-core
> Affects Versions: 4.3.3, 4.3.4
> Environment: MyFaces 2.1.10
> Apache Tomcat 7.0.34
> Reporter: Jiří Štefek
> Assignee: Brian Leathem
>
> The generated image from media output is not displayed.
> Stack trace from logs:
> {code}
> java.lang.ClassNotFoundException: javax.faces.component.StateHolderSaver
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:188)
> at org.richfaces.util.LookAheadObjectInputStream.loadWhitelist(LookAheadObjectInputStream.java:141)
> at org.richfaces.util.LookAheadObjectInputStream.<clinit>(LookAheadObjectInputStream.java:76)
> at org.richfaces.util.Util.decodeObjectData(Util.java:236)
> at org.richfaces.resource.DefaultCodecResourceRequestData.getData(DefaultCodecResourceRequestData.java:97)
> at org.richfaces.resource.ResourceFactoryImpl.createResource(ResourceFactoryImpl.java:337)
> at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:156)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.richfaces.webapp.PushFilter.doFilter(PushFilter.java:129)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:172)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:722)
> {code}
> {code}
> java.lang.NoClassDefFoundError: Could not initialize class org.richfaces.util.LookAheadObjectInputStream
> at org.richfaces.util.Util.decodeObjectData(Util.java:236)
> at org.richfaces.resource.DefaultCodecResourceRequestData.getData(DefaultCodecResourceRequestData.java:97)
> at org.richfaces.resource.ResourceFactoryImpl.createResource(ResourceFactoryImpl.java:337)
> at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:156)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.richfaces.webapp.PushFilter.doFilter(PushFilter.java:129)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:172)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:722)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months
[JBoss JIRA] (RF-13145) Provide listener feedback for each file in the rich:fileUpload list
by SBS JIRA Integration (JIRA)
[ https://issues.jboss.org/browse/RF-13145?page=com.atlassian.jira.plugin.s... ]
SBS JIRA Integration updated RF-13145:
--------------------------------------
Forum Reference: https://community.jboss.org/message/833400#833400
> Provide listener feedback for each file in the rich:fileUpload list
> -------------------------------------------------------------------
>
> Key: RF-13145
> URL: https://issues.jboss.org/browse/RF-13145
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-input
> Affects Versions: 4.3.2
> Reporter: Viliam Rockai
>
> I'm pasting here my thread from forums:
> {quote}
> I'm using RF 4.3.x and I'm struggling with something which may be pretty common use-case - feedback from the rich:fileUpload component for each file separately. We're processing each file in fileUploadListener, but some files may be corrupted, or just invalid in general. I'm looking for a way how to provide a feedback for the user, not only about the uploading itself, but even if the processing of file in listener has succeeded. Actually, my goal is to change the color in the rich:fileUpload file list to green if everything is OK or change the color to red and provide relevant error message if an exception was thrown in the listener.
> {quote}
> https://community.jboss.org/thread/231747
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months
[JBoss JIRA] (RF-13145) Provide listener feedback for each file in the rich:fileUpload list
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13145?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-13145:
------------------------------------
Replied via forum.
> Provide listener feedback for each file in the rich:fileUpload list
> -------------------------------------------------------------------
>
> Key: RF-13145
> URL: https://issues.jboss.org/browse/RF-13145
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-input
> Affects Versions: 4.3.2
> Reporter: Viliam Rockai
>
> I'm pasting here my thread from forums:
> {quote}
> I'm using RF 4.3.x and I'm struggling with something which may be pretty common use-case - feedback from the rich:fileUpload component for each file separately. We're processing each file in fileUploadListener, but some files may be corrupted, or just invalid in general. I'm looking for a way how to provide a feedback for the user, not only about the uploading itself, but even if the processing of file in listener has succeeded. Actually, my goal is to change the color in the rich:fileUpload file list to green if everything is OK or change the color to red and provide relevant error message if an exception was thrown in the listener.
> {quote}
> https://community.jboss.org/thread/231747
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months
[JBoss JIRA] (RF-13145) Provide listener feedback for each file in the rich:fileUpload list
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13145?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13145:
-------------------------------
Labels: waiting_on_user (was: )
> Provide listener feedback for each file in the rich:fileUpload list
> -------------------------------------------------------------------
>
> Key: RF-13145
> URL: https://issues.jboss.org/browse/RF-13145
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: component-input
> Affects Versions: 4.3.2
> Reporter: Viliam Rockai
> Labels: waiting_on_user
>
> I'm pasting here my thread from forums:
> {quote}
> I'm using RF 4.3.x and I'm struggling with something which may be pretty common use-case - feedback from the rich:fileUpload component for each file separately. We're processing each file in fileUploadListener, but some files may be corrupted, or just invalid in general. I'm looking for a way how to provide a feedback for the user, not only about the uploading itself, but even if the processing of file in listener has succeeded. Actually, my goal is to change the color in the rich:fileUpload file list to green if everything is OK or change the color to red and provide relevant error message if an exception was thrown in the listener.
> {quote}
> https://community.jboss.org/thread/231747
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months
[JBoss JIRA] (RF-13127) onvalid and oninvalide pass wrong element when using rich:element with String field
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13127?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-13127:
------------------------------------
Thanks [~parisila]. Your provided sample helps understand what you are trying to achieve with the client-side javascript referenced in your description.
However, the backend has a lot of domain specific code that obfuscates the underlying issue. It would greatly help in expediting the resolution of this issue if you could cimply the attached sample. Some places to start:
# Try removing Spring. Is this reproducible with a Vanilla JSF/RF appplication?
# Try removing JPA. Can we use simple POJO's to isolate the defference in behaviour between the String and BigDecimal properties?
> onvalid and oninvalide pass wrong element when using rich:element with String field
> -----------------------------------------------------------------------------------
>
> Key: RF-13127
> URL: https://issues.jboss.org/browse/RF-13127
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-validators
> Affects Versions: 4.3.3
> Reporter: Louis Parisi
> Attachments: JSFTemplate.zip
>
>
> I have a bean iterated in a datatable. Using the rich:validator on fields in the bean I am executing javascript when a field is validated and apply styling based on valid or invalid state. The code below returns the correct element when the underlying field is a BigDecimal but intermittently returns the element from row zero and sometimes another rown when the field is a String. If I just reference a String vs. BigDecimal and display the element passed to the javascript I get form:myTable:4:myField for a BigDecimal field and always form:myTable:0:myField no matter the row for a String field.
> {code}
> <h:inputText id="vendor" value="#{car.vendor}" valueChangeListener="#{car.valueChanged}">
> <rich:validator oninvalid="valueModified(#{rich:element('vendor')}, false)"
> onvalid="valueModified(#{rich:element('vendor')}, true)"/>
> </h:inputText>
> {code}
> {code}
> <script>
> function valueModified(element, valid) {
> // use element.style rather than jQuery as it
> // does not set entire background
> alert("valueModified: " + element.id + " | valid: " + valid);
> element.style.background='yellow';
> if (valid) {
> jQuery(element).css("border-color", "lightgray");
> } else {
> jQuery(element).css("border-color", "red");
> }
> }
> </script>
> {code}
> Some other tests I did while trying to debug are:
> * I passed the rowKeyVar to a javascript method in the onvalid event and it passed the correct row for a BigDecimal and always zero for a String field.
> * The oncomplete event of the validator does not seem to fire for a String field but does for a BigDecimal field.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months
[JBoss JIRA] (RF-13127) onvalid and oninvalide pass wrong element when using rich:element with String field
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13127?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13127:
-------------------------------
Labels: waiting_on_user (was: )
> onvalid and oninvalide pass wrong element when using rich:element with String field
> -----------------------------------------------------------------------------------
>
> Key: RF-13127
> URL: https://issues.jboss.org/browse/RF-13127
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-validators
> Affects Versions: 4.3.3
> Reporter: Louis Parisi
> Labels: waiting_on_user
> Attachments: JSFTemplate.zip
>
>
> I have a bean iterated in a datatable. Using the rich:validator on fields in the bean I am executing javascript when a field is validated and apply styling based on valid or invalid state. The code below returns the correct element when the underlying field is a BigDecimal but intermittently returns the element from row zero and sometimes another rown when the field is a String. If I just reference a String vs. BigDecimal and display the element passed to the javascript I get form:myTable:4:myField for a BigDecimal field and always form:myTable:0:myField no matter the row for a String field.
> {code}
> <h:inputText id="vendor" value="#{car.vendor}" valueChangeListener="#{car.valueChanged}">
> <rich:validator oninvalid="valueModified(#{rich:element('vendor')}, false)"
> onvalid="valueModified(#{rich:element('vendor')}, true)"/>
> </h:inputText>
> {code}
> {code}
> <script>
> function valueModified(element, valid) {
> // use element.style rather than jQuery as it
> // does not set entire background
> alert("valueModified: " + element.id + " | valid: " + valid);
> element.style.background='yellow';
> if (valid) {
> jQuery(element).css("border-color", "lightgray");
> } else {
> jQuery(element).css("border-color", "red");
> }
> }
> </script>
> {code}
> Some other tests I did while trying to debug are:
> * I passed the rowKeyVar to a javascript method in the onvalid event and it passed the correct row for a BigDecimal and always zero for a String field.
> * The oncomplete event of the validator does not seem to fire for a String field but does for a BigDecimal field.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months
[JBoss JIRA] (RF-13127) onvalid and oninvalide pass wrong element when using rich:element with String field
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13127?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13127:
-------------------------------
Description:
I have a bean iterated in a datatable. Using the rich:validator on fields in the bean I am executing javascript when a field is validated and apply styling based on valid or invalid state. The code below returns the correct element when the underlying field is a BigDecimal but intermittently returns the element from row zero and sometimes another rown when the field is a String. If I just reference a String vs. BigDecimal and display the element passed to the javascript I get form:myTable:4:myField for a BigDecimal field and always form:myTable:0:myField no matter the row for a String field.
{code}
<h:inputText id="vendor" value="#{car.vendor}" valueChangeListener="#{car.valueChanged}">
<rich:validator oninvalid="valueModified(#{rich:element('vendor')}, false)"
onvalid="valueModified(#{rich:element('vendor')}, true)"/>{code}
</h:inputText>
{code}
{code}
<script>
function valueModified(element, valid) {
// use element.style rather than jQuery as it
// does not set entire background
alert("valueModified: " + element.id + " | valid: " + valid);
element.style.background='yellow';
if (valid) {
jQuery(element).css("border-color", "lightgray");
} else {
jQuery(element).css("border-color", "red");
}
}
</script>
{code}
Some other tests I did while trying to debug are:
* I passed the rowKeyVar to a javascript method in the onvalid event and it passed the correct row for a BigDecimal and always zero for a String field.
* The oncomplete event of the validator does not seem to fire for a String field but does for a BigDecimal field.
was:
I have a bean iterated in a datatable. Using the rich:validator on fields in the bean I am executing javascript when a field is validated and apply styling based on valid or invalid state. The code below returns the correct element when the underlying field is a BigDecimal but intermittently returns the element from row zero and sometimes another rown when the field is a String. If I just reference a String vs. BigDecimal and display the element passed to the javascript I get form:myTable:4:myField for a BigDecimal field and always form:myTable:0:myField no matter the row for a String field.
{code}
<h:inputText value="#{myBean.myField}" id="myField">
<rich:validator oninvalid="valueModifiedAndError(#{rich:element('myField')})"
onvalid="valueModified(#{rich:element('myField')})"/>
</h:inputText>
{code}
{code}
<script>
function valueModified(element, valid) {
// use element.style rather than jQuery as it
// does not set entire background
alert("valueModified: " + element.id + " | valid: " + valid);
element.style.background='yellow';
if (valid) {
jQuery(element).css("border-color", "lightgray");
} else {
jQuery(element).css("border-color", "red");
}
}
</script>
{code}
Some other tests I did while trying to debug are:
* I passed the rowKeyVar to a javascript method in the onvalid event and it passed the correct row for a BigDecimal and always zero for a String field.
* The oncomplete event of the validator does not seem to fire for a String field but does for a BigDecimal field.
> onvalid and oninvalide pass wrong element when using rich:element with String field
> -----------------------------------------------------------------------------------
>
> Key: RF-13127
> URL: https://issues.jboss.org/browse/RF-13127
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-validators
> Affects Versions: 4.3.3
> Reporter: Louis Parisi
> Attachments: JSFTemplate.zip
>
>
> I have a bean iterated in a datatable. Using the rich:validator on fields in the bean I am executing javascript when a field is validated and apply styling based on valid or invalid state. The code below returns the correct element when the underlying field is a BigDecimal but intermittently returns the element from row zero and sometimes another rown when the field is a String. If I just reference a String vs. BigDecimal and display the element passed to the javascript I get form:myTable:4:myField for a BigDecimal field and always form:myTable:0:myField no matter the row for a String field.
> {code}
> <h:inputText id="vendor" value="#{car.vendor}" valueChangeListener="#{car.valueChanged}">
> <rich:validator oninvalid="valueModified(#{rich:element('vendor')}, false)"
> onvalid="valueModified(#{rich:element('vendor')}, true)"/>{code}
> </h:inputText>
> {code}
> {code}
> <script>
> function valueModified(element, valid) {
> // use element.style rather than jQuery as it
> // does not set entire background
> alert("valueModified: " + element.id + " | valid: " + valid);
> element.style.background='yellow';
> if (valid) {
> jQuery(element).css("border-color", "lightgray");
> } else {
> jQuery(element).css("border-color", "red");
> }
> }
> </script>
> {code}
> Some other tests I did while trying to debug are:
> * I passed the rowKeyVar to a javascript method in the onvalid event and it passed the correct row for a BigDecimal and always zero for a String field.
> * The oncomplete event of the validator does not seem to fire for a String field but does for a BigDecimal field.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months