Im using primefaces 3.5 and i want to show dialog window after completion of any operation . And the dialog box should display like this
but i dont know why my overrided theme not working i tried alot and i have output like that
and my over rided css is this
.ui-widget-content{
background-color:white;
}
.ui-helper-clearfix:after{
background-color:green!important;
}
.ui-widget-header{
background:green!important;
}
.ui-shadow{
box-shadow:none;
}
.ui-dialog-content{
background:white!important;
padding: 0,0,0,0!important;
}
and my xhtml file code is this
<h:form id="form6">
<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
<h:button id="button1" onclick="ex.show();return false;" value="Ex alternis sermonibus" actionListener="#{indexBean.addInfo}"/>
<h:button id="button2" onclick="radicalis.show();return false;" value="Radicalis alternis sermonibus"/>
<p:commandButton id="infoButton" value="Info" actionListener="#{indexBean.addInfo}"/>
</h:form>
<h:form id="form1">
<h:outputText id="hail"/>
</h:form>
<h:outputText id="hail-outside" />
<p:dialog id="dialog1" header="Success" modal="true" resizable="false" style="height: 121px!important;left: 18px!important;width: 295px!important;" appendToBody="true" widgetVar="ex"
styleClass="ui-widget-content ui-helper-clearfix:after ui-widget-header ui-shadow .ui-dialog .ui-dialog-content">
<h:form id="form2">
<h:outputText value="You have successfully complete the action" ></h:outputText>
<p:commandButton value="ok" >
</p:commandButton>
</h:form>
</p:dialog>
<p:dialog id="dialog2" appendToBody="true" modal="true" widgetVar="radicalis">
<h:form id="form3">
<h:outputText value="Welcome here every one"></h:outputText>
</h:form>
</p:dialog>
kindly tell me what is wrong with my css
Couple of things you are not doing ok:
Differences:
This is how the dialog should look like:
<p:dialog id="dialog1" header="Success" modal="true" resizable="false" appendToBody="true" widgetVar="ex" width="295" height="181"
styleClass="customDialog">
And the styles in the css: (this is not all the css to make it work, just a sample of how you should be dealing with classes)
.customDialog {
background: green;
}
.ui-dialog.customDialog .ui-dialog-content {
padding: 0;
margin: 20px 10px;
}
.ui-dialog-titlebar.ui-widget-header.customDialog {
background: green;
color: black;
box-shadow: none;
}
This way you are editing the css for this particular dialog only.