You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Yoav Aharoni (JIRA)" <ji...@apache.org> on 2007/10/08 17:38:50 UTC

[jira] Updated: (WICKET-1048) After "refreshing" component with ajax target.addComponent(), component's events (onclick, onchange etc) stops functioning

     [ https://issues.apache.org/jira/browse/WICKET-1048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yoav Aharoni updated WICKET-1048:
---------------------------------

    Description: 
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.


  was:
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.



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