I am creating rows dynamically in my vf page.. In that row i have two picklist fields and 7 text fields.. I want when i will press copy commandlink the values from previous rows will get copied to the current one.
On initial page load , 5 rows default is created..
Hence i am finding difficult how to find which row index i need to copy..
Can anybody share some examples..
I have kept evrything in a wrapper class..Below is my controller. I need a method for copyrow values.
<apex:commandLink value="Copy" action="{!cloneWrappeer}" reRender="pb">
<apex:param assignTo="{!chosenRow}" name="chosenRow" value="{!acc.index}"/>
</apex:commandLink>
acc - is my wrapper class var in pageblocktable.. Custom_Package__c is my object and i have field like -
Name - Market - State -
attendeeList1 - Wrapper class instance..How to copy the fields..
public void cloneWrappeer(){
for ( Integer i = 0; i < attendeeList1.size(); i++ ) {
}
}