incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Counsell, Keith M." <kmcou...@provbank.com>
Subject Validation messages and tr:panelLabelAndMessage
Date Wed, 13 Dec 2006 14:50:10 GMT
Hello,
 
I would like to use a panelLabelAndMessage within a panelFormLayout to
line up the left-most inputs while having additional components to the
right on some rows.  This is working ideally except in the case of
messages.  Is there a way to get validation messages for the component
identified with the panelLabelAndMessage's "for" attribute to appear as
the detail in a page's <tr:messages/> tag?
 
Consider this page:
 
<tr:form xmlns:f="http://java.sun.com/jsf/core"
    xmlns:tr="http://myfaces.apache.org/trinidad">
 
    <tr:messages/>
 
    <tr:panelHeader text="Mailing Address">
        <tr:panelFormLayout>
            <tr:inputText label="Street:"
                id="addressStreet" required="true"/>
            <tr:panelLabelAndMessage label="City:"
                showRequired="true" for="addressCity">
                <tr:panelHorizontalLayout>
                    <tr:panelGroupLayout layout="vertical">
                        <tr:inputText simple="true"
                            id="addressCity" required="true" />
                        <tr:message for="addressCity"/>
                    </tr:panelGroupLayout>
                    <tr:inputText label="State:"
                        id="addressState" required="true"/>
                </tr:panelHorizontalLayout>
            </tr:panelLabelAndMessage>
        </tr:panelFormLayout>
    </tr:panelHeader>
 
    <tr:commandButton text="Submit" id="submitButton"/>
 
</tr:form>
 
The messages include the label text for the Street and State inputs, but
the entry for City only indicates that a value is required and does not
have the detail message that would link to the field to correct the
problem.  Adding requiredMessageDetail to the City changes the output of
the <tr:message for="addressCity"/> but not the message in
<tr:messages/>.  This works perfectly otherwise.
 
Is there a way to include the panelLabelAndMessage's label in
<tr:messages>?  Am I missing something fundamental?  Any tips or
solutions would be much appreciated.
 
Thanks,
Keith

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message