incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Hannum" <dhan...@quovadx.com>
Subject RE: Re: Making labels wrap
Date Wed, 20 Dec 2006 20:20:40 GMT
I tried it out. I know my code is not the best. I'm trying the
two-column panelGrid approach I described. Please let me know a better
way (I know panelGrid is a no-no.)

<h:panelGrid columns="2">
	<af:selectOneRadio (with empty strings for labels)/>
	<af:panelGroup>
		<af:outputText value="Very long label....."/>
		<br/>
		<af:outputText value="Another very long label..."/>
	</af:panelGroup>

</h:panelGrid>

Produces

  Item 1 with a very long
  Label that takes up
O multiple lines.
O Item 2 with another very
  long label

The buttons are in one column and the labels are in the other. Both
columns are centered vertically (by default), so you get what I have
above. What I want is for the buttons on the left to be spaced out, but
how can they be if they don't know the length of the corresponding
label?

Thanks
-----Original Message-----
From: Adam Winer [mailto:awiner@gmail.com] 
Sent: Tuesday, December 19, 2006 12:05 PM
To: adffaces-user@incubator.apache.org
Subject: Re: Re: Making labels wrap

Hrm, don't think that's what you'd get.  I think you'd get:

O Item 1 with a very long
Label that takes up
multiple lines.
O Item 2 with another very
long label

-- Adam


On 12/18/06, Daniel Hannum <dhannum@quovadx.com> wrote:
> I think he means that if I had a selectOneRadio with 2 options, the
> buttons would appear right next to the text
>
> O Item 1
> O Item 2
>
> But if I use a separate outputLabel I'd need to fake a two column
> layout, where column 1 is just the selectOneRadio with no labels and
> column 2 is the labels.
>
> If I did that, getting them to align correctly with wrapping labels is
> hard. I think I'd get something like this
>
> O Item 1 with a very long
> O Label that takes up
>   multiple lines.
>   Item 2 with another very
>   long label
>
> I hope my ASCII art came out right. The selectOneRadio control won't
> know how to space out the buttons because it doesn't know how big the
> labels are.
>
> -----Original Message-----
> From: Adam Winer [mailto:awiner@gmail.com]
> Sent: Sunday, December 17, 2006 1:33 PM
> To: adffaces-user@incubator.apache.org
> Subject: Re: Re: Making labels wrap
>
> If you're using outputLabel in conjunction with an input
> component, you should set simple="true" on the input
> component.
>
> Then you'd
>   - Also set required="true" on the outputLabel to get the
>     icon in the right spot
>   - Also add a tr:message to get the help text to show
>
> -- Adam
>
>
> On 12/16/06, Robert Morse <rmorse@mdesignz.com> wrote:
> > I have experienced the same problem.  I tried tr:outputLabel and
that
> > wraps, but if the field is required, then the designator shows up
> > alongside the first radio button.  There's no way that I found to
> > have it place the required indicator near the text.  Help text for
> > the control is also broken.
> >
> >
> > On Dec 15, 2006, at 7:44 AM, Daniel Hannum wrote:
> >
> > > Hi, I have a few labels (on radio buttons) that are VERY long. I
> > > can't get
> > > them to wrap though. selectOneRadio will put nowrap on the td that
> > > surrounds
> > > the label. I've tried putting the css white-space tag everywhere I
> > > could.
> > >
> > >
> > >
> > > I could probably redesign the page to eliminate this, but I'd like
> > > to know
> > > if there are options I've overlooking.
> > >
> > >
> > >
> > > Thanks.
> > >
> > > Dan
> > >
> >
> >
>

Mime
View raw message