Datatable inside a dialog does to fill data

UI Components for JSF
Post Reply
macros14
Posts: 46
Joined: 26 Feb 2010, 19:44

31 Mar 2011, 22:12

I have the following code

Code: Select all

<p:dialog header="LP Insurance Debt Pad" widgetVar="lpDebtPad">
                    <h:dataTable var="debtLine" value="#{cc.attrs.insuranceApplication.debtLineList}">
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="Payment" />
                            </f:facet>
                            <h:outputText value="#{debtLine.payment}"/>
                        </p:column>
                    </h:dataTable>
                    <p:dataTable var="debtLine" dynamic="false" value="#{applicationController.selectedInsuranceApplication.debtLineList}">
                        <p:column sortBy="#{debtLine.payment}">
                            <f:facet name="header">
                                <h:outputText value="Payment" />
                            </f:facet>
                            <h:outputText value="#{debtLine.payment}"/>
                        </p:column>
                    </p:dataTable>
                </p:dialog>
When the dialog is opened from a button action, the dialog displays fine, and the regular datatable is filled with data. The primefaces datatable just says loading. It doesn't matter if I have dynamic set to true or false. If I have the dynamic set to true, and then sort on a column data is displayed, but not when the dialog is opened which should be the case.

It looks like the data is in the generated html, but for whatever reason isn't being displayed (possibly because 'hidden:true')...

Code: Select all

<script type="text/javascript">var widget_j_idt174_j_idt606_j_idt1165_columnDef = [{key:'j_idt174:j_idt606:j_idt1165:j_idt1166',label:'RyanPayment',sortable:true},{key:'rowIndex', hidden:true}];
var widget_j_idt174_j_idt606_j_idt1165_datasource = new YAHOO.util.DataSource(YAHOO.util.Dom.get('j_idt174:j_idt606:j_idt1165_table'));
widget_j_idt174_j_idt606_j_idt1165_datasource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
widget_j_idt174_j_idt606_j_idt1165_datasource.responseSchema = {fields:[{key:'j_idt174:j_idt606:j_idt1165:j_idt1166'},{key:'rowIndex'}]};
widget_j_idt174_j_idt606_j_idt1165 = new PrimeFaces.widget.DataTable('j_idt174:j_idt606:j_idt1165',widget_j_idt174_j_idt606_j_idt1165_columnDef,widget_j_idt174_j_idt606_j_idt1165_datasource, {dynamicData:true,formId:'j_idt174:j_idt606:approvalForm',url:'/lp/faces/application/InsuranceApproval.xhtml'});</script>

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

31 Mar 2011, 22:14

I think you are using an ancient version of PrimeFaces, what is it?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 42 guests