Search code examples
jsfprimefacesiconsconfirm

How to completely remove icon from p:confirm?


I am using p:confirmDialog and p:confirm. When the popup pops up (heh) there is a caret icon to the left from confirm message. Is there any way to remove it? In primefaces documentation is no info about it, but on their github issue they say that caret is default one.

My code:

<p:confirmDialog global="true" visible="true" widgetVar="confirmation">
    <p:commandButton value="No" type="button" styleClass="ui-confirm-dialog-no ui-mybutton-second" icon="ui-icon-close" />
    <p:commandButton value="Yes" onclick="#{cc.attrs.aController.someAction}" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
</p:confirmDialog>
<p:confirm header="Confirm action" message="Are you sure #{someController.foo.fooNr} #{someController.foo.fooSerial}?"/>

Any ideas how to remove icon?


Solution

  • CSS will help you:

    .ui-dialog-content > .ui-icon {
        display: none;
    }