yes, but now you have the overhead of the header part (the actual LinkedList object) that's missing in my implementation... and the whole point of the optimization (see swing listener multicaster stuff). plus, if we were going to do that, we would refactor to just
use a list directly.

oh hey, i just found a boolean i could collapse in FormComponent... persistent.
if we add this:

   /**
    * Whether this form component should save and restore state between
    * sessions. This is false by default.
    */
   protected static final short FLAG_PERSISTENT = FLAG_RESERVED2;

and then change to this:

   public final boolean isPersistent()
   {
       return supportsPersistence() && getFlag(FLAG_PERSISTENT);
   }

   public final void setPersistent(final boolean persistent)
   {
       if (supportsPersistence())
       {
           setFlag(FLAG_PERSISTENT, persistent);
       }
       else
       {
throw new UnsupportedOperationException("FormComponent " + getClass()
                   + " does not support cookies");
       }
   }

we save 4 more bytes per formcomponent. cool!

      jon

Phil Kulak wrote:

You should look at my attached snipped more closely. ;) I implemented
your EXACT ValidatorLIst interface. That means that no code was
changed anywhere else and when there's no validator, there's no
reference, when there's one, there's no list. Exactly the same, except
that validation occures in the order the components were added.

On 8/11/05, Jonathan Locke <[EMAIL PROTECTED]> wrote:
nope.  look at the code more closely.  when there's only one validator,
there's
no validator list.  it's exactly like the multicaster hack we threw in
there in awt
and swing for the same reason...



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to