Hi,

Stephen Friedrich wrote, On 4/15/2008 12:59 AM PT:
Jeanne Waldman wrote:
What's the JIRA number?
What exactly are your requirements? I wouldn't over-design it by putting in too many hooks.
- Jeanne

Here's the Jira issue:
https://issues.apache.org/jira/browse/TRINIDAD-755
I couldn't apply your patch. Probably because it is too old?
I was interested in seeing the code.

Any yes, it is more complicated than it feels it should be.

We develop applications for a large customer who has a very rigid style guide.
My particular use case is quite simple:
1) The required icon must be behind the label.
I think you can use the .AFRequiredIconStyle:alias and add a skin property to it.

Like the user would do this:

.AFRequiredIconStyle:alias {-tr-required-icon-position: end}

Then the skinning framework registers this on the skin (see SkinImpl's _registerPropertiesFromStyleSheetEntry)
with the key
.AFRequiredIconStyle:alias-tr-required-icon-position
and the value
"end".

So your renderer would get the skin, and call skin.getProperty(".AFRequiredIconStyle:alias-tr-required-icon-position") and
with the answer, it would render the icon at the beginning or the end.

(of course, I'm making up the -tr-required-icon-position name. Skinning keys are public apis, so the name and values need to be
agreed upon on the Trinidad dev list.)

2) There must not be message icon at all.
Do you use .AFErrorIcon:alias, etc for this, and inhibit the icon?
3) A labels should display in red when a message is added to it.
You can add styleclasses to your root dom element when you have these states.


:error, :fatal, :warning, :info, and :confirmation
(the styleclass would be p_AFError, p_AFFatal, p_AFInfo, p_AFConfirmation)

Your html would look like <span class="af_inputText p_AFError">...

Then, you can do something like:
af|inputText:error::label {color: red}.
this looks like
.af_inputText.p_AFError .af_inputText_label {color: red}

I don't know the message code well enough to know if you know what message 'state'
you are in when you render the input.

- Jeanne

2) is not a problem at all with the current skinning selectors.
For now I got away without doing 3) - I am not sure if it is currently possible.
For 1) I am using a patched version of Trinidad.



Reply via email to