[jira] [Commented] (MYFACES-4636) Using f:param + f:ajax onvent results in an error

2023-11-03 Thread Thomas Andraschko (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17782520#comment-17782520
 ] 

Thomas Andraschko commented on MYFACES-4636:


2.3 works fine

> Using f:param + f:ajax onvent results in an error
> -
>
> Key: MYFACES-4636
> URL: https://issues.apache.org/jira/browse/MYFACES-4636
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3-next-M8
>Reporter: Vitaly Sidorov
>Assignee: Thomas Andraschko
>Priority: Major
> Fix For: 3.0.3, 4.0.2, 2.3-next-M9, 4.1.0, 5.0.0
>
> Attachments: sample.zip
>
>
> *Steps to reproduce:*
>  - create xhtml with f:param and f:ajax onevent like this:
>  
> {code:html}
> 
> 
> 
> 
>  execute="@this"
> onevent="testJs">
> 
> 
> 
> 
> // function testJs(data) {
> if (data.status === 'success') {
> alert("Success click")
> }
> }
> //]]>
> 
> {code}
>  
>  - click on "Click me"
>  - get an error in the console: "{color:#FF}Uncaught SyntaxError: 
> Unexpected token ':' (at index.xhtml:9:868){color}"
> *The reason:*
> Generated page code by M7 build:
> {code:javascript}
> jsf.util.chain(this, 
> event,function(event){myfaces.ab(this,event,'click','j_id_i','',{'onevent':testJs,'var1':'NEW
>  VALUE'})}); return false;
> {code}
> Generated page code by M8 build with *bad JS* (look at {*}testJsparams{*}):
> {code:javascript}
> jsf.util.chain(this, 
> event,function(event){myfaces.ab(this,event,'click','j_id_i','',{'onevent':testJsparams:{'var1':'NEW
>  VALUE'}})}); return false;
> {code}
> *I've attached an archive with an example.*



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4636) Using f:param + f:ajax onvent results in an error

2023-11-03 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17782508#comment-17782508
 ] 

Werner Punz commented on MYFACES-4636:
--

No I dont think so, but we have to double check this!

 

> Using f:param + f:ajax onvent results in an error
> -
>
> Key: MYFACES-4636
> URL: https://issues.apache.org/jira/browse/MYFACES-4636
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3-next-M8
>Reporter: Vitaly Sidorov
>Priority: Major
> Fix For: 3.0.3, 4.0.2, 2.3-next-M9, 4.1.0, 5.0.0
>
> Attachments: sample.zip
>
>
> *Steps to reproduce:*
>  - create xhtml with f:param and f:ajax onevent like this:
>  
> {code:html}
> 
> 
> 
> 
>  execute="@this"
> onevent="testJs">
> 
> 
> 
> 
> // function testJs(data) {
> if (data.status === 'success') {
> alert("Success click")
> }
> }
> //]]>
> 
> {code}
>  
>  - click on "Click me"
>  - get an error in the console: "{color:#FF}Uncaught SyntaxError: 
> Unexpected token ':' (at index.xhtml:9:868){color}"
> *The reason:*
> Generated page code by M7 build:
> {code:javascript}
> jsf.util.chain(this, 
> event,function(event){myfaces.ab(this,event,'click','j_id_i','',{'onevent':testJs,'var1':'NEW
>  VALUE'})}); return false;
> {code}
> Generated page code by M8 build with *bad JS* (look at {*}testJsparams{*}):
> {code:javascript}
> jsf.util.chain(this, 
> event,function(event){myfaces.ab(this,event,'click','j_id_i','',{'onevent':testJsparams:{'var1':'NEW
>  VALUE'}})}); return false;
> {code}
> *I've attached an archive with an example.*



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4636) Using f:param + f:ajax onvent results in an error

2023-11-03 Thread Thomas Andraschko (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17782498#comment-17782498
 ] 

Thomas Andraschko commented on MYFACES-4636:


[~werpu] did you change it also for old JS base in past?


> Using f:param + f:ajax onvent results in an error
> -
>
> Key: MYFACES-4636
> URL: https://issues.apache.org/jira/browse/MYFACES-4636
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3-next-M8
>Reporter: Vitaly Sidorov
>Priority: Major
> Fix For: 4.0.2, 2.3-next-M9, 4.1.0, 5.0.0
>
> Attachments: sample.zip
>
>
> *Steps to reproduce:*
>  - create xhtml with f:param and f:ajax onevent like this:
>  
> {code:html}
> 
> 
> 
> 
>  execute="@this"
> onevent="testJs">
> 
> 
> 
> 
> // function testJs(data) {
> if (data.status === 'success') {
> alert("Success click")
> }
> }
> //]]>
> 
> {code}
>  
>  - click on "Click me"
>  - get an error in the console: "{color:#FF}Uncaught SyntaxError: 
> Unexpected token ':' (at index.xhtml:9:868){color}"
> *The reason:*
> Generated page code by M7 build:
> {code:javascript}
> jsf.util.chain(this, 
> event,function(event){myfaces.ab(this,event,'click','j_id_i','',{'onevent':testJs,'var1':'NEW
>  VALUE'})}); return false;
> {code}
> Generated page code by M8 build with *bad JS* (look at {*}testJsparams{*}):
> {code:javascript}
> jsf.util.chain(this, 
> event,function(event){myfaces.ab(this,event,'click','j_id_i','',{'onevent':testJsparams:{'var1':'NEW
>  VALUE'}})}); return false;
> {code}
> *I've attached an archive with an example.*



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4636) Using f:param + f:ajax onvent results in an error

2023-11-03 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17782455#comment-17782455
 ] 

Werner Punz commented on MYFACES-4636:
--

Looks ok to me, the test reconfirms the result anyway, I wonder why the +colon 
was added, probably a misunderstanding of the mechanism, but we will see!

Thanks for fixing this [~tandraschko] 

> Using f:param + f:ajax onvent results in an error
> -
>
> Key: MYFACES-4636
> URL: https://issues.apache.org/jira/browse/MYFACES-4636
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3-next-M8
>Reporter: Vitaly Sidorov
>Priority: Major
> Fix For: 4.0.2, 2.3-next-M9, 4.1.0, 5.0.0
>
> Attachments: sample.zip
>
>
> *Steps to reproduce:*
>  - create xhtml with f:param and f:ajax onevent like this:
>  
> {code:html}
> 
> 
> 
> 
>  execute="@this"
> onevent="testJs">
> 
> 
> 
> 
> // function testJs(data) {
> if (data.status === 'success') {
> alert("Success click")
> }
> }
> //]]>
> 
> {code}
>  
>  - click on "Click me"
>  - get an error in the console: "{color:#FF}Uncaught SyntaxError: 
> Unexpected token ':' (at index.xhtml:9:868){color}"
> *The reason:*
> Generated page code by M7 build:
> {code:javascript}
> jsf.util.chain(this, 
> event,function(event){myfaces.ab(this,event,'click','j_id_i','',{'onevent':testJs,'var1':'NEW
>  VALUE'})}); return false;
> {code}
> Generated page code by M8 build with *bad JS* (look at {*}testJsparams{*}):
> {code:javascript}
> jsf.util.chain(this, 
> event,function(event){myfaces.ab(this,event,'click','j_id_i','',{'onevent':testJsparams:{'var1':'NEW
>  VALUE'}})}); return false;
> {code}
> *I've attached an archive with an example.*



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4636) Using f:param + f:ajax onvent results in an error

2023-11-02 Thread Thomas Andraschko (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17782096#comment-17782096
 ] 

Thomas Andraschko commented on MYFACES-4636:


Can you review plz [~werpu]?

and [~sidvi] can you please retest and build from source? applied the bugfix to 
the 2.3-next branch

> Using f:param + f:ajax onvent results in an error
> -
>
> Key: MYFACES-4636
> URL: https://issues.apache.org/jira/browse/MYFACES-4636
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3-next-M8
>Reporter: Vitaly Sidorov
>Priority: Major
> Fix For: 4.0.2, 2.3-next-M9, 4.1.0, 5.0.0
>
> Attachments: sample.zip
>
>
> *Steps to reproduce:*
>  - create xhtml with f:param and f:ajax onevent like this:
>  
> {code:html}
> 
> 
> 
> 
>  execute="@this"
> onevent="testJs">
> 
> 
> 
> 
> // function testJs(data) {
> if (data.status === 'success') {
> alert("Success click")
> }
> }
> //]]>
> 
> {code}
>  
>  - click on "Click me"
>  - get an error in the console: "{color:#FF}Uncaught SyntaxError: 
> Unexpected token ':' (at index.xhtml:9:868){color}"
> *The reason:*
> Generated page code by M7 build:
> {code:javascript}
> jsf.util.chain(this, 
> event,function(event){myfaces.ab(this,event,'click','j_id_i','',{'onevent':testJs,'var1':'NEW
>  VALUE'})}); return false;
> {code}
> Generated page code by M8 build with *bad JS* (look at {*}testJsparams{*}):
> {code:javascript}
> jsf.util.chain(this, 
> event,function(event){myfaces.ab(this,event,'click','j_id_i','',{'onevent':testJsparams:{'var1':'NEW
>  VALUE'}})}); return false;
> {code}
> *I've attached an archive with an example.*



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4636) Using f:param + f:ajax onvent results in an error

2023-10-31 Thread Werner Punz (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17781339#comment-17781339
 ] 

Werner Punz commented on MYFACES-4636:
--

This seems to be an issue in the java renderer, this is not syntatically 
correct, onevent wants a function. There seems to be something going wrong with 
the params rendering onEvent: testJsParams is definitely wrong here!

 

> Using f:param + f:ajax onvent results in an error
> -
>
> Key: MYFACES-4636
> URL: https://issues.apache.org/jira/browse/MYFACES-4636
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 2.3-next-M8
>Reporter: Vitaly Sidorov
>Priority: Major
> Attachments: sample.zip
>
>
> *Steps to reproduce:*
>  - create xhtml with f:param and f:ajax onevent like this:
>  
> {code:html}
> 
> 
> 
> 
>  execute="@this"
> onevent="testJs">
> 
> 
> 
> 
> // function testJs(data) {
> if (data.status === 'success') {
> alert("Success click")
> }
> }
> //]]>
> 
> {code}
>  
>  - click on "Click me"
>  - get an error in the console: "{color:#FF}Uncaught SyntaxError: 
> Unexpected token ':' (at index.xhtml:9:868){color}"
> *The reason:*
> Generated page code by M7 build:
> {code:javascript}
> jsf.util.chain(this, 
> event,function(event){myfaces.ab(this,event,'click','j_id_i','',{'onevent':testJs,'var1':'NEW
>  VALUE'})}); return false;
> {code}
> Generated page code by M8 build with *bad JS* (look at {*}testJsparams{*}):
> {code:javascript}
> jsf.util.chain(this, 
> event,function(event){myfaces.ab(this,event,'click','j_id_i','',{'onevent':testJsparams:{'var1':'NEW
>  VALUE'}})}); return false;
> {code}
> *I've attached an archive with an example.*



--
This message was sent by Atlassian Jira
(v8.20.10#820010)