I believe the tacit understanding is that if you are adding fields to a
component, your are responsible for them operating correctly in production.
Generally speaking, fields are only added to support injected data needed
by an instance at runtime.

This must be documented better; the question is where?  Obviously, a more
complete guide to Plastic would be nice, once that incorporates standalone
Plastic, and its use inside CCTW.


On Fri, Dec 7, 2012 at 3:53 AM, Lance Java <lance.j...@googlemail.com>wrote:

> Hmm... looks like a bug. PlasticClassImpl uses this.fields in
> getUnclaimedFields() but never adds to this.fields in introduceField().
>
>     public PlasticField introduceField(String className, String
> suggestedName)
>     {
>         check();
>         assert PlasticInternalUtils.isNonBlank(className);
>         assert PlasticInternalUtils.isNonBlank(suggestedName);
>         String name = makeUnique(fieldNames, suggestedName);
>         FieldNode fieldNode = new FieldNode(ACC_PRIVATE, name,
> PlasticInternalUtils.toDescriptor(className), null, null);
>         classNode.fields.add(fieldNode);
>         fieldNames.add(name);
>         PlasticFieldImpl newField = new PlasticFieldImpl(this, fieldNode);
>         return newField;
>     }
>
>     public List<PlasticField> getUnclaimedFields()
>     {
>         check();
>         if (unclaimedFields == null)
>         {
>             unclaimedFields = new ArrayList<PlasticField>(fields.size());
>             for (PlasticField f : fields)
>             {
>                 if (!f.isClaimed())
>                     unclaimedFields.add(f);
>             }
>         }
>         return unclaimedFields;
>     }
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/BUG-UnclaimedFieldWorker-tp5718537p5718540.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

Reply via email to