Hello Stephen,
Normally showRequired is used the other way around (show required even if
not) and was maintained in the input field merely from convenience as this
property come from the super class. Have you tried the following to fix your
issue, I think it would work?
<tr:panelLabelAndMessage label="First Name / Last Name" showRequired="true"
for="firstName">
<tr:panelHorizontalLayout> <!-- Adding that one is suckaga, but I did not
find any other way either -->
<tr:inputText id="firstName" simple="true" required="true"
value="#{bean.firstName}" label="First Name / Last Name"/>
<tr:panelLabelAndMessage label="" showRequired="false" for="lastName">
<tr:inputText id="lastName" simple="true" required="true"
value="#{bean.lastName}" label="First Name / Last Name"/>
</tr:panelLabelAndMessage>
</tr:panelHorizontalLayout>
</tr:panelLabelAndMessage>
Regards,
~ Simon
On Fri, Jun 20, 2008 at 10:50 AM, Andrew Robinson <
[EMAIL PROTECTED]> wrote:
> Sounds like an enhancement request for panelFormLayout to me
>
> On Fri, Jun 20, 2008 at 4:00 AM, Stephen Friedrich <[EMAIL PROTECTED]>
> wrote:
> > I noticed that I can't disable the required icon if required="true" in a
> > tr:inputText.
> > So even though showRequired="false", the "*" character is still shown.
> > Looked at the docs and found that "It's a feature, not a bug".
> >
> > <rant>
> > WTFBBQ?
> > Does anybody have an idea why the heck somebody explicitly put this into
> > code?
> > If a Trinidad user wants to do that, how dare somebody else decide that
> it's
> > not allowed?
> > </rant>
> >
> > Here's a specific use case where that make sense:
> > In a panelFormLayout, I'd like to have a row that contains two
> inputTexts,
> > like
> >
> > * First Name / Last Name ______________ ______________
> >
> > I can do that with a panelLabelAndMessage and nesting the inputTexts in a
> > tr:PanelHorizontalLayout, but wait, there's a problem.
> > Usually I would set only the first tr:inputText to simple="true" (because
> > only the first
> > element's label and message are shown by panelLabelAndMessage).
> > But now the row looks like
> >
> > * First Name / Last Name ______________
> > * ______________
> >
> > The second asterisk just looks misplaced and ugly.
> > The "*" breaks horizontal alignment with other fields in the second
> column
> > and more importantly somehow the second field is now vertically
> misaligned.
> >
> > So I try settings the second field to simple="true" also and add a
> > tr:message for it.
> > Argrgrgrgr! Now the validation failure message appears behind the second
> > field rather
> > than under it which completely breaks the page layout because the form
> gets
> > too wide.
> >
> > So, please, can you make the inputText actually do what I tell it, when I
> > say
> > required="true" showRequired="false"
> >
> > Otherwise: Can anybody propose a solution that keeps fields and
> validation
> > messages
> > correctly aligned, so that I can have on row in a panelFormLayout contain
> > two fields?
> >
> >
>