-
1. Re: Issue with .rf-ds-btn css / Button Display Issue.
michpetrov Jul 30, 2013 5:15 AM (in response to sandy4you)Hi,
what version of RichFaces do you use? And can you show me how you render these elements?
Also, doesn't the firebug point you to the file where the bad background is defined?
-
2. Re: Issue with .rf-ds-btn css / Button Display Issue.
sandy4you Jul 30, 2013 6:18 AM (in response to michpetrov)Hi Michal,
The Richfaces version is v=4.0.0.Final as mentioned in the url.
For the overview page the style class is working fine. Please see the code snippet below:
<ui:composition template="/templates/boLayout.xhtml">
<ui:define name="content">
<h:form id="form_bu">
<comp:overviewBtnGroup
id="btnGrp"
createLabel="#{commonTrans.businessUnitOverviewCreateNewBtn}"
createAction="#{businessUnitCrudWflBean.startNew(businessUnitOverviewBean.propertyManager)}"
resetFilterAction="#{businessUnitOverviewBean.dataModel.resetFilterValues}"
doSearchAction="#{businessUnitOverviewBean.dataModel.applyFilterValues}" />
<hr />
<rich:extendedDataTable
id="businessUnitList"
------
------
</rich:extendedDataTable>
</h:form>
</ui:define>
</ui:composition>
For the create/edit scenario its not working fine. Please see the code snippet below:
<ui:composition template="/templates/boLayout.xhtml">
<ui:define name="content">
<h:form id="businessUnitForm">
<comp:createBtnGroup
resetAction="#{businessUnitCrudWflBean.reset}"
createAction="#{businessUnitCrudWflBean.create}"
cancelAction="#{businessUnitCrudWflBean.cancel}" />
<div class="dataFormContainer clearfix">
<h3>
<h:outputText value="#{commonTrans.businessUnitDetailsHeadline}" />
</h3>
<ui:include src="businessUnitForm.xhtml">
<ui:param name="disabled" value="false"/>
</ui:include>
</div>
</h:form>
</ui:define>
</ui:composition>
The only difference is the <div class="dataFormContainer clearfix">.
Looks like its overridding the .rf-ds-btn css.
Need help where to fix this issue.
Hope this help you in understanding the problem and analying it in a better way.
Thanks & Regards,
Sandy
-
3. Re: Issue with .rf-ds-btn css / Button Display Issue.
michpetrov Jul 30, 2013 7:32 AM (in response to sandy4you)I would need to see the datascroller and the outputted HTML of the buttons. It looks like there is an error in the RichFaces CSS but I haven't found it.
EDIT:
The only difference is the <div class="dataFormContainer clearfix">.
Looks like its overridding the .rf-ds-btn css.
And does it change if you delete it?
-
4. Re: Issue with .rf-ds-btn css / Button Display Issue.
sandy4you Jul 30, 2013 7:50 AM (in response to michpetrov) -
5. Re: Issue with .rf-ds-btn css / Button Display Issue.
michpetrov Jul 30, 2013 8:57 AM (in response to sandy4you)Okay, so the second button is getting the background from a different file. What's the full name of the file?
-
6. Re: Issue with .rf-ds-btn css / Button Display Issue.
sandy4you Jul 30, 2013 10:00 AM (in response to michpetrov)common.css
-
7. Re: Issue with .rf-ds-btn css / Button Display Issue.
michpetrov Jul 30, 2013 10:09 AM (in response to sandy4you)Common.css is the correct file, the "bad" file in the second picture starts with "busine".
-
8. Re: Issue with .rf-ds-btn css / Button Display Issue.
sandy4you Jul 30, 2013 11:59 PM (in response to michpetrov)Hi Michal,
First of all thanks a lot for having the discussion on this issue.
Its not the problem with the given page or common.css file.
The button css is coming from the styleClass "rf-ds-btn" which comes from the RichFaces 'dataScroller'.
Hence, any page which does not have a dataTable will have this issue.
I fixed this issue by explicitly importing the dataScroller css in the head for the component which is creating the buttons in the Create/Edit scenario.
<composite:implementation>
<!--
The styleClass "rf-ds-btn" comes from the RichFaces 'dataScroller'.
So any page which does not have a data-table it will not get the CSS for the button.
Hence we need to explicitly import the 'datascroller.ecss'.
DON'T DELETE THIS.
-->
<h:outputStylesheet library="org.richfaces" name="datascroller.ecss" />
Thanks & Regards,
Sandy