Using <h:selectManyCheckBox>
I have an object with the following properties.
public class LicenseLineDto extends ProducerDto {
private boolean selectedLine;
private String line;
private String lineStartDateString;
private String lineEndDateString;
// Getters and Setters
}
I have a screen which needs to display a table something like this.
<Checkbox>selectedLine牋牋 ?line牋牋lineStartDateString牋牋 lineEndDateString
I will have a list of the above mentioned rows on the screen. Each row in the list corresponds to an object of the class above. the line is a an output textbox, the 2 date strings are input text boxes, and there is a submit button on the screen. The user can check a checkbox enter the corresponding dates, and hit submit, the user can select multiple checkboxes and enter the dates corresponding to each checked checkbox and hit submit.
How do I code this functionality using JSF?
# 2
[nobr]I have tried that
heres the code that I have
<h:dataTable border="0" cellpadding="0" cellspacing="0"
columnClasses="columnClass1" headerClass="columnClass1"
footerClass="footerClass" rowClasses="columnClass1"
styleClass="dataTable" id="innerTable" first="0" binding="#{bean.data}"
value="#{bean.linesList}" rendered="true" var="lines" width="60%">
<h:column>
<h:selectBooleanCheckbox value="#{lines.selectedLine}" />
</h:column>
<h:column>
<f:facet name="header">
<B><h:outputText styleClass="outputText"
value="#{msg['producer.licenseLines']}" />
</f:facet>
<h:outputText styleClass="outputText" value="#{lines.line}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText styleClass="outputText"
value="#{msg['producer.licenseStartDate']}" />
</f:facet>
<h:inputText styleClass="inputText" value="#{lines.lineStartDate}" id="lineStartDate">
<f:convertDateTime type="date" pattern="MM-dd-yyyy" />
<hx:inputHelperDatePicker firstDay="0" />
</h:inputText><BR><BR>
<h:message styleClass="message" id="lineStartDateMessage" for="lineStartDate"></h:message>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText styleClass="outputText"
value="#{msg['producer.licenseEndDate']}" />
</f:facet>
<h:inputText styleClass="inputText" value="#{lines.lineEndDate}" id="lineEndDate">
<f:convertDateTime type="date" pattern="MM-dd-yyyy" />
<hx:inputHelperDatePicker firstDay="0" />
</h:inputText><BR><BR>
<h:message styleClass="message" id="lineEndDateMessage" for="lineEndDate"></h:message>
</h:column>
</h:dataTable>
But when the submit button is hit, the linesList is empty.
Thanks[/nobr]