-
1. Re: rich:modalPanel can't be used in firefox but normal in I
marco.grimm Oct 19, 2007 2:29 AM (in response to palvin)We do use rich:modalPanel from version 3.1.1.GA in Mozilla Firefox without any problems. Please post you code.
-
2. Re: rich:modalPanel can't be used in firefox but normal in I
palvin Oct 19, 2007 3:07 AM (in response to palvin)Thank you for your reply, and followed is my code:
=============userlist.xhtml start============
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:outputLink value="javascript:Richfaces.showModalPanel('mp');">
<h:outputText value="Open Modal Win" />
</h:outputLink>
<a4j:include viewId="/pages/test.xhtml" />
</ui:composition>
=============userlist.xhtml end============
=============test.xhtml start==============
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
function getRightTop(ref) {
var position = new Object();
position.top = 0; //ref.offsetTop;
position.left =0; // ref.offsetLeft+ref.clientWidth+6;
return position;
}
<rich:modalPanel id="mp" minHeight="200" minWidth="450"
height="200" width="500" zindex="2000">
<h:form>
<f:facet name="header">
<h:outputText value="Modal Panel Title" />
</f:facet>
Any JSF content might be inside the panel. In case of using
Facelets or JSF 1.2, it might be any mixed content.
The RichFaces modal panel is good with <a4j:include> to create
a wizard like behavior.
The model panel is open and closed from the javascript function
on Richfaces object. The following code
<a href="javascript:document.submit;Richfaces.hideModalPanel('mp');">hide this panel:
Richfaces.hideModalPanel('mp')
</h:form>
</rich:modalPanel>
</ui:composition>
=============test.xhtml end===============
I've tested the code in firefox and IE, in IE it's no problem, but in fireforx, when I click the link, no anything occur except the firebug report "modalPanel.js.jsf (line 38)" exception. Could anybody can resolve the bug?
Thanks a lots. -
3. Re: rich:modalPanel can't be used in firefox but normal in I
palvin Oct 19, 2007 9:03 AM (in response to palvin)Update the post and is this a bug for firefox?
-
4. Re: rich:modalPanel can't be used in firefox but normal in I
marco.grimm Oct 29, 2007 10:03 AM (in response to palvin)Sorry, but I forgot to test your example till now. Your example works on my Firefox without any problems.
-
5. Re: rich:modalPanel can't be used in firefox but normal in I
palvin Oct 29, 2007 8:16 PM (in response to palvin)Thank you for your reply and I think that I've found the truth of it maybe. Whatever I test from firefox using previous code, the error occur always, but if I using template of facelates, it's passed. I checked the template again and found that there exist a header declaration:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
I supposed that it's the reason.