[ 
https://jira.jboss.org/jira/browse/RF-3986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12427607#action_12427607
 ] 

Michael Heinen commented on RF-3986:
------------------------------------

Sorry for delayed answer, I was on vacation.

Documentation says that
"Richfaces registers the code for further invocation of XMLHTTP request object 
before an Ajax request is sent. This means the code will not be changed during 
processing of the request on the server if you use JSF EL value binding".
This sound to me that EL expressions are evaluated before the request is sent 
which is not true.

If I use s.th. like this in an oncomplete attribute
oncomplete="#{!empty requestScope['someVar']?'doA();':'doB();'}" 
and set/remove someVar in the called actionListener then either doA or doB is 
called.

According to documentation the EL expression would be evaluated before ajax 
request is sent, or ?

> oncomplete documentation in richfaces_userguide.pdf wrong
> ---------------------------------------------------------
>
>                 Key: RF-3986
>                 URL: https://jira.jboss.org/jira/browse/RF-3986
>             Project: RichFaces
>          Issue Type: Task
>          Components: doc
>    Affects Versions: 3.1.5
>            Reporter: Michael Heinen
>            Assignee: Alex Tserbo
>             Fix For: 3.2.2
>
>
> I assume there is a bug in the current richfaces-userguide.pdf, section 
> 5.4.5. JavaScript Interactions:
> It says:
> "oncomplete" attribute allows to invoke the JavaScript code right after the 
> Ajax Response is returned back and the DOM tree of the browser is updated. 
> Richfaces registers the code for further invocation of XMLHTTP request object 
> before an Ajax request is sent. This means the code will not be changed 
> during processing of the request on the server if you use JSF EL value 
> binding. Also, you cannot use "this'" inside the code, because it will not 
> point the component where Ajax request was initiated.
> Is this description deprecated or is the implementation in richfaces 3.1.5 
> wrong?
> sample:
> actionListener="#{mybean.al}"
> oncomplete="#{!empty requestScope['someVar']?'doA();':'doB();'}"
> depending on what I do in my actionListener doA or doB is called.
> Therefore I think the documentation has to be updated.

-- 
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

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to