Forum Stats

  • 3,838,563 Users
  • 2,262,383 Discussions
  • 7,900,687 Comments

Discussions

faces message displayed when Tab but not Enter key pressed

DrHoneybear
DrHoneybear Member Posts: 41 Green Ribbon
edited Jul 20, 2022 2:48PM in JDeveloper and ADF

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>


Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,585 Red Diamond

    User, tell us your exact JDev version, please!

    Do you have a special reason for using Trinidad components?

    This forum mostly handles ADF and adf components.


    I'm not sure, but shouldn't you use the 'tr:messages' (with the s at the end?) tag for this?


    Timo