You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Daniel Hannum <dh...@quovadx.com> on 2006/11/21 17:05:38 UTC

Customizing the asterisk on required fields

Hi, sorry if this has been asked before. I didn't see a good search
feature for the archives.

 

I need to customize the appearance of the asterisks on required fields.
I think it's great that it puts the asterisks there for you, but it
still isn't right. Currently, I'm using a panelGrid (2 columns).

 

outputLabel       inputText

outputLabel       inputText

outputLabel       inputText

 

Problem is that the asterisks on required fields go before the
inputText, so they don't align right anymore. Another option is to not
use panelGrid and just use one big component for both (the label
attribute), but then the fields don't line up right vertically.

 

What I want is to make the asterisk appear at the end of the inputText
or on the label or anywhere other than where it is now.

 

Also the asterisk is black, and I want it to be red. 

 

Are these things customizable in styles somewhere?

 

Thanks.

 

Dan


Re: Customizing the asterisk on required fields

Posted by Simon Lessard <si...@gmail.com>.
Hello,

The color and icon are customizable in the skin using the selectors:

.AFRequiredIconStyle  // for color
.AFRequiredIcon:alias // to change the icon

However I don't think the position can be controlled.


Regards,

~ Simon

On 11/21/06, Daniel Hannum <dh...@quovadx.com> wrote:
>
> Hi, sorry if this has been asked before. I didn't see a good search
> feature for the archives.
>
>
>
> I need to customize the appearance of the asterisks on required fields.
> I think it's great that it puts the asterisks there for you, but it
> still isn't right. Currently, I'm using a panelGrid (2 columns).
>
>
>
> outputLabel       inputText
>
> outputLabel       inputText
>
> outputLabel       inputText
>
>
>
> Problem is that the asterisks on required fields go before the
> inputText, so they don't align right anymore. Another option is to not
> use panelGrid and just use one big component for both (the label
> attribute), but then the fields don't line up right vertically.
>
>
>
> What I want is to make the asterisk appear at the end of the inputText
> or on the label or anywhere other than where it is now.
>
>
>
> Also the asterisk is black, and I want it to be red.
>
>
>
> Are these things customizable in styles somewhere?
>
>
>
> Thanks.
>
>
>
> Dan
>
>
>

Re: Customizing the asterisk on required fields

Posted by Adam Winer <aw...@gmail.com>.
One thing you definitely want to do is stop using panelGrid.  You
want panelFormLayout and our built-in "label" support on all our
input components:

  <tr:panelFormLayout>
    <tr:inputText label="my label" required="true" value="#{...}"/>
    <tr:inputText label="my label 2" required="true" value="#{...}"/>

  </tr:panelFormLayout>

That will put the asterisk exactly where you want it.

-- Adam


On 11/21/06, Daniel Hannum <dh...@quovadx.com> wrote:
>
> Hi, sorry if this has been asked before. I didn't see a good search
> feature for the archives.
>
>
>
> I need to customize the appearance of the asterisks on required fields.
> I think it's great that it puts the asterisks there for you, but it
> still isn't right. Currently, I'm using a panelGrid (2 columns).
>
>
>
> outputLabel       inputText
>
> outputLabel       inputText
>
> outputLabel       inputText
>
>
>
> Problem is that the asterisks on required fields go before the
> inputText, so they don't align right anymore. Another option is to not
> use panelGrid and just use one big component for both (the label
> attribute), but then the fields don't line up right vertically.
>
>
>
> What I want is to make the asterisk appear at the end of the inputText
> or on the label or anywhere other than where it is now.
>
>
>
> Also the asterisk is black, and I want it to be red.
>
>
>
> Are these things customizable in styles somewhere?
>
>
>
> Thanks.
>
>
>
> Dan
>
>
>