click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leszek Piotrowicz (JIRA)" <j...@apache.org>
Subject [jira] Created: (CLK-737) Form.replace throws an exception
Date Fri, 10 Dec 2010 11:34:03 GMT
Form.replace throws an exception
--------------------------------

                 Key: CLK-737
                 URL: https://issues.apache.org/jira/browse/CLK-737
             Project: Click
          Issue Type: Bug
          Components: core
            Reporter: Leszek Piotrowicz
            Priority: Minor


the code below:

Form form = new Form();
Submit submit = new Submit("ok", "ok"); // field of type button
Label label = new Label("lab", "lab"); // field of type other than button
form.add(submit);
form.replace(submit, label);

throws an exception: index out of bounds

the reason is that Form.replace assumes that control is always replaced by control, button
by another button etc... which is not always the case
In the above example the function tries to replace submit by label in field list but submit
is in button list

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


Mime
View raw message