ExtendedDataTable within ModalPanel
skynan507 Feb 10, 2009 6:14 AMI have a main table (ExtendedDataTable) where I can select a single row. Based on the selection made there I retrieve and display a List of related records from DB within a dataTable.
Everything is working fine so far, but ...
The problem starts when I want to add rows to the retrieved list. To do this I have created a
<a4j:commandButton id="showAdd" value="Add row"> <rich:componentControl for="modalPanel" attachTo="output" operation="show" event="onclick"/> </a4j:commandButton>
to show a modalPanel. Within that modalPanel I present a extendedDataTable containing all possible values to add (count=11500).
If I use the parameter filterValue I obtain just the filtered things to add, thats OK. But a direct input of the value I want to use for further filtering , at the corresponding input field, results no change of the displayed data. I can not add a row because I do not get the selection either.
Is there a general (filter/selection) problem when cascading an extendedDataTable in a ModalPanel?
This is the source of my modalPanel:
<rich:modalPanel id="modalPanel" minHeight="200" minWidth="450" moveable="true"
keepVisualState="true" autosized="true">
<f:facet name="controls">
<h:panelGroup>
<h:graphicImage value="/images/close.png" styleClass="hidelink" id="hidelink" />
<rich:componentControl for="dstPanel" attachTo="hidelink" operation="hide"
event="onclick" />
</h:panelGroup>
</f:facet>
<rich:extendedDataTable value="#{myBean.editList}" var="editItem" id="editTable"
binding="#{myBean.editTable}" selection="#{myBean.editSelection}" width="40em"
height="50em" sortMode="multi" selectionMode="multi" rows="30" >
<rich:column sortable="true" sortBy="#{editItem.dstnr}" filterBy="#{editItem.dstnr}"
filterEvent="onchange" width="80px" label="Dienststellennummer" filterValue="06">
<f:facet name="header">
<h:outputText value="DSTNR" />
</f:facet>
<h:outputText value="#{editItem.dstnr}" />
</rich:column>
<rich:column sortable="true" sortBy="#{editItem.dstname}"
filterBy="#{editItem.dstname}" filterEvent="onchange" width="300px"
label="Name der Dienststelle">
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<h:outputText value="#{editItem.dstname}" />
</rich:column>
<a4j:support event="onclick" ignoreDupResponses="true" requestDelay="500"
action="#{myBean.takeEditSelection}" />
<a4j:support event="onclick" ignoreDupResponses="true" requestDelay="500"
action="#{myBean.takeEditSelection}" />
</rich:extendedDataTable>
</rich:modalPanel>