search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How can I update the view after changing the BackendURL property?

Asked by Cristhian Sandoval
5 years ago.

I need to change the property dp_day.backendUrl = "/ Backend / Day? IdEmployee = 33", to "/ Backend / Day? IdEmployee = 10"

and then I tell him to show it switcher.show (dp_day);

But I don't load the new events.

If I first tell you to show me the week and then the day if it works for me:
dp_day.backendUrl = "/ Backend / Day? Employee id = 10"
switcher.show (dp_week);
switcher.show (dp_day);

How can i fix this? Is there a better way?

Answer posted by Dan Letecky [DayPilot]
5 years ago.

1. There is a clientState property that lets you define custom state on the client side. That usually includes filtering criteria, such as user, event type, etc.

You only need to set it on change on the client side. The value is then persisted and sent with every CallBack request to the server side where you can access it using ClientState.

See also:
https://doc.daypilot.org/scheduler/clientstate/

If you are using multiple components at once (day/week/month view) you'll need to set the clientState for all of them.

2. It's also possible to change the backendUrl but then you need to force a refresh from the server side, e.g. using commandCallBack().

https://doc.daypilot.org/scheduler/commandcallback/

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.