[ 
https://issues.apache.org/jira/browse/WICKET-4825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13480799#comment-13480799
 ] 

vineet semwal commented on WICKET-4825:
---------------------------------------

when you do target.add(component), that portion of ajax is rewritten at 
client.so your class at client always gets to what you have at start(server 
side) since your model is static...
your script toggles it off and toggles on another class.you never changed the 
state at server side.
                
> Odd Javascript behavior with 6.1.1
> ----------------------------------
>
>                 Key: WICKET-4825
>                 URL: https://issues.apache.org/jira/browse/WICKET-4825
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.1.1
>            Reporter: Nick Pratt
>         Attachments: quickstart.tar.gz
>
>
> See attached quickstart. I expect the <div> to toggle colors between red and 
> green on every click. This doesnt happen (latest Chrome browser). The panel 
> only toggles color on the first click. 
> Issuing the returned javascript directly in Chrome's dev tools correctly 
> toggles the panel colors as expected:
> $('#wmc').toggleClass('expanded').toggleClass('expandable');
> [<div id=​"wmc" wicket:id=​"wmc" class=​"expandable">​Click Me​</div>​]
> $('#wmc').toggleClass('expanded').toggleClass('expandable');
> [<div id=​"wmc" wicket:id=​"wmc" class=​"expanded">​Click Me​</div>​]
> $('#wmc').toggleClass('expanded').toggleClass('expandable');
> [<div id=​"wmc" wicket:id=​"wmc" class=​"expandable">​Click Me​</div>​]
> Looking really closely at the element inspector in Chrome, it looks like the 
> panel's class attributes do get toggled but then they seem to get overwritten.

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

Reply via email to