After "refreshing" component with ajax target.addComponent(), component's 
events (onclick, onchange etc) stops functioning
--------------------------------------------------------------------------------------------------------------------------

                 Key: WICKET-1048
                 URL: https://issues.apache.org/jira/browse/WICKET-1048
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.0-beta3
         Environment: Internent Explorer 6
            Reporter: Yoav Aharoni
            Priority: Blocker


I have a Component with the following html:
    <input type="text" wicket:id="myField" onclick="alert('clicked');"/>
    <a wicket:id="myLink">MyAjaxLink</a>

And the following java code:
        final TextField myField = new TextField("myField");
        myField.setOutputMarkupId(true);
        add(myField);

        final AjaxLink myLink = new AjaxLink("myLink") {
                public void onClick(AjaxRequestTarget target) {
                        target.addComponent(myField);
                }
        };
        add(myLink);
        

Whenever I click on myField I should get a "clicked" alert. 
But, after I click myLink (and execute _target.addComponent(myField)_) onclick 
event stop functioning and "clicked" doesn't pop-up.

When debugging this, at client side, I saw that before target.addComponent() 
onclick had a function value = function() { alert('clicked'); };
But after target.addComponent() onclick has a string value = 
"alert('clicked');".

It only happens in IE6, but since people are still using IE6 it's a blocker for 
me.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to