wicketShow and wicketHide don't check for existence of element before setting 
display
-------------------------------------------------------------------------------------

                 Key: WICKET-1011
                 URL: https://issues.apache.org/jira/browse/WICKET-1011
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.2.6
            Reporter: Ian Ragsdale
            Priority: Minor


If for some reason the element doesn't exist, wicket throws a javascript 
exception.  This can happen if using an ajaxindicatingfallbacklink in an 
element that gets removed.  

For instance, if you have a list of items that you want to delete via ajax, and 
you have a delete button on each with an indicator,  when the item is 
successfully deleted, the call to hide the indicator throws an exception.  This 
seems like it should work without an error, and would be easily avoided with a 
simple check that e exists.  Something like the following would be really easy:

function wicketHide(id) {
     var e=wicketGet(id);
     if ( e ) {
        e.style.display = "none";
     }
}



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