You need to sign in to do that
Don't have an account?
Please help with test script for VF page that references a list in the controller
Hi,
I wrote some code that uses a helper class and stores the items in a list which feeds the pageBlockTable on the VF page. This helper class has a boolean which is my checkbox on the VF page. How can I write the test class to check one of the records? Not to over populate this post I have snippets of the VF and controller. I am still struggling with test code scripts. If you need me to post all the code in order for you to help me on this issue I can.
I'm not sure how I get the test class to check one of the records that show on the VF page. I appreciate your help. Mean while I will keep hacking a way at this!
VF PAGE:
<apex:pageblocktable value="{!UserChatterGroupList}" var="item" rowClasses="even,odd"> <apex:column headervalue="Select Record" headerClass="ColumnHeaders" width="80"> <apex:inputcheckbox value="{!item.recordSelect}"/> </apex:column>
Controller Class:
public class CFCT_UsersNotInChatterGroups_Controller { public String ChatterGroupsMissingMessage { get; set; } public List<HelperClass> UserChatterGroupList { get; set; } ... ... ... // Helper Class public class HelperClass { public boolean recordSelect {get; set;} public Id GroupId {get; set;} public id UserId {get; set;} public String UserName {get; set;} public String ChatterGroupName {get; set;} } }
Likewise you can select few other elements in the list.
All Answers
Likewise you can select few other elements in the list.