b.lopes
b.lopes

Reputation: 475

Bootsfaces FacesMessage always displays summary and detail

By doing this:

FacesContext.getCurrentInstance().addMessage(null, 
            new    FacesMessage(FacesMessage.SEVERITY_INFO,msg.getMessageResourceWithParams("admini.client.search.save.ok",
                    new Object[]{clientOnSearch.getFirstName()+"  "+clientOnSearch.getLastName()}),null));

I am only expecting to see the Summary on the interface since I put the detail set to null.

But it displays the same messsage twice, on the summary and details.

Client Bruno Laaaalapa was successfully added Client Bruno Laaaalapa was successfully added

On the xhtml I have:

<b:row>
    <b:column>
        <b:messages/>
    </b:column>
</b:row>

Is anything missing on it ?

Thanks

Upvotes: 1

Views: 839

Answers (1)

Zhedar
Zhedar

Reputation: 3510

You might have found a little misbehaviour there, normally b:messages' detail shouldn't be shown on default (default is documented to be false, but is true instead, we will fix that with 0.8.2).

However, you can explicitly hide the detail by specifying:

 <b:messages showDetail="false"/>

You could also opt for showing the detail, but not the summary:

 <b:messages showDetail="true" showSummary="false"/>

Upvotes: 1

Related Questions