You need to sign in to do that
Don't have an account?
How to Use List Data in the Visual Force Page?
public class DisplayActivities{
public DisplayActivities() {
}
public DisplayActivities(ApexPages.StandardController controller) {
}
List<Task> activities;
List<Event> activities1;
List<Date> janlist;
List<Date> feblist;
List<Date> marlist;
List<Date> aprlist;
List<Date> maylist;
List<Date> junlist=new List<Date>();
List<Date> jullist=new List<Date>();
List<Date> junlist1=new List<Date>();
List<Date> jullist1=new List<Date>();
public Date activity{get;set;}
public Integer a{get;set;}
public List<Event> getActivities1()
{
activities1=[select ActivityDate FROM Event];
for(Event t1:activities1)
{
if(t1.ActivityDate!=NULL)
a=t1.ActivityDate.month();
if(a==1)
{
janlist.add(t1.ActivityDate);
}
else if(a==2)
{
feblist.add(t1.ActivityDate);
}
else if(a==3)
{
marlist.add(t1.ActivityDate);
}
else if(a==4)
{
aprlist.add(t1.ActivityDate);
}
else if(a==5)
{
maylist.add(t1.ActivityDate);
}
else if(a==6)
{
junlist1.add(t1.ActivityDate);
System.debug('____'+junlist);
}
else{
jullist1.add(t1.ActivityDate);
System.debug('____'+jullist);
}
}
return activities1;
}
public list<Task> getActivities() {
activities=[select ActivityDate FROM Task];
//activity=activities[0].ActivityDate;
//a=activity.month();
for(Task t:activities)
{
if(t.ActivityDate!=NULL)
a=t.ActivityDate.month();
if(a==1)
{
janlist.add(t.ActivityDate);
}
else if(a==2)
{
feblist.add(t.ActivityDate);
}
else if(a==3)
{
marlist.add(t.ActivityDate);
}
else if(a==4)
{
aprlist.add(t.ActivityDate);
}
else if(a==5)
{
maylist.add(t.ActivityDate);
}
else if(a==6)
{
junlist.add(t.ActivityDate);
System.debug('____'+junlist);
}
else{
jullist.add(t.ActivityDate);
System.debug('____'+jullist);
}
}
return activities;
}
public List<Date> getJunlist()
{
return junlist;
}
public List<Date> getJullist()
{
return jullist;
}
public List<Date> getJunlist1()
{
return junlist1;
}
}
How to use the Date Values that was inserted into the List<Date> junlist by using junlist in the visual force page and display them on the console?
You can use apex:repeat or apex;pageblocktable or apex:datatable to display a list of values... Is this what you are looking for?