-
1. Re: modalpanel "in" modalpanel showing data problem
ilya_shaikovsky Oct 15, 2010 5:28 AM (in response to renegritsch)please show the code.
-
2. Re: modalpanel "in" modalpanel showing data problem
renegritsch Oct 15, 2010 5:49 AM (in response to ilya_shaikovsky)First Modal Panel
{code:xml}<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:a4j="http://richfaces.org/a4j" xmlns:f="http://java.sun.com/jsf/core" xmlns:fipos="http://enhancements.fipos/jsf" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:ui="http://java.sun.com/jsf/facelets">
<TABLE align="center" cellspacing="1" border="0" style="table-layout:fixed" width="100%">
<COLGROUP>
<COL width="45%"/>
<COL width="10%"/>
<COL width="45%"/>
</COLGROUP>
<THEAD>
<TR>
<TD valign="top">
<a4j:jsFunction name="selectEntry" action="#{partyTurntableButtonController.overtakePartyFromPreviousPartiesToCurrentParties}" reRender="panelPartnerTurntable"/>
<rich:extendedDataTable
id="idPartyDataListPrevious"
width="100%"
height="140px"
sortMode="single"
selectionMode="single"
ajaxRendered="true"
value="#{model.previousUsedParties}"
selection="#{turntableExtendedDatatableBinding.selectionPreviousParties}"
rows="10"
var="row">
<a4j:support ajaxSingle="true" limitToList="true" immmediate="true" event="onclick" bypassUpdates="true" reRender="buttonOvertakePreviousParties"/>
<a4j:support ajaxSingle="true" limitToList="true" immmediate="true" event="onRowDblClick" bypassUpdates="true" oncomplete="selectEntry();" />
<rich:column headerClass="dataTableHeader" width="100%" label="Beschreibung" sortable="false" sortBy="#{row.preview}">
<rich:dragSupport dragIndicator=":indicator" dragType="party" dragValue="#{row}" acceptedTypes="party">
<rich:dndParam name="label" value="#{row.preview}" />
</rich:dragSupport>
<f:facet name="header">
<h:outputText value="zuletzt verwendete Partner" />
</f:facet>
<h:outputText value="#{row.preview}" />
</rich:column>
</rich:extendedDataTable>
<rich:spacer height="10px"/>
<rich:extendedDataTable
id="idPartyDataListRelation"
width="100%"
height="140px"
sortMode="single"
selectionMode="single"
ajaxRendered="true"
value="#{model.partiesInRelation}"
rows="10"
var="row">
<a4j:support ajaxSingle="true" limitToList="true" immmediate="true" bypassUpdates="true" event="onclick" reRender="buttonOvertakePreviousParties"/>
<a4j:support ajaxSingle="true" limitToList="true" immmediate="true" bypassUpdates="true" event="onRowDblClick" oncomplete="selectEntry();" />
<rich:column headerClass="dataTableHeader" width="100%" label="Beschreibung" sortable="false" sortBy="#{row.preview}">
<f:facet name="header">
<h:outputText value="in Beziehung stehende Partner" />
</f:facet>
<h:outputText value="#{row.preview}" />
</rich:column>
</rich:extendedDataTable>
</TD>
<TD valign="middle" align="center">
<a4j:commandButton
id="buttonOvertakePreviousParties"
disabled="#{model.selectedPreviousParties == null || model.selectedPreviousParties.size == 0}"
reRender="panelPartnerTurntable"
limitToList="true"
ajaxSingle="true"
immediate="true"
action="#{partyTurntableButtonController.overtakePartyFromPreviousPartiesToCurrentParties}"
value=">>"
style="max-width:100px; width:100%; min-width:28px;"
/>
<rich:spacer height="30px"/>
</TD>
<TD valign="top">
<a4j:outputPanel id="idSelectedParty" ajaxRendered="true">
<table style="width:100%;">
<tr>
<td valign="top">
<fipos:include model="#{model.selectedPartyDisabled}" page="/gui/party/turntable/partyPreview.xhtml"/>
</td>
</tr>
<tr>
<td align="right">
<fipos:include model="#{model}" page="/gui/party/turntable/fastPartyNewEdit.xhtml"/>
</td>
</tr>
</table>
<rich:dropSupport
acceptedTypes="party"
dropListener="#{partyTurntableButtonController.dropPartyToCurrent}"
reRender="panelPartnerTurntable"
ajaxSingle="true"
limitToList="true"
/>
</a4j:outputPanel>
</TD>
</TR>
<TR><TD colspan="3"><rich:spacer height="10px"/><rich:separator/><rich:spacer height="10px"/></TD></TR>
<TR>
<TD valign="top">
<fipos:include model="#{model}" page="/gui/party/turntable/fastPartySearch.xhtml"/>
</TD>
</TR>
</THEAD>
</TABLE>
</ui:composition>
{code}fastPartySearch.xhtml
{code:xml}
<t:fieldset legend="Schnellsuche">
<table align="left" cellspacing="1" style="table-layout:fixed" width="100%">
<tr align="top" valign="top">
<td align="left" rowspan="1" valign="top">
<fipos:smartField binding="#{model.searchSureName}" guiProperties="#{model.guiProps.searchSureName}" id="fastPartySearchSureName" label="Nachname"/>
</td>
</tr>
<tr>
<td align="left" rowspan="1" valign="top">
<fipos:smartField binding="#{model.searchFirstName}" guiProperties="#{model.guiProps.searchFirstName}" id="fastPartySearchFirstName" label="Vorname"/>
</td>
</tr>
<tr align="left">
<td valign="bottom">
<a4j:commandButton
style="width:150px"
immediate="true"
ajaxSingle="true"
action="#{partyTurntableButtonController.fastSearchForParty}"
reRender="modalContentPartnerSearch,fastpartyDataList"
limitToList="true"
oncomplete="Richfaces.showModalPanel('panelPartnerSearch');"
status="waitStatus"
value="Suchen">
</a4j:commandButton>
</td>
</tr>
</table>
</t:fieldset>{code}
2nd modal panel panelPartnerSearch
{code:xml}
<rich:modalPanel id="panelPartnerSearch" minWidth="600" maxHeight="350" autosized="true" reRenderAfterComplete="modalContentPartnerSearch">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Partnersuche"></h:outputText>
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<h:graphicImage value="#{resources.image('message.close')}" height="16" width="16" styleClass="hidelink" id="mdi"/>
<rich:componentControl for="panelPartnerSearch" attachTo="mdi" operation="hide" event="onclick"/>
</h:panelGroup>
</f:facet>
<a4j:form id="panelFormFastPartySearch">
<a4j:outputPanel id="modalContentPartnerSearch" ajaxRendered="true">
<table width="100%">
<tr align="left">
<td>
<h:panelGrid columns="1">
<a4j:jsFunction name="selectEntry" action="#{partyTurntableButtonController.fastSearchOvertakeSelectedParties}" reRender="panelPartnerTurntable"/>
<rich:datascroller for="fastpartyDataList"/>
<rich:extendedDataTable
id="fastpartyDataList"
width="600px"
height="350px"
sortMode="single"
selectionMode="multi"
value="#{turntableFastSearchModel.partyDataList}"
selection="#{turntableFastSearchDatatableBinding.selection}"
binding="#{turntableFastSearchDatatableBinding.dataTable}"
rows="20"
var="row">
<a4j:support event="onclick" limitToList="true" immmediate="true" bypassUpdates="true"/>
<a4j:support event="onRowDblClick" limitToList="true" immmediate="true" bypassUpdates="true" oncomplete="selectEntry();Richfaces.hideModalPanel('panelPartnerSearch');" />
<rich:column headerClass="dataTableHeader" width="100"
label="Actions" sortable="false">
<f:facet name="header">
<h:outputText value="Aktionen" />
</f:facet>
</rich:column>
<rich:column headerClass="dataTableHeader" width="50"
label="Id" sortable="true" sortBy="#{row.ID}">
<f:facet name="header">
<h:outputText value="Id" />
</f:facet>
<h:outputText value="#{row.ID}" />
</rich:column>
<rich:column headerClass="dataTableHeader" width="300"
label="Name" sortable="true" sortBy="#{row.preview}"
filterBy="#{row.preview}" filterEvent="onkeyup">
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<h:outputText value="#{row.preview}" />
</rich:column>
<rich:column headerClass="dataTableHeader" width="100"
label="Birthdate" sortable="true" sortBy="#{row.birthdate}">
<f:facet name="header">
<h:outputText value="Geburtsdatum" />
</f:facet>
<h:outputText value="#{row.geburtsdatum}" />
</rich:column>
</rich:extendedDataTable>´
<rich:datascroller for="fastpartyDataList"/>
</h:panelGrid>
</td>
</tr>
</table>
</a4j:outputPanel>
<rich:spacer height="3" />
<t:fieldset>
<table width="100%">
<tr align="right">
<td>
<a4j:commandButton id="fastPartySearchCancelButton"
onclick="Richfaces.hideModalPanel('panelPartnerSearch');"
value="#{convertHelper.getButtonLabel('buttonbar.product.cancel')}"
style="width:#{convertHelper.calculateButtonSize('buttonbar.product.cancel')}px"
type="reset"
/>
<a4j:commandButton id="test"
value="refresh"
style="width:#{convertHelper.calculateButtonSize('buttonbar.product.cancel')}px"
status="waitStatus"
reRender="modalContentPartnerSearch"
/>
<a4j:commandButton id="fastPartySearchOKButton"
oncomplete="Richfaces.hideModalPanel('panelPartnerSearch');"
value="#{convertHelper.getButtonLabel('buttonbar.product.ok')}"
ajaxSingle="true"
status="waitStatus"
reRender="panelPartnerTurntable"
action="#{partyTurntableButtonController.fastSearchOvertakeSelectedParties}"
style="width:#{convertHelper.calculateButtonSize('buttonbar.product.ok')}px"
/>
</td>
</tr>
</table>
</t:fieldset>
</a4j:form>
</rich:modalPanel>{code}
-
3. Re: modalpanel "in" modalpanel showing data problem
renegritsch Oct 15, 2010 5:49 AM (in response to renegritsch)do you need the java code as well?