You need to sign in to do that
Don't have an account?
Carter85
Need help capturing a value from a single row in a table with a wrapper class.
I'm trying to pull a single value from a row in a table contained within a wrapper class so I can just execute a method based on that user selected item but I'm having an issue. My VF markup for the table is as follows:
Any help would be appreciated.
<apex:pageBlockTable value="{!pendList}" style="border:1px solid black;" var="p" rendered="{!NOT(ISNULL(pendList))}"> <apex:column style="border:1px solid black; text-align:center; font-weight:bold; color:blue;" value="{!p.pIssue.Name}" headerValue="Claim Number"/> <apex:column style="border:1px solid black; text-align:center; width:105px" value="{!p.pIssue.MAG_Claim__r.Contract_Holder__r.Policy_Type__c}" headerValue="Policy Type"/> <apex:column style="border:1px solid black; text-align:center; width:105px" value="{!p.pIssue.CreatedDate}" headerValue="Date Opened"/> <apex:column style="border:1px solid black; text-align:center; width:105px" value="{!p.pIssue.RecordType.Name}" headerValue="Claim Type"/> <apex:column style="border:1px solid black; text-align:center; width:105px" value="{!p.pIssue.Damage_Type__c}" headerValue="Type of Loss"/> <apex:column style="border:1px solid black; text-align:center; width:105px; font-weight:bold; color:blue;" value="{!p.pIssue.Component_Status__c}" id="note" headerValue="Status"/> <apex:column headerValue="Check/Add Attachments" style="border:1px solid black; text-align:center;" width="50px"> <apex:param assignTo="{!issID}" value="{!p.pIssue.ID}"/> <apex:commandLink style="align:center" action="{!checkAttach}" rendered="{!p.pIssue.Component_Status__c == 'Pending'}">Check/Add</apex:commandLink> </apex:column> </apex:pageBlockTable>And the method checkAttach(), which I'm trying to utilize on whichever row the user clicks the command link on looks like this so far:
public pageReference checkAttach(){ system.debug(issID); fileList = [SELECT Name, ContentType, Description FROM Attachment WHERE Parent.ID =: issID]; if((!fileList.isEmpty())){ FOUND = true; this.message = null; return page.CM_WebClaimFileCheck; } else{ this.message = 'No files attached.'; return page.CM_WebClaimFileCheck; } return null; }I was hoping the <apex:param assignTo="{!issID}" value="{!p.pIssue.ID}"/> would take care of assiging that particular table item's ID to the ID variable I created, but it doesn't seem to assign the value as my debug statement claims it remains null.
Any help would be appreciated.
All Answers