Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

faces message displayed when Tab but not Enter key pressed

DrHoneybearJul 20 2022 — edited Jul 20 2022

We have jspx [Trinidad] code below, where our Faces messages are all displayed on a page <tr:message/> component - correctly. However for an InputText component, we are also seeing the error message displayed next to the component - we do not want this.
When the user enters some text into the inputText box, the validator in a backing bean is called; the validator checks the input for a known record in a database. If the record does not exist then a message is correctly displayed in the <message> area top of screen. However, this only happens if I Tab out of the field; if I press Enter then the error message is also displayed below the inputText box.

Any ideas why please?

I only want the message to be displayed once in the <tr:message> area (top of page)



                    <tr:message/>
                    <tr:panelLabelAndMessage label="#{bindings['Looms_View1Pid'].label}">
                      <tr:inputText value="#{backing_AllocateWires.loomTo}"
                                    simple="true"
                                    columns="#{bindings['Looms_View1Pid'].displayWidth}"
                                    maximumLength="#{bindings['Looms_View1Pid'].displayWidth}" autoSubmit="true"
                                    validator="#{backing_AllocateWires.loomTo_Validator}"
                                    binding="#{backing_AllocateWires.loomToInputText}" id="txtPidToLoom"
                                    rendered="#{backing_AllocateWires.loomTo == null}"/>
                      <tr:outputText value="#{backing_AllocateWires.loomTo}"
                                     rendered="#{backing_AllocateWires.loomTo != null}"/>
                    </tr:panelLabelAndMessage>
Comments
Post Details
Added on Jul 20 2022
1 comment
69 views