public class InvoiceLines {
public List<InvoiceWrap> invoices {set;get;}
public InvoiceLines(){
invoices=new List<InvoiceWrap>();
for(Integer i=1;i<=3;i++){
InvoiceWrap iw=new InvoiceWrap();
[Link](iw);
}
}
public void show(){
List<InvoiceWrap> selected=new List<InvoiceWrap>();
for(InvoiceWrap iw:invoices){
if([Link]==true){
[Link](iw);
}
}
[Link]();
[Link](selected);
}
}
Visualforce Page :
<apex:page controller="InvoiceLines">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Submit" action="{!show}" />
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!invoices}" var="a">
<apex:column >
<apex:facet name="header"><apex:inputCheckBox /></apex:facet>
<apex:inputCheckBox value="{![Link]}" />
</apex:column>
<apex:column headerValue="InvoiceNo">
<apex:inputText value="{![Link]}" />
</apex:column>
<apex:column headervalue="Amount" >
<apex:inputText value="{![Link]}" />
</apex:column>
<apex:column headerValue="Tax" >
<apex:inputText value="{![Link]}" />
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>