0

我使用了这个例子: Integrating jquery datepicker into jsf

dataTable 的第一行带有日历图标,但其余行没有。该表是动态的,并且基于从支持 bean 中的查询中选择的行。

这是我所拥有的:

<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<f:view>
<custom:html>
 <custom:head>
 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <!-- jQuery -->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.22/jquery-ui.min.js"></script>
    <!-- required plugins -->
    <script type="text/javascript" src="../scripts/date.js"></script>
    <!-- jquery.datePicker.js -->
    <script type="text/javascript" src="../scripts/jquery.datePicker.js"></script>  
    <!-- datePicker required styles -->
    <link rel="stylesheet" type="text/css" media="screen" href="../styles/datePicker.css">
    <!-- page specific styles -->
    <link rel="stylesheet" type="text/css" media="screen" href="../styles/ewrwsdatepicker.css">

    <!-- page specific scripts -->
    <script type="text/javascript" charset="utf-8">
    $(document).ready(function() {
    // Shared properties for all datepickers with class="date-pick"
        $('.date-pick').datePicker({clickInput:true,startDate:'01/01/1996'});
        });
    </script>

</custom:head>
<custom:body>
<h:form id="adminSubmittedReportScreen">

<div id="content">
<div class="container"> 

<h:outputText value="&lt;br/&gt;" escape="false" />            
<h:outputText value="&lt;br/&gt;" escape="false" />            
<h:outputText value="&lt;br/&gt;" escape="false" />
<h:outputText style="font-family: Verdana; font-size:14px; font-weight:bold;" value="Some Data"/>
<h:dataTable id="adminDatafor" border="0"           
    styleClass="weeklyStatus"
    value="#{viewAdminSubmittedReport.performerWorkList}"
    rowClasses="#{viewAdminSubmittedReport.rowColor}"
    var="performerWorkList"> 
    <h:column>
        <f:facet name="header"><h:outputText value="Customer"/></f:facet>
        <h:outputText title="Customer" style="width: 100px;" value="#{performerWorkList.customer}"/>
    </h:column>
    <h:column>
        <f:facet name="header"><h:outputText value="Location"/></f:facet>
        <h:outputText style="width: 65px;" title="Location" value="#{performerWorkList.location}"/>
    </h:column>
    <h:column>
        <f:facet name="header"><h:outputText value="Actual Start Date" escape="false"/></f:facet>
        <h:inputText id="startDate" title="Actual Start Date" styleClass="date-pick" style="width: 75px;#{performerWorkList.init_actualStartDateHL}" value="#{performerWorkList.actualStartDateToActivity}" valueChangeListener="#{listController.filterFieldChanged}"><f:convertDateTime type="date" pattern="MM-dd-yyyy"/>
        </h:inputText>
    </h:column>
</h:dataTable>

</body>
</html>

</div>
</div>

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

如何获取剩余行的工作日期?

谢谢!

4

0 回答 0