private void initViewController() {
    viewController =
        new BasicViewController(
            new ComponentPaneRenderer<MyProcessesListPane>(
                new MyProcessesListPane(this, i18NSource.getMessage("activity.assigned.tasks"))) {
              @Override
              public Component render(Map<String, ?> viewData) {
                ProcessInstanceFilter filter = (ProcessInstanceFilter) viewData.get("filter");
                if (filter != null) {
                  pane.setTitle(filter.getName());
                  pane.setFilter(filter);
                }
                if (leftPanelTrigger != null) leftPanelTrigger.show();
                return pane.init();
              }
            });

    viewController.addView(
        new ComponentPaneRenderer<ProcessDataViewComponent>(
            new ProcessDataViewComponent(application, i18NSource, viewController)) {
          @Override
          public String getViewId() {
            return ProcessDataViewComponent.class.getName();
          }

          @Override
          public Component render(Map<String, ?> viewData) {
            ProcessToolBpmSession bpmSession = (ProcessToolBpmSession) viewData.get("bpmSession");
            BpmTask task = (BpmTask) viewData.get("task");
            pane.attachProcessDataPane(task, bpmSession);
            ActivityMainPane.this.pdvc = pane;
            return pane;
          }
        });

    viewController.addView(
        new ComponentPaneRenderer<OtherUserProcessesListPane>(
            new OtherUserProcessesListPane(this, i18NSource.getMessage("activity.user.tasks"))) {
          @Override
          public Component render(Map<String, ?> viewData) {
            ProcessInstanceFilter filter = (ProcessInstanceFilter) viewData.get("filter");
            if (filter != null) {
              pane.setTitle(filter.getName());
            }
            pane.setFilter(filter);
            if (filter != null) {
              pane.setUserData(filter.getFilterOwner());
            }
            leftPanelTrigger.show();
            return pane.init();
          }
        });

    viewController.addView(
        new ComponentPaneRenderer<QueueListPane>(new QueueListPane(this)) {
          @Override
          public Component render(Map<String, ?> viewData) {
            ProcessQueue q = (ProcessQueue) viewData.get("queue");
            ProcessInstanceFilter filter = (ProcessInstanceFilter) viewData.get("filter");
            pane.setFilter(filter);
            pane.setQueue(q);
            leftPanelTrigger.show();
            return pane.init();
          }
        });

    viewController.addView(
        new ComponentPaneRenderer<OtherUserQueueListPane>(new OtherUserQueueListPane(this)) {
          @Override
          public Component render(Map<String, ?> viewData) {
            ProcessQueue queue = (ProcessQueue) viewData.get("queue");
            UserData user = (UserData) viewData.get("user");
            ProcessInstanceFilter filter = (ProcessInstanceFilter) viewData.get("filter");
            pane.setFilter(filter);
            pane.setUserData(user);
            pane.setQueue(queue);
            leftPanelTrigger.show();
            return pane.init();
          }
        });

    viewController.addView(
        new ComponentPaneRenderer<RecentProcessesListPane>(
            new RecentProcessesListPane(this, i18NSource.getMessage("activity.recent.tasks"))) {
          @Override
          public Component render(Map<String, ?> viewData) {
            Calendar minDate = (Calendar) viewData.get("minDate");
            pane.setMinDate(minDate);
            leftPanelTrigger.show();
            return pane.init();
          }
        });

    // to remove "strange" views, depending on external addons. Such
    // approach also gives us much greater flexibility
    ViewRegistry registeredService =
        ProcessToolContext.Util.getThreadProcessToolContext()
            .getRegistry()
            .getRegisteredService(ViewRegistry.class);
    if (registeredService != null) {
      for (final ViewRenderer viewRenderer : registeredService.getViews()) {
        viewRenderer.setBpmSession(getBpmSession());
        viewRenderer.setUp(application);
        viewRenderer.setViewCallback(this);
        viewController.addView(viewRenderer);
        activityQueuesPane.addButton(
            viewRenderer.getTitle(),
            new Runnable() {
              @Override
              public void run() {
                viewRenderer.handleDisplayAction();
                viewController.displayView(viewRenderer.getViewId(), null);
              }
            });
      }
    }
  }