2

I have following code to work with a selectOneMenu provided by BootsFaces. It works totally fine, except that the error message (validation failed) is not shown up. With a <h:selectOneMenu>, it also works. Also with a <b:inputText, perfectly. The error message is simple not displayed with <b:selectOneMenu>.

<b:messages id="nachrichten" showDetail="true" showSummary="false" />
<b:selectOneMenu value="#{userprofile.user.year}" required="true" requiredMessage="Pls enter year">
    <f:selectItem itemLabel="year auswählen" itemValue="#{null}" />
    <f:selectItems value="#{yearHelper.allYears}" var="year" itemValue="#{year}" itemLabel="#{year.name}" />
    <f:facet name="append">
        <h:outputText value="" />
    </f:facet>
</b:selectOneMenu>

How can I fix, that the message is shown up while using <b:selectOneMenu>?

jezrael
  • 822,522
  • 95
  • 1,334
  • 1,252
alexander
  • 1,191
  • 2
  • 20
  • 40

1 Answers1

2

It's kind of a bug. Actually, you're using a feature we never promised. Funny thing is, I did implement some extra logic on when the required attribute is set to true. That's weird because I prefer the JSF303 bean validation style (and that, in turn, is the reason why I forgot to implement required).

I've opened a bug for you: https://github.com/TheCoder4eu/BootsFaces-OSP/issues/136.

Update 07/29/2015: As of BootsFaces 0.7.0++ (probably 0.8.0), the bug has been fixed.

Stephan Rauh
  • 3,069
  • 2
  • 18
  • 37
  • 1
    Consider the bug solved as of BootsFaces 0.8.0. If you need the bug fix before September 2015 when we're probably going to release the new version, please tell me. – Stephan Rauh Jul 25 '15 at 22:23
  • 1
    Well, actually I am doing a live-application with BF. Maybe, we can stay in contact, I found many other 'bugs' (and/or missing features) while working with BootsFaces. Well, the workaround is here to use divs with normal Bootstrap classes. It's working fine. If you wish, I can report those bugs. – alexander Jul 26 '15 at 11:00
  • 1
    Yes, please! I'm scanning StackOverflow.com every couple of days, but you get your bug fix a lot faster when you report the error directly on our page. Thanks! – Stephan Rauh Jul 27 '15 at 19:17