function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Varun AnnadataVarun Annadata 

Apex:repeat tag passing multiple values of input field to the list in apex controller

Vf Page
<apex:page standardcontroller="Program_Member_MVN__c" extensions="ProgramMemberCaseAttachment" showHeader="false" >
        <apex:includescript value="//" / >
        <apex:includescript value="//" />
        <apex:stylesheet value="//" />
            j$ = jQuery.noConflict();
            j$(document).ready( function () {
                var contactTable = j$('[id$="accounttable"]').DataTable({
            <apex:form >
            <table id="accounttable" class="display"  >
                    <th>Case Number/PM Number</th>
                <apex:variable var="index" value="{!1}"/>
                <apex:repeat value="{!wrapAttachmentList}" var="N"> 
                    <apex:pageBlockTable value="{!PMTyperesults}" var="dimension2">
                    <apex:column value="{!dimension2.Type__c}"/>
                        <td><apex:commandLink value="save" action="{!processSelected}">
                        <apex:param name="Attid" value="{!}" assignTo="{!Attid}"/>
                        <apex:variable var="index" value="{!index+1}"/>
                        <td><apex:inputField value="{!N.Att.Type__c}">
                    <!--<apex:param name="AttType" value="{!N.Att.Type__c}" assignTo="{!AttType1}"/>-->

                    <!--<td><apex:outputtext value="{!Attid}"/></td>-->
                    <td><apex:outputLink value="/{!N.At.ParentId}" target="_blank">{!N.At.Parent.Name}</apex:outputLink></td> 
                    <td><apex:outputLink value="/{!}" target="_blank">{!N.At.Name}</apex:outputLink></td>
                    <td><apex:outputLink value="/{!N.At.CreatedById}" target="_blank">{!N.At.CreatedBy.Name}</apex:outputLink></td>
                    <apex:outputField value="{!N.At.Description}"/></td>


Apex Class
 *  ProgramMemberCaseAttachment
 *  Created By:     Varun 
 *  Created On:     11/07/2017
 *  Description:    This class is responsible for displaying Attachment Details
                     Under Each Program Member
public with sharing class ProgramMemberCaseAttachment{

    //public List<Attachment_Type__c> Type{get;set;}

    public string AttType{get;set;}

    public Id Attid{get;set;}

    public List<wrapAttachment> wrapAttachmentList {get; set;}
    public List<Attachment> PMresults{get;set;}
    public List<Attachment_Type__c> PMTyperesults{get;set;}
    public Program_Member_MVN__c cs;
    public ProgramMemberCaseAttachment(ApexPages.StandardController controller)
    wrapAttachmentList = new List<wrapAttachment>();
    List<case> Test = new List<case>([select id from case where Program_Member_MVN__c =:]);
    PMresults = [select CreatedBy.Name,OwnerId,ParentId,Parent.Name,Id,Name,LastModifiedById,CreatedById,LastModifiedDate, Description from Attachment where parentid =: OR parentid IN:Test ];
    for(Attachment a : PMresults) {
            wrapAttachmentList.add(new wrapAttachment(a));

    /*PMTyperesults = new List<Attachment_Type__c>();
    for(Attachment_Type__c b : PMTyperesults) {
            wrapAttachmentList.add(new wrapAttachment(b));

    public void processSelected(){
    List<Attachment_Type__c> PMType = new List<Attachment_Type__c>();
    Attachment_Type__c At1 = new Attachment_Type__c ();
    for(wrapAttachment Wp : wrapAttachmentList ){
    if(Wp.Att.Type__c != null){
    At1 = [select Type__c from Attachment_Type__c where Attachment_Id__c =: Attid];
    if(At1.Type__c  != null){
    At1.Type__c  = Wp.Att.Type__c;
          set<Attachment_Type__c> dedupSet = new set<Attachment_Type__c>();
          List<Attachment_Type__c> dedupList = new List<Attachment_Type__c>();
          Update dedupList;
          At1 = new Attachment_Type__c();
    //update PMType;
     public class wrapAttachment {
        public Attachment At {get; set;}
        public Attachment_Type__c Att{get; set;}
        public string AttType1{get;set;}
        public wrapAttachment(Attachment a) {
            At = a;
            Att = new Attachment_Type__c();
I am passing the input field value from vf page to a list in apex class.But the apex:repeat tag is making all the values on the all the rows to get passed into the List in Apex Controller.How can i make value on the row which i select to only get passed?

My Vf page

User-added image