You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Asgaut Mjølne (JIRA)" <ji...@apache.org> on 2008/08/12 14:10:44 UTC

[jira] Created: (WICKET-1787) AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's

AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's
--------------------------------------------------------------------------------------------

                 Key: WICKET-1787
                 URL: https://issues.apache.org/jira/browse/WICKET-1787
             Project: Wicket
          Issue Type: Bug
            Reporter: Asgaut Mjølne


When using AjaxSubmitLink, and the markupid for a wicket element is not explicitly set, AjaxSubmitLink will not work with internet explorer. When clicking on your AjaxSubmitLink while running Internet Explorer, nothing will happen.

Here is an example:
html file:
<img wicket:id="img_unlock" >

java file:
ContextImage unlockImage = new ContextImage("img_unlock", new Model("pathtoimage/unlockedgray.png"));

Since the id attribute is not set, wicket will now generate the output id id="id". For some reason AjaxSubmitLink in Internet Explorer does not understand this (Firefox does). Here is the HTML output:

<img class="ajaximg" src="../pathtoimage/unlockedgray.png" onClick="var wcall=wicketSubmitFormById('i3', '../?wicket:interface=:2:new_loancase:application_form:header:img_unlock::IActivePageBehaviorListener:0:1&amp;wicket:ignoreIfNotActive=true', null,null,null, function() {return Wicket.$$(this)&amp;&amp;Wicket.$$('i3')}.bind(this));;"
id="id">


The solution is to explicit add the markupid, like this:
unlockImage.setOutputMarkupId(true);
unlockImage.setMarkupId("mynewdistinctid");


Would it not be better if wicket automatically generated another name for the id attribute than "id"? Can this be done? Or is there a workaround I am not aware of?

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


[jira] Resolved: (WICKET-1787) AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1787.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4-M4
                   1.3.5

in 1.3 branch and trunk the prefix is "id" not "i" so this should no longer happen

> AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's
> --------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1787
>                 URL: https://issues.apache.org/jira/browse/WICKET-1787
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Asgaut Mjølne
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.5, 1.4-M4
>
>
> When using AjaxSubmitLink, and the markupid for a wicket element is not explicitly set, AjaxSubmitLink will not work with internet explorer. When clicking on your AjaxSubmitLink while running Internet Explorer, nothing will happen.
> Here is an example:
> html file:
> <img wicket:id="img_unlock" >
> java file:
> ContextImage unlockImage = new ContextImage("img_unlock", new Model("pathtoimage/unlockedgray.png"));
> Since the id attribute is not set, wicket will now generate the output id id="id". For some reason AjaxSubmitLink in Internet Explorer does not understand this (Firefox does). Here is the HTML output:
> <img class="ajaximg" src="../pathtoimage/unlockedgray.png" onClick="var wcall=wicketSubmitFormById('i3', '../?wicket:interface=:2:new_loancase:application_form:header:img_unlock::IActivePageBehaviorListener:0:1&amp;wicket:ignoreIfNotActive=true', null,null,null, function() {return Wicket.$$(this)&amp;&amp;Wicket.$$('i3')}.bind(this));;"
> id="id">
> The solution is to explicit add the markupid, like this:
> unlockImage.setOutputMarkupId(true);
> unlockImage.setMarkupId("mynewdistinctid");
> Would it not be better if wicket automatically generated another name for the id attribute than "id"? Can this be done? Or is there a workaround I am not aware of?

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


[jira] Commented: (WICKET-1787) AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's

Posted by "Asgaut Mjølne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622112#action_12622112 ] 

Asgaut Mjølne commented on WICKET-1787:
---------------------------------------

Before I provide a quickstart, I would like to mention that I am running Wicket version 1.3.3. Is this number appending something new in 1.3.4?

> AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's
> --------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1787
>                 URL: https://issues.apache.org/jira/browse/WICKET-1787
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Asgaut Mjølne
>            Assignee: Igor Vaynberg
>
> When using AjaxSubmitLink, and the markupid for a wicket element is not explicitly set, AjaxSubmitLink will not work with internet explorer. When clicking on your AjaxSubmitLink while running Internet Explorer, nothing will happen.
> Here is an example:
> html file:
> <img wicket:id="img_unlock" >
> java file:
> ContextImage unlockImage = new ContextImage("img_unlock", new Model("pathtoimage/unlockedgray.png"));
> Since the id attribute is not set, wicket will now generate the output id id="id". For some reason AjaxSubmitLink in Internet Explorer does not understand this (Firefox does). Here is the HTML output:
> <img class="ajaximg" src="../pathtoimage/unlockedgray.png" onClick="var wcall=wicketSubmitFormById('i3', '../?wicket:interface=:2:new_loancase:application_form:header:img_unlock::IActivePageBehaviorListener:0:1&amp;wicket:ignoreIfNotActive=true', null,null,null, function() {return Wicket.$$(this)&amp;&amp;Wicket.$$('i3')}.bind(this));;"
> id="id">
> The solution is to explicit add the markupid, like this:
> unlockImage.setOutputMarkupId(true);
> unlockImage.setMarkupId("mynewdistinctid");
> Would it not be better if wicket automatically generated another name for the id attribute than "id"? Can this be done? Or is there a workaround I am not aware of?

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


[jira] Commented: (WICKET-1787) AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621847#action_12621847 ] 

Igor Vaynberg commented on WICKET-1787:
---------------------------------------

can you provide a quickstart please? looking at the code in component#getmarkupid(boolean) it looks like the id will always have a number appended to it, so wicket should never generate "id" id, but rather "id0" id...

> AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's
> --------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1787
>                 URL: https://issues.apache.org/jira/browse/WICKET-1787
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Asgaut Mjølne
>            Assignee: Igor Vaynberg
>
> When using AjaxSubmitLink, and the markupid for a wicket element is not explicitly set, AjaxSubmitLink will not work with internet explorer. When clicking on your AjaxSubmitLink while running Internet Explorer, nothing will happen.
> Here is an example:
> html file:
> <img wicket:id="img_unlock" >
> java file:
> ContextImage unlockImage = new ContextImage("img_unlock", new Model("pathtoimage/unlockedgray.png"));
> Since the id attribute is not set, wicket will now generate the output id id="id". For some reason AjaxSubmitLink in Internet Explorer does not understand this (Firefox does). Here is the HTML output:
> <img class="ajaximg" src="../pathtoimage/unlockedgray.png" onClick="var wcall=wicketSubmitFormById('i3', '../?wicket:interface=:2:new_loancase:application_form:header:img_unlock::IActivePageBehaviorListener:0:1&amp;wicket:ignoreIfNotActive=true', null,null,null, function() {return Wicket.$$(this)&amp;&amp;Wicket.$$('i3')}.bind(this));;"
> id="id">
> The solution is to explicit add the markupid, like this:
> unlockImage.setOutputMarkupId(true);
> unlockImage.setMarkupId("mynewdistinctid");
> Would it not be better if wicket automatically generated another name for the id attribute than "id"? Can this be done? Or is there a workaround I am not aware of?

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


[jira] Commented: (WICKET-1787) AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's

Posted by "Asgaut Mjølne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624356#action_12624356 ] 

Asgaut Mjølne commented on WICKET-1787:
---------------------------------------

Checked the 1.3.4 code, the problem still remains.

I debugged through the method:
public String getMarkupId(boolean createIfDoesNotExist) in the class Component.java

...and found the bug. When Wicket executes this piece of code:
String markupIdPostfix = Integer.toHexString(generatedMarkupId).toLowerCase();

You will get "d" returned when 13 is the generatedMarkupId number. The method will then finally return "id" as the markupId!

10 will return "a", 11 will return "b", 12 will return "c" and so on. 

Why do you hex the numbers? 

And how can we get around this? We are going into production with our web application and need a fix/workaround as soon as possible.

> AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's
> --------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1787
>                 URL: https://issues.apache.org/jira/browse/WICKET-1787
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Asgaut Mjølne
>            Assignee: Igor Vaynberg
>
> When using AjaxSubmitLink, and the markupid for a wicket element is not explicitly set, AjaxSubmitLink will not work with internet explorer. When clicking on your AjaxSubmitLink while running Internet Explorer, nothing will happen.
> Here is an example:
> html file:
> <img wicket:id="img_unlock" >
> java file:
> ContextImage unlockImage = new ContextImage("img_unlock", new Model("pathtoimage/unlockedgray.png"));
> Since the id attribute is not set, wicket will now generate the output id id="id". For some reason AjaxSubmitLink in Internet Explorer does not understand this (Firefox does). Here is the HTML output:
> <img class="ajaximg" src="../pathtoimage/unlockedgray.png" onClick="var wcall=wicketSubmitFormById('i3', '../?wicket:interface=:2:new_loancase:application_form:header:img_unlock::IActivePageBehaviorListener:0:1&amp;wicket:ignoreIfNotActive=true', null,null,null, function() {return Wicket.$$(this)&amp;&amp;Wicket.$$('i3')}.bind(this));;"
> id="id">
> The solution is to explicit add the markupid, like this:
> unlockImage.setOutputMarkupId(true);
> unlockImage.setMarkupId("mynewdistinctid");
> Would it not be better if wicket automatically generated another name for the id attribute than "id"? Can this be done? Or is there a workaround I am not aware of?

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


[jira] Commented: (WICKET-1787) AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's

Posted by "Asgaut Mjølne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625639#action_12625639 ] 

Asgaut Mjølne commented on WICKET-1787:
---------------------------------------

Okay, thanks. When is the release date for that fix? Currently our fix is to overwrite the Component class and remove the hexing. That worked.

Could you tell me why you use the toHexString method please? Why not just convert the number over to a string? Is it just to avoid long numbers? Just curious.

> AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's
> --------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1787
>                 URL: https://issues.apache.org/jira/browse/WICKET-1787
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Asgaut Mjølne
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.5, 1.4-M4
>
>
> When using AjaxSubmitLink, and the markupid for a wicket element is not explicitly set, AjaxSubmitLink will not work with internet explorer. When clicking on your AjaxSubmitLink while running Internet Explorer, nothing will happen.
> Here is an example:
> html file:
> <img wicket:id="img_unlock" >
> java file:
> ContextImage unlockImage = new ContextImage("img_unlock", new Model("pathtoimage/unlockedgray.png"));
> Since the id attribute is not set, wicket will now generate the output id id="id". For some reason AjaxSubmitLink in Internet Explorer does not understand this (Firefox does). Here is the HTML output:
> <img class="ajaximg" src="../pathtoimage/unlockedgray.png" onClick="var wcall=wicketSubmitFormById('i3', '../?wicket:interface=:2:new_loancase:application_form:header:img_unlock::IActivePageBehaviorListener:0:1&amp;wicket:ignoreIfNotActive=true', null,null,null, function() {return Wicket.$$(this)&amp;&amp;Wicket.$$('i3')}.bind(this));;"
> id="id">
> The solution is to explicit add the markupid, like this:
> unlockImage.setOutputMarkupId(true);
> unlockImage.setMarkupId("mynewdistinctid");
> Would it not be better if wicket automatically generated another name for the id attribute than "id"? Can this be done? Or is there a workaround I am not aware of?

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


[jira] Commented: (WICKET-1787) AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622113#action_12622113 ] 

Igor Vaynberg commented on WICKET-1787:
---------------------------------------

i am not sure, you should try 1.3.4 and the latest snapshot as well...

> AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's
> --------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1787
>                 URL: https://issues.apache.org/jira/browse/WICKET-1787
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Asgaut Mjølne
>            Assignee: Igor Vaynberg
>
> When using AjaxSubmitLink, and the markupid for a wicket element is not explicitly set, AjaxSubmitLink will not work with internet explorer. When clicking on your AjaxSubmitLink while running Internet Explorer, nothing will happen.
> Here is an example:
> html file:
> <img wicket:id="img_unlock" >
> java file:
> ContextImage unlockImage = new ContextImage("img_unlock", new Model("pathtoimage/unlockedgray.png"));
> Since the id attribute is not set, wicket will now generate the output id id="id". For some reason AjaxSubmitLink in Internet Explorer does not understand this (Firefox does). Here is the HTML output:
> <img class="ajaximg" src="../pathtoimage/unlockedgray.png" onClick="var wcall=wicketSubmitFormById('i3', '../?wicket:interface=:2:new_loancase:application_form:header:img_unlock::IActivePageBehaviorListener:0:1&amp;wicket:ignoreIfNotActive=true', null,null,null, function() {return Wicket.$$(this)&amp;&amp;Wicket.$$('i3')}.bind(this));;"
> id="id">
> The solution is to explicit add the markupid, like this:
> unlockImage.setOutputMarkupId(true);
> unlockImage.setMarkupId("mynewdistinctid");
> Would it not be better if wicket automatically generated another name for the id attribute than "id"? Can this be done? Or is there a workaround I am not aware of?

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


[jira] Commented: (WICKET-1787) AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625764#action_12625764 ] 

Igor Vaynberg commented on WICKET-1787:
---------------------------------------

for a release date you should ask on the list

re hexing: yes, it is to shorten the id values

> AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's
> --------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1787
>                 URL: https://issues.apache.org/jira/browse/WICKET-1787
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Asgaut Mjølne
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.5, 1.4-M4
>
>
> When using AjaxSubmitLink, and the markupid for a wicket element is not explicitly set, AjaxSubmitLink will not work with internet explorer. When clicking on your AjaxSubmitLink while running Internet Explorer, nothing will happen.
> Here is an example:
> html file:
> <img wicket:id="img_unlock" >
> java file:
> ContextImage unlockImage = new ContextImage("img_unlock", new Model("pathtoimage/unlockedgray.png"));
> Since the id attribute is not set, wicket will now generate the output id id="id". For some reason AjaxSubmitLink in Internet Explorer does not understand this (Firefox does). Here is the HTML output:
> <img class="ajaximg" src="../pathtoimage/unlockedgray.png" onClick="var wcall=wicketSubmitFormById('i3', '../?wicket:interface=:2:new_loancase:application_form:header:img_unlock::IActivePageBehaviorListener:0:1&amp;wicket:ignoreIfNotActive=true', null,null,null, function() {return Wicket.$$(this)&amp;&amp;Wicket.$$('i3')}.bind(this));;"
> id="id">
> The solution is to explicit add the markupid, like this:
> unlockImage.setOutputMarkupId(true);
> unlockImage.setMarkupId("mynewdistinctid");
> Would it not be better if wicket automatically generated another name for the id attribute than "id"? Can this be done? Or is there a workaround I am not aware of?

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


[jira] Commented: (WICKET-1787) AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's

Posted by "Asgaut Mjølne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621789#action_12621789 ] 

Asgaut Mjølne commented on WICKET-1787:
---------------------------------------

Here is someone who had the same problem, posted recently:
http://www.nabble.com/Wicket-1.4m3---AjaxButton,-AjaxSubmitLink-in-ModalWindow-in-IE-7-Problem---td18912755.html

> AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's
> --------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1787
>                 URL: https://issues.apache.org/jira/browse/WICKET-1787
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Asgaut Mjølne
>
> When using AjaxSubmitLink, and the markupid for a wicket element is not explicitly set, AjaxSubmitLink will not work with internet explorer. When clicking on your AjaxSubmitLink while running Internet Explorer, nothing will happen.
> Here is an example:
> html file:
> <img wicket:id="img_unlock" >
> java file:
> ContextImage unlockImage = new ContextImage("img_unlock", new Model("pathtoimage/unlockedgray.png"));
> Since the id attribute is not set, wicket will now generate the output id id="id". For some reason AjaxSubmitLink in Internet Explorer does not understand this (Firefox does). Here is the HTML output:
> <img class="ajaximg" src="../pathtoimage/unlockedgray.png" onClick="var wcall=wicketSubmitFormById('i3', '../?wicket:interface=:2:new_loancase:application_form:header:img_unlock::IActivePageBehaviorListener:0:1&amp;wicket:ignoreIfNotActive=true', null,null,null, function() {return Wicket.$$(this)&amp;&amp;Wicket.$$('i3')}.bind(this));;"
> id="id">
> The solution is to explicit add the markupid, like this:
> unlockImage.setOutputMarkupId(true);
> unlockImage.setMarkupId("mynewdistinctid");
> Would it not be better if wicket automatically generated another name for the id attribute than "id"? Can this be done? Or is there a workaround I am not aware of?

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


[jira] Assigned: (WICKET-1787) AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg reassigned WICKET-1787:
-------------------------------------

    Assignee: Igor Vaynberg

> AjaxSubmitLink in Internet Explorer does not work with Wicket's automatically genreated id's
> --------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1787
>                 URL: https://issues.apache.org/jira/browse/WICKET-1787
>             Project: Wicket
>          Issue Type: Bug
>            Reporter: Asgaut Mjølne
>            Assignee: Igor Vaynberg
>
> When using AjaxSubmitLink, and the markupid for a wicket element is not explicitly set, AjaxSubmitLink will not work with internet explorer. When clicking on your AjaxSubmitLink while running Internet Explorer, nothing will happen.
> Here is an example:
> html file:
> <img wicket:id="img_unlock" >
> java file:
> ContextImage unlockImage = new ContextImage("img_unlock", new Model("pathtoimage/unlockedgray.png"));
> Since the id attribute is not set, wicket will now generate the output id id="id". For some reason AjaxSubmitLink in Internet Explorer does not understand this (Firefox does). Here is the HTML output:
> <img class="ajaximg" src="../pathtoimage/unlockedgray.png" onClick="var wcall=wicketSubmitFormById('i3', '../?wicket:interface=:2:new_loancase:application_form:header:img_unlock::IActivePageBehaviorListener:0:1&amp;wicket:ignoreIfNotActive=true', null,null,null, function() {return Wicket.$$(this)&amp;&amp;Wicket.$$('i3')}.bind(this));;"
> id="id">
> The solution is to explicit add the markupid, like this:
> unlockImage.setOutputMarkupId(true);
> unlockImage.setMarkupId("mynewdistinctid");
> Would it not be better if wicket automatically generated another name for the id attribute than "id"? Can this be done? Or is there a workaround I am not aware of?

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