[JBoss JIRA] (RF-12571) aj4:status - onerror - more documentation - more attributes ?
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12571?page=com.atlassian.jira.plugin.s... ]
Brian Leathem resolved RF-12571.
--------------------------------
Resolution: Rejected
JSF Error handling should be implemented on the server side. The {f/a4j}:ajax _onerror_ attribute is meant to handle errors with the http communication, not JSF errors.
> aj4:status - onerror - more documentation - more attributes ?
> -------------------------------------------------------------
>
> Key: RF-12571
> URL: https://issues.jboss.org/browse/RF-12571
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: Jean ANDRE
>
> The documentation on aj4:status does not explain very well what we should expected as data to be passed or retrieved when error occurred. Could you please, post here and also at the documentation, some clues, details, information, valuable examples, live demos... to help us managing error on ajax request. Thank you very much.
> {code}
> <a4j:status id="ajax-status"
> name="ajaxStatus"
> onstart="#{rich:component('messageWaiter')}.show()"
> onstop="#{rich:component('messageWaiter')}.hide()"
> onerror="alert(event.type);alert(status);" />
> {code}
> Based on above code, it seems we can catch at least one object - the event but the event does not seem to have any valuable information.
> It is possible to sent us some valuable information when we received the onerror event from ajax call and tell us what we can use as information to be displayed to user.
> Some old versions?, seems to have 3 attributes like req, status, message on event error but with RichFaces 4.2.3 final, what we can have, have as alternative or do ?
> from https://community.jboss.org/message/54813
> {code}
> A4J.AJAX.onError = function(req, status, message){
> if(status == 505 || status == 500 || status == 400){
> window.alert("Error: "+message + "\n Please contact administrator" );
> }
> }
> {code}
> For example, in this situation, I emulated an error into the controller, which is a NPE
> {code}
> public String doOpenItem(String tabId, Integer itemId) throws InterruptedException {
> Thread.currentThread().join(2000);
> Integer i = null;
> i.doubleValue();
> return "thepage";
> }
> {code}
> The error is trigger from a simple commandLink
> {code}
> <a4j:commandLink id="openCmd"
> action="#{listItemController.doOpenItem(tab.id, item.id)}"
> render="desktopTabs"
> value="#{msg['common.command.open']}"
> status="ajaxStatus" />
> {code}
> {code}
> <!-- -->
> <!-- WAITER MESSAGE -->
> <!-- -->
> <rich:popupPanel id="messageWaiter"
> modal="false"
> style="border:1px solid red;"
> autosized="true"
> resizeable="false"
> shadowDepth="3"
> shadowOpacity="1"
> top="250">
> Please wait...
> </rich:popupPanel>
> {code}
> When we got when the response returns back to the request sent, when the error is triggered (from the NPE at the controller side).
> Under firebug:
> {code}
> <?xml version='1.0' encoding='UTF-8'?>
> <partial-response><error><error-name>class javax.faces.el.EvaluationException</error-name><error-message><![CDATA[]]></error-message></error></partial-response>
> {code}
> But the log file of the application is more explicit:
> {code}
> java.lang.NullPointerException
> at com.nested.web.controller.ListItemController.doOpenItem(ListItemController.java:40)
> at com.nested.web.controller.ListItemController$Proxy$_$$_WeldClientProxy.doOpenItem(ListItemController$Proxy$_$$_WeldClientProxy.java)
> 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 javax.el.BeanELResolver.invokeMethod(BeanELResolver.java:779)
> at javax.el.BeanELResolver.invoke(BeanELResolver.java:528)
> at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:257)
> at com.sun.el.parser.AstValue.invoke(AstValue.java:248)
> at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:302)
> at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)
> at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
> at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
> at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
> at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
> at javax.faces.component.UICommand.broadcast(UICommand.java:315)
> at org.richfaces.component.RowKeyContextEventWrapper.broadcast(RowKeyContextEventWrapper.java:104)
> at org.richfaces.component.UIDataAdaptor.broadcast(UIDataAdaptor.java:448)
> at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
> at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
> at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
> at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
> at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
> at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
> at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
> at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
> at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
> at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
> at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
> at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
> at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
> at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
> at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
> at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
> at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
> at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
> at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
> at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
> at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
> at java.lang.Thread.run(Thread.java:662)
> {code}
> Is it possible to retrieve all necessary material to be reported to the user or technical team ?
--
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
11 years, 11 months
[JBoss JIRA] (RF-12523) a4j:commandButton generates duplicated context path using a resource value expression within image attribute
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12523?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12523:
-------------------------------
Fix Version/s: 5-Tracking
> a4j:commandButton generates duplicated context path using a resource value expression within image attribute
> ------------------------------------------------------------------------------------------------------------
>
> Key: RF-12523
> URL: https://issues.jboss.org/browse/RF-12523
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: resource handling
> Affects Versions: 4.2.2.Final, 4.3.0.M1
> Environment: Windows 7 Professional, JBoss AS 6.1.0.Final, Mojarra 2.1.7
> Reporter: Andreas Owczarek
> Labels: testcase_provided
> Fix For: 5-Tracking
>
>
> a4j:commandButton produces an extra context path prefix for the image resource path, when it is used with the value expression {code}#{resource['library:file']}{code} for the image attribute.
> {code:xml|title=Example code}
> <a4j:commandButton image="#{resource['icons:icon.gif']}" value="#{resource['icons:icon.gif']}"/>
> {code}
> {code:xml|title=Generated Result code}
> <input type="image" alt="/com.example.my.context.path/faces/javax.faces.resource/icon.gif?ln=icons" src="/com.example.my.context.path/com.example.my.context.path/faces/javax.faces.resource/icon.gif?ln=icons" value="/com.example.my.context.path/faces/javax.faces.resource/icon.gif?ln=icons" onclick="RichFaces.ajax("j_idt76",event,{"incId":"1"} );return false;" name="j_idt76" id="j_idt76">
> {code}
> The generated code show the correct value for the expression within the generated button label, but the image could not be located correctly because of the wrong generated image resource path.
--
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
11 years, 11 months
[JBoss JIRA] (RF-12523) a4j:commandButton generates duplicated context path using a resource value expression within image attribute
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12523?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-12523:
------------------------------------
thanks for the pull request [~jhuska], now that we've started the RichFaces 5 effort, we'll be addressing this in the RichFaces 5 time frame. Would you please direct your pull request to the RichFaces 5 repository, rather than the RF 4 components repository?
> a4j:commandButton generates duplicated context path using a resource value expression within image attribute
> ------------------------------------------------------------------------------------------------------------
>
> Key: RF-12523
> URL: https://issues.jboss.org/browse/RF-12523
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: resource handling
> Affects Versions: 4.2.2.Final, 4.3.0.M1
> Environment: Windows 7 Professional, JBoss AS 6.1.0.Final, Mojarra 2.1.7
> Reporter: Andreas Owczarek
> Labels: testcase_provided
>
> a4j:commandButton produces an extra context path prefix for the image resource path, when it is used with the value expression {code}#{resource['library:file']}{code} for the image attribute.
> {code:xml|title=Example code}
> <a4j:commandButton image="#{resource['icons:icon.gif']}" value="#{resource['icons:icon.gif']}"/>
> {code}
> {code:xml|title=Generated Result code}
> <input type="image" alt="/com.example.my.context.path/faces/javax.faces.resource/icon.gif?ln=icons" src="/com.example.my.context.path/com.example.my.context.path/faces/javax.faces.resource/icon.gif?ln=icons" value="/com.example.my.context.path/faces/javax.faces.resource/icon.gif?ln=icons" onclick="RichFaces.ajax("j_idt76",event,{"incId":"1"} );return false;" name="j_idt76" id="j_idt76">
> {code}
> The generated code show the correct value for the expression within the generated button label, but the image could not be located correctly because of the wrong generated image resource path.
--
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
11 years, 11 months
[JBoss JIRA] (RF-12523) a4j:commandButton generates duplicated context path using a resource value expression within image attribute
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-12523?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-12523:
-------------------------------
Labels: testcase_provided (was: ajax4jsf)
> a4j:commandButton generates duplicated context path using a resource value expression within image attribute
> ------------------------------------------------------------------------------------------------------------
>
> Key: RF-12523
> URL: https://issues.jboss.org/browse/RF-12523
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: resource handling
> Affects Versions: 4.2.2.Final, 4.3.0.M1
> Environment: Windows 7 Professional, JBoss AS 6.1.0.Final, Mojarra 2.1.7
> Reporter: Andreas Owczarek
> Labels: testcase_provided
>
> a4j:commandButton produces an extra context path prefix for the image resource path, when it is used with the value expression {code}#{resource['library:file']}{code} for the image attribute.
> {code:xml|title=Example code}
> <a4j:commandButton image="#{resource['icons:icon.gif']}" value="#{resource['icons:icon.gif']}"/>
> {code}
> {code:xml|title=Generated Result code}
> <input type="image" alt="/com.example.my.context.path/faces/javax.faces.resource/icon.gif?ln=icons" src="/com.example.my.context.path/com.example.my.context.path/faces/javax.faces.resource/icon.gif?ln=icons" value="/com.example.my.context.path/faces/javax.faces.resource/icon.gif?ln=icons" onclick="RichFaces.ajax("j_idt76",event,{"incId":"1"} );return false;" name="j_idt76" id="j_idt76">
> {code}
> The generated code show the correct value for the expression within the generated button label, but the image could not be located correctly because of the wrong generated image resource path.
--
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
11 years, 11 months
[JBoss JIRA] (RF-12759) rich:hotkey doesn't work with a4j:commandButton
by Edilmar Alves (JIRA)
Edilmar Alves created RF-12759:
----------------------------------
Summary: rich:hotkey doesn't work with a4j:commandButton
Key: RF-12759
URL: https://issues.jboss.org/browse/RF-12759
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.2.3.Final
Environment: Linux Fedora 16 x64, NetBeans 7.2, GlassFish 3.1.1, CDI/Weld/CODI, JSF2, RichFaces4.2.3, Hibernate3.2.5, Firebird 2.5.1
Reporter: Edilmar Alves
When I try to use rich:hotkey with a4j:commandButton, it doesn't work. A detailed explanation about this is in the forum.
--
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
11 years, 11 months
[JBoss JIRA] (RF-5763) maxHeight and maxWidth for rich:modalPanel to restrict autosized="true"
by Christophe Noel (JIRA)
[ https://issues.jboss.org/browse/RF-5763?page=com.atlassian.jira.plugin.sy... ]
Christophe Noel edited comment on RF-5763 at 1/25/13 6:48 AM:
--------------------------------------------------------------
As a workaround: <rich:popupPanel style="max-height:600px;" autosized="true">
was (Author: christophe.noel):
As a workaround: <rich:popupPanel style="max-height:600px;">
> maxHeight and maxWidth for rich:modalPanel to restrict autosized="true"
> ------------------------------------------------------------------------
>
> Key: RF-5763
> URL: https://issues.jboss.org/browse/RF-5763
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 3.2.2
> Reporter: Francisco Jose Peredo Noguez
> Fix For: 3.Future
>
>
> If I configure a rich:modalPanel with autosized="true", and its contents change dinamically, its size might increase wihout any limit, I want to be able to constraint the maximum heigth or wdith that the the modalPanel can reach.
--
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
11 years, 11 months