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

How to put my Ressource from my Database to the scheduler ressource ?

Asked by Loïc
3 years ago.

Hi Guys,

I was looking to take my ressource data from the database to integrate them into my scheduler ressource but i don't find the way to do it.

Does someone has already done it ? and can give me a little help ?

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

In Java, you can load the resources on the server side using getResources() method. Just fill the collection as needed. An example from

public class Dps extends DayPilotScheduler {

  public void onInit() throws Exception {

    // map the database column names

    // assign the collection of events
    setEvents(Db.getEvents(getRequest(), getStartDate().toDate(), getStartDate().addDays(getDays()).toDate() ));

    // set the resources
    getResources().add("Room A", "A");
    getResources().add("Room B", "B");
    getResources().add("Room C", "C");

    // request a full update of the control on the client side

This example adds the resources manually but you can also do it using data received from the database.

Comment posted by Loïc
3 years ago.

I Found the way to do It, i was blocked because of the treemap (first time i used that).
Thanks for your help :)

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