I've tried various iterations but this is what I have right now. This is the main code from VF Page:
<div>
<h3>Search Groups</h3>
<apex:form >
<apex:inputText id="groupName" list="{!listOfStrings}" value="{!groupname}"/>
<apex:commandButton value="Submit" reRender="wrapper" action="{!retrieveGroupMembers}"/>
</apex:form>
</div>
<apex:pageblock >
<apex:outputPanel id="wrapper">
<apex:repeat value="{!PGM}" var="u">
<div class="view view-seventh">
<!--<img src="{!u.FullPhotoUrl}" />-->
<div class="mask">
<h2>{!u.users.CompanyName}</h2>
<a href="#" class="info">Read More</a>
</div>
</div>
</apex:repeat>
</apex:outputPanel>
The Apex:
public string groupName{get;set;}
public User[] users{get;set;}
public List<PublicGroupsMembers> PGM {get; set;}
public void retrieveGroupMembers(){
// Get the users.
PublicGroupsMembers pgm = new PublicGroupsMembers();
List<PublicGroupsMembers> lPGM = new List<PublicGroupsMembers>();
users = [Select AboutMe,FirstName,LastName,AccountId,IsActive,CompanyName,ContactId,Department,Email,ManagerId,Phone,ProfileId,UserRoleId,Title,SmallPhotoUrl,FullPhotoUrl,Id,UserType,Username FROM User WHERE Id IN (SELECT UserOrGroupId FROM GroupMember WHERE Group.Name IN (:groupName))];
for(user u:users){
pgm.users = u;
pgm.SmallPhotoUrl = u.SmallPhotoUrl;
pgm.FullPhotoUrl = u.FullPhotoUrl;
PGM = pgm;
}
}
public class PublicGroupsMembers{
public User users;
public string SmallPhotoUrl;
public string FullPhotoUrl;
}
if I use "{!users}" instead of "{!PGM}" it will work. Any guidance is appreciated.