2 Replies Latest reply on Jan 12, 2005 8:49 AM by zgibek

    bug at editing block attr - constructing

    zgibek

      Hello guys,
      I noticed some problem with org.jboss.nukes.core.modules.block.BlockModule.
      The "edit" action consturcts htmlpage to set some parameters (f.e. Title, DisplayName, etc).
      The problem is when the text field is not empty: the checkbox input field isn't correctly counstructed:
      <input type="checkbox" name="isnull" value="true" "/>
      (look closer at the last three chars).
      Mozilla parses the web page ok and shows the next "update" button, but my konqueror doesn't.
      I tried to patch it, but i found only small fix (line 281):
      - String checked = "";
      + String checked = "checked='false'";
      The effect is there is good constructed page and button "Update" is shown. But, the checkbox is always checked :(.

      I think the responsible for that is edit.render(...) in line 306, but I cannot find the place when it is done.
      Maybe anyone else can tell me where should I have a closer look?
      --
      regards, zgibek

        • 1. Re: bug at editing block attr - constructing
          zgibek

          sorry, it isn't line nr 306 but 302 (in clean file directly from cvs). But it doesn't matter, i think.

          • 2. Re: bug at editing block attr - constructing
            zgibek

            hmm,
            I found a solution even if I don't know where should I look. I made a last try and change the intializing variable originaly from an empty string to "false" string.
            Anyway - the checkboxes are now properly shown both in Mozilla and Konqueror.
            I put below my cvs diff if someone think its useful:

            RCS file: /cvsroot/jboss/nukes/nukes/src/main/org/jboss/nukes/core/modules/block/BlockModule.java,v
            retrieving revision 1.19
            diff -r1.19 BlockModule.java
            281c281
            < String checked = "";
            ---
            > String checked = "false";