5 Replies Latest reply on Sep 3, 2008 9:35 PM by rigen hu

    how to make modalPanel top most?

    rigen hu Newbie

      When I show a modalPanel over a selectOneMenu or ocx, the right and bottom border are missing(only in IE). But when I ran the application in FireFox, everything is OK. I try to use z-Index of all the components to solve to problom, no success. Anyone can help?

      My enviroment:
      JBoss 4.2.2
      Richfaces 3.2.1GA
      IE6.0

        • 1. Re: how to make modalPanel top most?
          rigen hu Newbie

          Sorry for fogetting to say thanks!

          • 2. Re: how to make modalPanel top most?
            Sergey Smirnov Master

            see http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173828

            It is not enough to set z-index on the component. You have to go up in the dom tree where both box containers have the common root. Actually, just read the article.

            • 3. Re: how to make modalPanel top most?
              Nick Belaevski Master

              Hello,

              Can you please post a screenshot somewhere?

              • 4. Re: how to make modalPanel top most?
                rigen hu Newbie

                Thanks a lot.

                Due to my poor English, I am now try hard to read all the linked source to find out the way out.

                The link below is a part of my screenshot.

                http://img.blog.163.com/photo/kEx-gQYN-rBqnWEvPS_9JA==/3453416489263895408.jpg

                • 5. Re: how to make modalPanel top most?
                  rigen hu Newbie


                  mainPag.jsp

                  <f:view locale="#{userContext.curuser.language}">
                  
                   <f:loadBundle basename="com.bet.oa.apps.resource.message" var="msgs" />
                   <a4j:loadStyle src="/css/view.css"></a4j:loadStyle>
                   <a4j:region id="myRegion">
                  
                   <h:panelGroup styleClass="loading">
                   <a4j:status layout="block" for="myRegion">
                   <f:facet name="start">
                   <h:graphicImage url="/images/toolbar/loading.gif" />
                   </f:facet>
                   </a4j:status>
                   </h:panelGroup>
                  
                   <a4j:form ajaxSubmit="true" reRender="pgContent">
                  
                   <a4j:keepAlive beanName="documentBean"></a4j:keepAlive>
                  
                  
                   <rich:panel id="pgContent" header="编辑文档:">
                  
                   <rich:messages passedLabel="Data is allowed to be stored." layout="list">
                   <f:facet name="header">
                   <h:outputText value="Entered Data Status:"></h:outputText>
                   </f:facet>
                   <f:facet name="errorMarker">
                   <h:graphicImage value="/images/icons/del.gif" />
                   </f:facet>
                   </rich:messages>
                   <h:panelGrid id="pgToobarTable" styleClass="toobarTable" cellpadding="0" cellspacing="0" border="0" binding="#{documentBean.componentToolbar}" width="100%" />
                   <h:panelGrid id="pgForm" columns="1" cellpadding="0" cellspacing="0" border="0" binding="#{documentBean.componentForm}" width="100%" />
                  
                   <h:panelGrid columns="2" cellpadding="0" cellspacing="0" border="0" styleClass="MiddleTable"
                   style="width:100%" columnClasses="formLabels,formInputs">
                   <h:outputText value="附件:" />
                  
                  
                   <rich:dataTable id="dataTableAttach" value="#{documentBean.attachmentArray}" var="documentAttachment" width="100%" rowClasses="oddRow,evenRow" rowKeyVar="rowKey">
                   <rich:column>
                   <h:outputText value="(#{rowKey + 1})" />
                   <a4j:commandLink value="#{documentAttachment.fileName}" onclick="editAttachment('#{documentAttachment.fileName}','http://127.0.0.1:8080/oa-web/client/DownloadController?attach_id=#{documentAttachment.id}');return false;" bypassUpdates="true"/>
                   <rich:spacer width="10px"></rich:spacer>
                   <a4j:commandLink value="" onclick="if(!confirm('您确定è¦�删除æ¤è¡Œå�—?')){return false;}" action="#{documentBean.delAttachment}" reRender="dataTableAttach">
                   <a4j:actionparam name="param0" assignTo="#{documentBean.selectedId}" value="#{rowKey}"/>
                   <h:outputText value="[#{msgs.delete}]" />
                   </a4j:commandLink>
                   </rich:column>
                   </rich:dataTable>
                  
                  
                   </h:panelGrid>
                   <h:panelGroup style="width:100%" styleClass="FooterTable">
                   <OBJECT id="editCtrl" classid="clsid:8E0D9ABB-58AA-4E39-841D-36BDBC9BD795" width="100%" height="400" style="position: absolute; z-index: 0;" hspace="10px"></OBJECT>
                   </h:panelGroup>
                   </rich:panel>
                   <a4j:jsFunction name="rerenderPanel" action="#{modelPanelBean.rerenderPanel}" requestDelay="100" oncomplete="#{rich:component('modalPanel')}.show();return false;" reRender="modalPanel" ajaxSingle="true">
                   <a4j:actionparam name="param0" assignTo="#{modelPanelBean.title}" />
                   <a4j:actionparam name="param1" assignTo="#{modelPanelBean.width}" />
                   <a4j:actionparam name="param2" assignTo="#{modelPanelBean.height}" />
                   <a4j:actionparam name="param3" assignTo="#{modelPanelBean.viewId}" />
                   </a4j:jsFunction>
                  
                   </a4j:form>
                   <a4j:include viewId="/client/fomModelPanel.jsp" />
                  
                   </a4j:region>
                  </f:view>
                  
                  
                  


                  fomModelPanel.jsp
                  <%@ page language="java" contentType="text/html; charset=UTF-8"
                   pageEncoding="UTF-8"%>
                  <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
                  <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
                  <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
                  <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
                  
                  
                  <rich:modalPanel id="modalPanel" minWidth="#{modelPanelBean.width}"
                   minHeight="#{modelPanelBean.height}" top="200" autosized="true" style="z-index:2020;">
                   <f:facet name="header">
                   <h:outputText value="#{modelPanelBean.title}" />
                   </f:facet>
                   <f:facet name="controls">
                   <h:panelGroup>
                   <h:graphicImage value="/images/icons/close.png" style="cursor:pointer" id="hideNodeLink" />
                   <rich:componentControl for="modalPanel" attachTo="hideNodeLink" operation="hide" event="onclick" />
                   </h:panelGroup>
                   </f:facet>
                  
                   <a4j:include viewId="#{modelPanelBean.viewId}" rendered="#{modelPanelBean.renderSubView}" />
                  
                  </rich:modalPanel>