You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Richard Yee <ri...@gmail.com> on 2008/07/03 20:54:17 UTC

[Trinidad] inputText label positioning

Does anyone know what controls the position (above or beside) of the
label for an inputText element?
I have a page with an inputText element that is inside a
<tr:panelFormLayout>. The label is appearing above the input text
field like this:

Username:
-------------------------------------
|                                   |
-------------------------------------

what I want is the label to appear beside the input

ie.
                 --------------------------------
Username: |                               |
                 --------------------------------

Thanks,

Richard

Re: [Trinidad] inputText label positioning

Posted by Matthias Wessendorf <ma...@apache.org>.
On Thu, Jul 3, 2008 at 10:05 PM, Andrew Robinson
<an...@gmail.com> wrote:
> Check the demo. You can see it running here:
>
> http://www.irian.at/trinidad-demo/faces/components/panelFormLayout.jspx
>
> Just look at the demo source from SVN

or use a hidden "feature", the source view servlet:
http://www.irian.at/trinidad-demo/faces/components/panelFormLayout.jspx.source

Yes, we should add a "view source" link.

-Matthias

>
> On Thu, Jul 3, 2008 at 12:54 PM, Richard Yee <ri...@gmail.com> wrote:
>> Does anyone know what controls the position (above or beside) of the
>> label for an inputText element?
>> I have a page with an inputText element that is inside a
>> <tr:panelFormLayout>. The label is appearing above the input text
>> field like this:
>>
>> Username:
>> -------------------------------------
>> |                                   |
>> -------------------------------------
>>
>> what I want is the label to appear beside the input
>>
>> ie.
>>                 --------------------------------
>> Username: |                               |
>>                 --------------------------------
>>
>> Thanks,
>>
>> Richard
>>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [Trinidad] inputText label positioning

Posted by Andrew Robinson <an...@gmail.com>.
Don't. I haven't had to make a page with form layout elements in a
while. Been writing controls, not using them lately.

On Sun, Jul 6, 2008 at 3:35 PM, Richard Yee <ri...@gmail.com> wrote:
> Andrew,
> What do you use instead to lay out form elements?
>
> -Richard
>
>
> On Sun, Jul 6, 2008 at 11:45 AM, Andrew Robinson
> <an...@gmail.com> wrote:
>> I have to punt, I have no used the panelFormLayout hardly at all, so I
>> can't speak to how it should work.
>>
>> On Thu, Jul 3, 2008 at 10:23 PM, Richard Yee <ry...@cruzio.com> wrote:
>>> Mathias and Andrew,
>>> Thanks for the replies. Actually, I found that the problem is the same as
>>> what Mathias Walter posted on 7/2/2008 regarding nested panelFormLayouts. I
>>> happen to have a nested panelFormLayout. When this happens, as he describes,
>>> the maxColumns in the nested panelFormLayout becomes 1. This causes the
>>> label to be placed above the input text instead of beside it. Do you think
>>> this is correct behavior or does it warrant submitting a Jira issue?
>>>
>>> Thanks,
>>>
>>> Richard
>>>
>>> This is Mathias Walter's posting:
>>> Subject: [Trinidad] nested tr:panelFormLayout
>>> Date: 7/2/2008 10:36AM
>>>
>>> Hi,
>>>
>>> I'd like to have the following component structure:
>>>
>>> <tr:table>
>>>  <f:facet name="detailStamp">
>>>     <tr:panelFormLayout>
>>>        some <tr:inputText>
>>>        <tr:table>
>>>           <f:facet name="detailStamp">
>>>              <tr:panelFormLayout>
>>>                 some <tr:inputText>
>>>              </tr:panelFormLayout>
>>>           </f:facet>
>>>        </tr:table>
>>>     </tr:panelFormLayout>
>>>  </f:facet>
>>> </tr:table>
>>>
>>> Unfortunately, the innermost tr:panelFormLayout does not align the
>>> inputTexts like the outermost tr:panelFormLayout. The input element will be
>>> placed below the label. That's not what I want and what's expected.
>>>
>>> According to the documentation: If this panelFormLayout is inside of another
>>> panelFormLayout, maxColumns will always be 1.
>>> But that sould not affect a nondirect nested panelFormLayout. And
>>> maxColumns=1 does not mean that label and input will be aligned one upon the
>>> other.
>>>
>>> How can I achive a correct panelFormLayout for the innermost components?
>>>
>>> BTW: I'm using Trinidad 1.2.8 with Facelets 1.1.14.
>>>
>>> --
>>>
>>>
>>> Andrew Robinson wrote:
>>>>
>>>> Check the demo. You can see it running here:
>>>>
>>>> http://www.irian.at/trinidad-demo/faces/components/panelFormLayout.jspx
>>>>
>>>> Just look at the demo source from SVN
>>>>
>>>> On Thu, Jul 3, 2008 at 12:54 PM, Richard Yee <ri...@gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>> Does anyone know what controls the position (above or beside) of the
>>>>> label for an inputText element?
>>>>> I have a page with an inputText element that is inside a
>>>>> <tr:panelFormLayout>. The label is appearing above the input text
>>>>> field like this:
>>>>>
>>>>> Username:
>>>>> -------------------------------------
>>>>> |                                   |
>>>>> -------------------------------------
>>>>>
>>>>> what I want is the label to appear beside the input
>>>>>
>>>>> ie.
>>>>>                --------------------------------
>>>>> Username: |                               |
>>>>>                --------------------------------
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Richard
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>

Re: [Trinidad] inputText label positioning

Posted by Richard Yee <ri...@gmail.com>.
Andrew,
What do you use instead to lay out form elements?

-Richard


On Sun, Jul 6, 2008 at 11:45 AM, Andrew Robinson
<an...@gmail.com> wrote:
> I have to punt, I have no used the panelFormLayout hardly at all, so I
> can't speak to how it should work.
>
> On Thu, Jul 3, 2008 at 10:23 PM, Richard Yee <ry...@cruzio.com> wrote:
>> Mathias and Andrew,
>> Thanks for the replies. Actually, I found that the problem is the same as
>> what Mathias Walter posted on 7/2/2008 regarding nested panelFormLayouts. I
>> happen to have a nested panelFormLayout. When this happens, as he describes,
>> the maxColumns in the nested panelFormLayout becomes 1. This causes the
>> label to be placed above the input text instead of beside it. Do you think
>> this is correct behavior or does it warrant submitting a Jira issue?
>>
>> Thanks,
>>
>> Richard
>>
>> This is Mathias Walter's posting:
>> Subject: [Trinidad] nested tr:panelFormLayout
>> Date: 7/2/2008 10:36AM
>>
>> Hi,
>>
>> I'd like to have the following component structure:
>>
>> <tr:table>
>>  <f:facet name="detailStamp">
>>     <tr:panelFormLayout>
>>        some <tr:inputText>
>>        <tr:table>
>>           <f:facet name="detailStamp">
>>              <tr:panelFormLayout>
>>                 some <tr:inputText>
>>              </tr:panelFormLayout>
>>           </f:facet>
>>        </tr:table>
>>     </tr:panelFormLayout>
>>  </f:facet>
>> </tr:table>
>>
>> Unfortunately, the innermost tr:panelFormLayout does not align the
>> inputTexts like the outermost tr:panelFormLayout. The input element will be
>> placed below the label. That's not what I want and what's expected.
>>
>> According to the documentation: If this panelFormLayout is inside of another
>> panelFormLayout, maxColumns will always be 1.
>> But that sould not affect a nondirect nested panelFormLayout. And
>> maxColumns=1 does not mean that label and input will be aligned one upon the
>> other.
>>
>> How can I achive a correct panelFormLayout for the innermost components?
>>
>> BTW: I'm using Trinidad 1.2.8 with Facelets 1.1.14.
>>
>> --
>>
>>
>> Andrew Robinson wrote:
>>>
>>> Check the demo. You can see it running here:
>>>
>>> http://www.irian.at/trinidad-demo/faces/components/panelFormLayout.jspx
>>>
>>> Just look at the demo source from SVN
>>>
>>> On Thu, Jul 3, 2008 at 12:54 PM, Richard Yee <ri...@gmail.com>
>>> wrote:
>>>
>>>>
>>>> Does anyone know what controls the position (above or beside) of the
>>>> label for an inputText element?
>>>> I have a page with an inputText element that is inside a
>>>> <tr:panelFormLayout>. The label is appearing above the input text
>>>> field like this:
>>>>
>>>> Username:
>>>> -------------------------------------
>>>> |                                   |
>>>> -------------------------------------
>>>>
>>>> what I want is the label to appear beside the input
>>>>
>>>> ie.
>>>>                --------------------------------
>>>> Username: |                               |
>>>>                --------------------------------
>>>>
>>>> Thanks,
>>>>
>>>> Richard
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>

Re: [Trinidad] inputText label positioning

Posted by Andrew Robinson <an...@gmail.com>.
I have to punt, I have no used the panelFormLayout hardly at all, so I
can't speak to how it should work.

On Thu, Jul 3, 2008 at 10:23 PM, Richard Yee <ry...@cruzio.com> wrote:
> Mathias and Andrew,
> Thanks for the replies. Actually, I found that the problem is the same as
> what Mathias Walter posted on 7/2/2008 regarding nested panelFormLayouts. I
> happen to have a nested panelFormLayout. When this happens, as he describes,
> the maxColumns in the nested panelFormLayout becomes 1. This causes the
> label to be placed above the input text instead of beside it. Do you think
> this is correct behavior or does it warrant submitting a Jira issue?
>
> Thanks,
>
> Richard
>
> This is Mathias Walter's posting:
> Subject: [Trinidad] nested tr:panelFormLayout
> Date: 7/2/2008 10:36AM
>
> Hi,
>
> I'd like to have the following component structure:
>
> <tr:table>
>  <f:facet name="detailStamp">
>     <tr:panelFormLayout>
>        some <tr:inputText>
>        <tr:table>
>           <f:facet name="detailStamp">
>              <tr:panelFormLayout>
>                 some <tr:inputText>
>              </tr:panelFormLayout>
>           </f:facet>
>        </tr:table>
>     </tr:panelFormLayout>
>  </f:facet>
> </tr:table>
>
> Unfortunately, the innermost tr:panelFormLayout does not align the
> inputTexts like the outermost tr:panelFormLayout. The input element will be
> placed below the label. That's not what I want and what's expected.
>
> According to the documentation: If this panelFormLayout is inside of another
> panelFormLayout, maxColumns will always be 1.
> But that sould not affect a nondirect nested panelFormLayout. And
> maxColumns=1 does not mean that label and input will be aligned one upon the
> other.
>
> How can I achive a correct panelFormLayout for the innermost components?
>
> BTW: I'm using Trinidad 1.2.8 with Facelets 1.1.14.
>
> --
>
>
> Andrew Robinson wrote:
>>
>> Check the demo. You can see it running here:
>>
>> http://www.irian.at/trinidad-demo/faces/components/panelFormLayout.jspx
>>
>> Just look at the demo source from SVN
>>
>> On Thu, Jul 3, 2008 at 12:54 PM, Richard Yee <ri...@gmail.com>
>> wrote:
>>
>>>
>>> Does anyone know what controls the position (above or beside) of the
>>> label for an inputText element?
>>> I have a page with an inputText element that is inside a
>>> <tr:panelFormLayout>. The label is appearing above the input text
>>> field like this:
>>>
>>> Username:
>>> -------------------------------------
>>> |                                   |
>>> -------------------------------------
>>>
>>> what I want is the label to appear beside the input
>>>
>>> ie.
>>>                --------------------------------
>>> Username: |                               |
>>>                --------------------------------
>>>
>>> Thanks,
>>>
>>> Richard
>>>
>>>
>>
>>
>>
>
>

Re: [Trinidad] inputText label positioning

Posted by Richard Yee <ry...@cruzio.com>.
Mathias and Andrew,
Thanks for the replies. Actually, I found that the problem is the same 
as what Mathias Walter posted on 7/2/2008 regarding nested 
panelFormLayouts. I happen to have a nested panelFormLayout. When this 
happens, as he describes, the maxColumns in the nested panelFormLayout 
becomes 1. This causes the label to be placed above the input text 
instead of beside it. Do you think this is correct behavior or does it 
warrant submitting a Jira issue?

Thanks,

Richard

This is Mathias Walter's posting:
Subject: [Trinidad] nested tr:panelFormLayout
Date: 7/2/2008 10:36AM

Hi,

I'd like to have the following component structure:

<tr:table>
   <f:facet name="detailStamp">
      <tr:panelFormLayout>
         some <tr:inputText>
         <tr:table>
            <f:facet name="detailStamp">
               <tr:panelFormLayout>
                  some <tr:inputText>
               </tr:panelFormLayout>
            </f:facet>
         </tr:table>
      </tr:panelFormLayout>
   </f:facet>
</tr:table>

Unfortunately, the innermost tr:panelFormLayout does not align the
inputTexts like the outermost tr:panelFormLayout. The input element will be
placed below the label. That's not what I want and what's expected.

According to the documentation: If this panelFormLayout is inside of another
panelFormLayout, maxColumns will always be 1.
But that sould not affect a nondirect nested panelFormLayout. And
maxColumns=1 does not mean that label and input will be aligned one upon the
other.

How can I achive a correct panelFormLayout for the innermost components?

BTW: I'm using Trinidad 1.2.8 with Facelets 1.1.14.

--


Andrew Robinson wrote:
> Check the demo. You can see it running here:
>
> http://www.irian.at/trinidad-demo/faces/components/panelFormLayout.jspx
>
> Just look at the demo source from SVN
>
> On Thu, Jul 3, 2008 at 12:54 PM, Richard Yee <ri...@gmail.com> wrote:
>   
>> Does anyone know what controls the position (above or beside) of the
>> label for an inputText element?
>> I have a page with an inputText element that is inside a
>> <tr:panelFormLayout>. The label is appearing above the input text
>> field like this:
>>
>> Username:
>> -------------------------------------
>> |                                   |
>> -------------------------------------
>>
>> what I want is the label to appear beside the input
>>
>> ie.
>>                 --------------------------------
>> Username: |                               |
>>                 --------------------------------
>>
>> Thanks,
>>
>> Richard
>>
>>     
>
>
>   


Re: [Trinidad] inputText label positioning

Posted by Andrew Robinson <an...@gmail.com>.
Check the demo. You can see it running here:

http://www.irian.at/trinidad-demo/faces/components/panelFormLayout.jspx

Just look at the demo source from SVN

On Thu, Jul 3, 2008 at 12:54 PM, Richard Yee <ri...@gmail.com> wrote:
> Does anyone know what controls the position (above or beside) of the
> label for an inputText element?
> I have a page with an inputText element that is inside a
> <tr:panelFormLayout>. The label is appearing above the input text
> field like this:
>
> Username:
> -------------------------------------
> |                                   |
> -------------------------------------
>
> what I want is the label to appear beside the input
>
> ie.
>                 --------------------------------
> Username: |                               |
>                 --------------------------------
>
> Thanks,
>
> Richard
>