Thanks Simon,

implementation is done, please see
   https://issues.apache.org/jira/browse/TRINIDAD-755
I tried to to keep the code changes small, but failed. First, if the
position of the required icon is skinnable, then the position of the
message icon should sure be skinnable, too. Yet, now one must care for
the relative ordering in between both icons, too.
I solved that by specify the position as an integer index relative to
the text position, so -2 for message icon and -1 for required icon is
the default, -1 for message and +1 for required would show the message
icon in front of and the required icon after the text.
There is so much code just to determine whether an icon is shown at all.
I need to check that first, to figure out if a   is needed in front of
and/or behind the label's text.
Most of that code would be needed again if the icon is finally really
rendered. To avoid that you can of course remember each icon's details
(message type, alt text, ...). Well, to remember it, it makes sense to
encapsulate it. If you encapsulate it, you can just as well move icon
specific code to the encapsulation class, using it as a delegate from
within the renderer. Then it makes sense to move code that is common
for both delegates to a base class.
Two utility methods that were available from within the renderer at a
base class were not accessible from the delegates. I made them static,
which is probably ok, because several other methods of the same kind were
already static.

All in all I think the code is more readable now.

Would be great of you could review and comment. If the overall scheme is
acceptable, please commit. I'll integrate your comments from there.

Thanks again,
Stephen

Simon Lessard wrote:
Hello Stephen,

This is definitely a skin property case, not per component. There's no strict rule though. About the name, maybe -tr-required-icon-position?

~ Simon

On 10/1/07, *Stephen Friedrich* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    I have just changed the OutputLabelRenderer to optionally render
    the required icon _after_ the label.
    How should I implement skinning for that?
    (Currently I check a system property, that I set in my test code.)

    What is the practical difference between defining a new skinning
    property vs. a component key?

    Any preference regarding a name and possible value for the property/key?

    Will you accept a patch if I supply it?
    After all IMHO it is much more common to append the required indicator
    to the label.



Reply via email to