Is it possible to use the s:selectDate component in a datatable? If so, how does one populate the "for" attribute?
<rich:dataTable id="fundings" value="#{fundings}" var="f"> <rich:column> <f:facet name="header"> <h:outputText value="#{messages.ReceivedDate}"/> </f:facet> <h:inputText id="startDate" value="#{f.receivedDate}" size="10" required="true"> <s:convertDateTime pattern="MM/dd/yyyy"/> </h:inputText> <s:selectDate for="???" dateFormat="MM/dd/yyyy" startYear="2007" endYear="2010"> <h:graphicImage url="img/dtpick.gif" style="margin-left:5px;cursor:pointer"/> </s:selectDate> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="#{messages.Amount}"/> </f:facet> <h:inputText id="amount" value="#{f.amount}" size="8" required="true"/> </rich:column> </rich:dataTable>
Hi
U have to populate the for attribute with the id of the text filed u are supposed to view the date.In this code ur value of the for attribute will be "startDate" as it is the id of the inputText