p:calendar doesn't work inside dynamic datatable

UI Components for JSF
Post Reply
rahul_dm
Posts: 53
Joined: 12 Mar 2010, 19:02
Contact:

22 Apr 2010, 11:22

p:calendar doent work inside dynamically added rows of p:dataTable

here is my code.

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <f:view contentType="text/html">
        <h:head>
            <title>Title</title>
        </h:head>
        <h:body>
            <h:form id="test" prependId="false">
                <p:commandButton value="Find" action="#{Test1Bean.testcal}"
                              process="@this" update="myTable"/>

                <p:dataTable id="myTable" var="item" value="#{Test1Bean.test1EntityList}"
                             dynamic="true" paginator="true" rows="5" >
                    <p:column >
                        <f:facet name="header">
                            <h:outputText value="Date"/>
                        </f:facet>
                        <p:calendar/>
                    </p:column>

                </p:dataTable>

            </h:form>
        </h:body>
    </f:view>

</html>
i am populated list object to show in datatable,
but when my datatable is populated p:calendar doesn't respond.

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

24 Apr 2010, 01:30

Does it not respond for the first time or after pagination. Frankly you might have performance issues if you have a calendar for each rows. Having one calendar outside of datatable and triggering it from a row would perform better.

gfcarvalho
Posts: 12
Joined: 25 May 2010, 14:14

10 Jun 2010, 15:53

cagatay.civici wrote:Having one calendar outside of datatable and triggering it from a row would perform better.
I have the same problem. I need a calendar on each row of dataTable.
Could you show an example?
Thanks.

gfcarvalho
Posts: 12
Joined: 25 May 2010, 14:14

14 Jun 2010, 19:13

cagatay,
despite the performance issues, is there a way to include a <p:calendar> or <p:inputMask mask="99/99/9999"> within a <p:dataTable> ?
cagatay.civici wrote: Having one calendar outside of datatable and triggering it from a row would perform better.
I did what you suggested and it works.
But visually, this solution was not good. I really need to include this components inside dataTable =(

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests