You need to sign in to do that
Don't have an account?
Dynamically Update a Set Method?
I've been able to leverage the CalendarSimple code for our needs - however, I'm running into a challenge and can't figure out a way to make it work without creating several different pages to rerender based on input.
VF Page - combines two includes. On the left I have a list of people that I can select from, on the right I have a calendar with associated open slots of time. When a person is selected, it refreshes the right side (calendar) with all available slots of time using two variables passed in the url. I'd like to allow the user to change the calendar view (availability) based on certain criteria after the screen has refreshed. The code:
public CalendarMonth getMonth() { return month; }
private void setMonth(Date d) {
month = new CalendarMonth(d);
system.assert(month != null);
Date[] da = month.getValidDateRange(); // gather events that fall in this month
events = [ select id,subject,availability__c,description,activitydate,activitydatetime,DurationInMinutes
from Event
where activitydate >= :da[0] AND activityDate <= :da[1] AND availability__c = 'Available' AND location__c = 'San Diego'
order by activitydatetime];
month.setEvents(events); // merge those events into the month class
}
I'd like to be able to dynamically add or change the blue text based on commandlinks on the page - without refreshing and losing the params that have been passed.
How can I dynamically update a set method?
Thank you.
Dave
1) Create variable in your controller:
2) Initialize the values with your desired defaults:
3) Change your query to use the new value:
4) Create action functions to change the value: