Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.0-M1
    • Component/s: examples
    • Labels:
      None

      Description

      In many forms it is required to use a "separator" between fields, to group them visually, but not to add them to a FieldSet (since this should be a pure visual effect).
      Adding the controls to a FieldSet also breaks the alignment between groups, since each FieldSet seems to be aligned differently (due to the use of tables for auto-rendering).
      A simple implementation for a FieldSeparator would look like the following snippet:
      <code>
      /**

      • A separator made by <b>re-using</b> the FieldSet control.<p/>
      • A special CSS style: <code>.fieldSeparator</code> is added to the HTML fieldset,
      • that draws only the bottom line:
      • <pre>
      • .fieldSeparator { * border-bottom:0; * border-left:0; * border-right:0; * border-top-width:4px; * }
      • </pre>
        *
      • @see net.sf.click.control.FieldSet
        */
        public class FieldSeparator extends FieldSet {
        public FieldSeparator() {
        }

      public FieldSeparator(String name)

      { super(name); addStyleClass("fieldSeparator"); }

      public FieldSeparator(String name, String legend)

      { super(name, legend); addStyleClass("fieldSeparator"); }

      // override container methods since this should be a pure visual control.
      // ....
      }
      </code>

      Thank you,

      A.

        Attachments

          Activity

            People

            • Assignee:
              a_adrian Adrian A.
              Reporter:
              a_adrian Adrian A.
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: