ModalPanel losses css styles.
jalejo08 Sep 7, 2008 9:37 PMHi 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