You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by DLC <my...@yahoo.com> on 2007/08/28 17:37:17 UTC

[Trinidad] Label positioning

Hi all,

I'm working on skinning my application and am trying to figure out the best way to reposition
component labels.  The default skin places labels to the left of their associated UI elements, but
our site design requires them to appear above the elements in some cases.  Our current workaround
solution is to not use the component label, but to place our own label by hand above the
component.

Is there a better way to do this using CSS selectors and the skinning framework?  The same
question applies to the other default components associated with UI elements (e.g. the error icon,
required icon, and error message---what are all of them anyway?)

Thanks for your help,

--Dave


      ____________________________________________________________________________________
Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



Re: [Trinidad] Label positioning

Posted by DLC <my...@yahoo.com>.
Thanks for your input, Christian.

That is definitely a feasible solution to the problem, I was just wondering if there were a
skinning approach that could use the existing label.

If the only method available for repositioning the label / other attachments to trinidad
components is to build them by hand, I guess my follow-up question would be: How do I reconstruct
trinidad components by hand?  In other words, I'd like to know how to translate something like:

<tr:inputText label="Test" value="#{bean.testValue}" ... />

into more explicit markup like:

<tr:panelGroupLayout layout="horizontal">
...
     <tr:inputText value="#{bean.testValue}" simple="true" />
...
</tr:panelGroupLayout>

of course it would be most useful to do this for all of the trinidad components, since I might
want to reposition their messages, labels, error icons and required icons as well.

Thanks,

--Dave

--- Christian Klocker <ch...@googlemail.com> wrote:

> hi dave,
> 
> > I'm working on skinning my application and am trying to figure out the best way to reposition
> > component labels.  The default skin places labels to the left of their associated UI elements,
> but
> > our site design requires them to appear above the elements in some cases.  Our current
> workaround
> > solution is to not use the component label, but to place our own label by hand above the
> > component.
> 
> i had the same problem recently ... i also solved it by using outputlabel. the problem here is
> the generated html-output (placement is done via html-tables). so i turned on attribte simple on
> the input-components (so the table doesn't get written) an created a facelet-tag-source-file for
> reuse.
> 
> > ... elements (e.g. the error icon,
> > required icon, and error message---what are all of them anyway?)
> 
> maybe this helps: http://myfaces.apache.org/trinidad/devguide/skinning.html
> 
> christian
> 



      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


Re: [Trinidad] Label positioning

Posted by Christian Klocker <ch...@googlemail.com>.
hi dave,

> I'm working on skinning my application and am trying to figure out the best way to reposition
> component labels.  The default skin places labels to the left of their associated UI elements, but
> our site design requires them to appear above the elements in some cases.  Our current workaround
> solution is to not use the component label, but to place our own label by hand above the
> component.

i had the same problem recently ... i also solved it by using outputlabel. the problem here is the generated html-output (placement is done via html-tables). so i turned on attribte simple on the input-components (so the table doesn't get written) an created a facelet-tag-source-file for reuse.

> ... elements (e.g. the error icon,
> required icon, and error message---what are all of them anyway?)

maybe this helps: http://myfaces.apache.org/trinidad/devguide/skinning.html

christian