-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Messages showDetail has wrong default value and shows summary twice #352
Comments
I've corrected the default values in the jsfdsl file. Three components are affected: b:message, b:messages and b:growl. |
Thanks, I had that sitting in my trunk but didn't get to it yet. What do you think about checking the |
Actually, I don't get it. Why is the summary shown twice if the detail is null? Looking at the code, I'd expect either nothing or the text "null": if (message.isShowDetail()) {
rw.startElement("span", component);
writeAttribute(rw, "class", "bf-message-detail");
if (message.isEscape()) {
rw.writeText(msg.getDetail(), null);
} else {
warnOnFirstUse();
rw.write(msg.getDetail());
}
rw.endElement("span");
} |
Did you verify the bug in the current snapshot though? I remember, that PrimeFaces' growl had (or has?) the same issue. Maybe UI-message sets detail = summary, if detail is null? Maybe we can check for equality between summary and detail and show only one of them, if they are equal? |
This bug was solved by the cc35075 commit. |
I've changed the default value back to "true". Suppressing the details of an error message by default seems to be a bit odd. However, I've corrected the documentation. |
@stephanrauh Saw that, just wanted to write that we may need a fix for the original problem now again: However, I may have an idea considering the double messaged, will test that now. Edit: I currently cannot reproduce the icons.css bug, but I got a lot of |
Actually, I prefer duplicate message over no messages. But I agree with you that we should avoid these duplicate messages. They are a standard behavior of JSF, but that's no excuse: we've founded BootsFaces to make the JSF world a better place :). |
The duplicate message shows only after a full-page request (F5 key). Plus, the "icons" message doesn't pop up on my local installation. |
As I have mentioned, I couldn't reproduce the icons.css bug as well. However the initial messages show only once for me, refreshing the page via cmd + R doesn't work, neither in Safari nor Chrome, although the cache is disabled. Edit: I think I got this. Currently testing a bit and reviewing the existing code. |
The problem should be fixed my now. |
@stephanrauh I found the problem: We're both using the maven build. However, the gradle build doesn't remove resources from the As we're adding I guess as of now we won't need the additional icons.css files in the theme folders anymore :) |
The documentation states, that
showDetail
should befalse
, but the real value istrue
.Therefore currently the summary message will be shown twice at the moment, if no detail is provided as
StackOverflow user b.lopes reports.
This probably shouldn't happen at all, maybe we should opt for not showing a detail, if it's value is
null
.I have not checked this, but the same may apply to the growl.
The text was updated successfully, but these errors were encountered: