2 Replies Latest reply on Sep 8, 2008 12:50 PM by jalejo08

    ModalPanel losses css styles.

      Hi ppl.
      I have a dataTable with some values; the last column is a commandButton to my modalPanel. In this modalPanel I show some aditional details.
      When I load the page and click in any row to show the corresponding modalPanel, It works ok, but if I apply a sort in the dataTable or change any other property of datatable, the next time I want to show the modalPanel, it losses partial styles.

      The first time that I show the modalPanel is:
      [url=http://img84.imageshack.us/my.php?image=beforekh7.jpg][img]http://img84.imageshack.us/img84/2156/beforekh7.th.jpg[/img][/url]

      When I modify the dataTable whit some ajax request, by example with filter or sorting, and reload my modalPanel, it change:
      [url=http://img213.imageshack.us/my.php?image=afterfm6.jpg][img]http://img213.imageshack.us/img213/6938/afterfm6.th.jpg[/img][/url]

      This is my code:

      <a4j:form id="fOrdersList">
       <rich:dataTable value="#{orderVOBean.orders}" var="order"
       styleClass="list" id="tableOrders" rows="15" width="100%"
       rowKeyVar="rowIndex" rowClasses="row_0,row_1" >
       <f:facet name="header">
       <h:outputText value="LISTADO PRINCIPAL"/>
       </f:facet>
       <rich:column width="70px">
       <f:facet name="header">
       <t:outputText>Pedido No.</t:outputText>
       </f:facet>
       <t:outputText value="#{order.order.idOrder}" />
       </rich:column>
       <rich:column>
       <f:facet name="header">
       <t:outputText>Cliente</t:outputText>
       </f:facet>
       <t:outputText value="#{order.customer.name}" />
       </rich:column>
       <rich:column width="75px" style="text-align:right;" sortBy="#{order.date_in}" >
       <f:facet name="header">
       <t:outputText>Registro</t:outputText>
       </f:facet>
      
       <t:outputText value="#{order.date_in}" />
       </rich:column>
       <rich:column width="60px" style="text-align:center;">
       <f:facet name="header">
       <t:outputText>Detalles</t:outputText>
       </f:facet>
       <a4j:commandLink id="link" action="#{orderDTOBean.loadData}" style="color:black;"
       ajaxSingle="true" reRender="regionData, productsList">Ver...
       <rich:componentControl for="panelData" operation="show" event="onclick"/>
       <f:param name="idOrder" value="#{order.order.idOrder}" />
       <a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender" />
       </a4j:commandLink>
       </rich:column>
       <f:facet name="footer">
       <rich:datascroller align="center" for="tableOrders" maxPages="10"
       id="scrollOrder" renderIfSinglePage="false" />
       </f:facet>
       </rich:dataTable>
       </a4j:form>
      .....
      <rich:modalPanel id="panelData" width="#{720}" height="#{450}"
       style="text-align:left">
       <f:facet name="header">
       <h:panelGroup>
       <h:outputText id="panelTitle" value="Detalles del Pedido - #{orderDTOBean.status}"></h:outputText>
       </h:panelGroup>
       </f:facet>
       <f:facet name="controls">
       <h:panelGroup>
       <h:graphicImage value="../../images/design/exit.png"
       style="cursor:pointer" id="hidelink" />
       <rich:componentControl for="panelData" attachTo="hidelink"
       operation="hide" event="onclick" />
       </h:panelGroup>
       </f:facet>
      
       <jsp:include page="orderDetail.jsp"></jsp:include>
      
      </rich:modalPanel>
      


      In the orderDetail. I have too 2 buttons that make ajax actions. when I use this buttons, and close the modalPanel, the next time of I show the modal panel It losses css styles too.

      I'm using:
      Tomcat 6.0
      Richfaces 3.2.1

        • 1. Re: ModalPanel losses css styles.
          ilya_shaikovsky

          1) open modal panel on oncomplete of ajax controls instead of onclick.

          2) try to reRender not modal panel but its content.

          3) And for sure try 3.2.2 RC4 version if this possible.

          If noting helps - paste the a4j:log generated log for the problematic request.

          • 2. Re: ModalPanel losses css styles.

            Hi.

            Thx for your reply.
            I now open modalPanel on complete instead of onclick. Is better.

            I was reRender the content of modalPanel. regionData is a outputPanel inside modalPanel. I try inverse of you say. I reRender the modalPanel instead the content of it, and It works nice.

            Thank's.