[
https://issues.apache.org/jira/browse/MYFACES-2755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879334#action_12879334
]
Michael Concini commented on MYFACES-2755:
------------------------------------------
Thanks Werner.
FYI, this also looks to affect things like onerror as well. This is not working
either (statusUpdate is just a simple embedded script in our page).
<h:commandButton id="button1" value="Count"
action="#{incrementdecrement.causeError}"
onclick="jsf.ajax.request(this, event, { render: 'out1', onerror:
statusUpdate }); return false;"/>
> this.id is undefined in jsf.ajax.request (regression from 2.0.0)
> ----------------------------------------------------------------
>
> Key: MYFACES-2755
> URL: https://issues.apache.org/jira/browse/MYFACES-2755
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.1
> Reporter: Michael Concini
>
> With the new javascript, we now wrapper calls into jsf.ajax.request with a
> function call. So for example this:
> <h:commandButton id="incrementButton" value="Increment"
> onclick="jsf.ajax.request(this, event, { execute:
> this.id, render: 'counter' }); return false;"
> actionListener="#{counter.increment}" />
> would be rendered as this:
> <input id="incrementButton" name="incrementButton" type="submit"
> value="Increment"
> onclick="var cf = function(){jsf.ajax.request(this, event, { execute:
> this.id, render: 'counter' }); return false;};var oamSF = function(){};return
> (cf()==false)? false : oamSF();" />
> The problem is that we've broken the reference to this.id as it is undefined
> at the function's scope. This works fine in both the 2.0.0 release as well as
> Mojarra.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.