No. I never found a solution. I was finally using the style attribute. My
problem was that this panelGrid is used on every page and I definitely
didn't want to have the style attributes maintained on every single page. So
I decided to create the panelGrid component dynamically in Java like this
(the style is maintained centrally within a properties file - I know it's
not nice but...):
Page:
<h:panelGrid binding="#{projectHandler.actionBar}" />
Bean ProjectHandler:
private HtmlPanelGrid actionBar = new HtmlPanelGrid();
-> Getter and Setter
-> Add a method called from constructor doing something like this:
public HtmlPanelGrid generateActionBar(String handlerName){
FacesContext fc = FacesContext.getCurrentInstance();
ELContext ec = fc.getELContext();
Application app = fc.getApplication();
ExpressionFactory factory = app.getExpressionFactory();
MethodExpression me;
actionBar.getChildren().clear();
actionBar.setRendered(true);
UIColumn col = new UIColumn();
actionBar.setStyle(style.getString("formActionBar"));
actionBar.setColumns(4);
HtmlAjaxCommandButton button;
button = new HtmlAjaxCommandButton();
me =
factory.createMethodExpression(ec,"#{"+handlerName+".createRecord}",
String.class, new Class<?>[0]);
button.setActionExpression(me);
button.setValue(cont.getString("buttonAdd"));
button.setStyleClass("formActionButton");
button.setRendered(true);
col.getChildren().add(button);
actionBar.getChildren().add(col);
return actionBar;
}
OrbitWebsig wrote:
>
> Did you ever find a fix to this? I have the exact same issue :( Any
> advice much appreciated!
>
>
> Alan Gross wrote:
>>
>> Hi Forum
>> I use myfaces 1.2.6.
>> I noticed that neither the styleClass Attribute nor the "id" is working
>> with my central CSS configuration in Firefox.
>>
>> The following works fine in IE7 but not in FireFox 3.0.10 (using
>> panelGrid styleClass):
>>
>> css file:
>> .formActionBar {
>> height: 25px;
>> left: 450px;
>> top: -47px;
>> position: absolute;
>> }
>>
>>
>> <h:panelGrid columns="4" styleClass="formActionBar">
>> <a4j:commandButton styleClass="formActionButton"
>> rendered="#{timerepHandler.editReport.status=='Pending Approval'}"
>> value="#{cont.buttonSave }"
>> action="#{timerepHandler.saveEditReportRecord}" />
>> </h:panelGrid>
>>
>> This one is also working in IE7 but NOT in Firefox (using panelGrid id):
>>
>> #formActionBarId {
>> height: 25px;
>> left: 450px;
>> top: -47px;
>> position: absolute;
>> }
>>
>> <h:panelGrid columns="4" id="formActionBarId">
>> <a4j:commandButton styleClass="formActionButton"
>> rendered="#{timerepHandler.editReport.status=='Pending Approval'}"
>> value="#{cont.buttonSave }"
>> action="#{timerepHandler.saveEditReportRecord}" />
>> </h:panelGrid>
>>
>>
>> The following works in both (IE7 and firefox) - using panelGrid style
>> attribute:
>>
>> <h:panelGrid columns="4" style="height: 25px;
>> left: 450px;
>> top: -47px;
>> position: absolute;">
>>
>> <a4j:commandButton styleClass="formActionButton"
>> rendered="#{timerepHandler.editReport.status=='Pending Approval'}"
>> value="#{cont.buttonSave }"
>> action="#{timerepHandler.saveEditReportRecord}" />
>> </h:panelGrid>
>>
>> But this is not what I want since I would need to set the CSS style on
>> every page. Has anyone expierenced the same problem? Is this a know
>> issue?
>>
>> Thank you very much for your help.
>> Best regards
>> Alan
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Possible-Bug----h%3ApanelGrid-styleClass-not-working-in-Firefox-tp23960526p25129944.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.