@Override
  public void init(ALAction action, RunData rundata, Context context)
      throws ALPageNotFoundException, ALDBErrorException {
    super.init(action, rundata, context);

    loginuserid = ALEipUtils.getUserId(rundata);
    viewtype = "detail";

    if (ALEipUtils.isMatch(rundata, context)) {
      if (rundata.getParameters().containsKey("view_date")) {
        view_date = new ALDateTimeField("yyyy-MM-dd");
        String tmpViewDate = rundata.getParameters().getString("view_date");
        view_date.setValue(tmpViewDate);
        if (!view_date.validate(new ArrayList<String>())) {
          view_date = null;
        }
      }
    }

    if (rundata.getParameters().containsKey("userid")) {
      String tmpid = rundata.getParameters().getString("userid");
      if (tmpid != null && tmpid.startsWith(ScheduleUtils.TARGET_FACILITY_ID)) {
        userid =
            Integer.parseInt(
                tmpid.substring(ScheduleUtils.TARGET_FACILITY_ID.length(), tmpid.length()));
        type = ScheduleUtils.SCHEDULEMAP_TYPE_FACILITY;
      } else {
        userid = rundata.getParameters().getInt("userid");
        type = ScheduleUtils.SCHEDULEMAP_TYPE_USER;
      }
    } else if (rundata.getParameters().containsKey("facilityid")) {
      userid = Integer.parseInt(rundata.getParameters().getString("facilityid"));
      type = ScheduleUtils.SCHEDULEMAP_TYPE_FACILITY;
    }

    // アクセス権限
    ALAccessControlFactoryService aclservice =
        (ALAccessControlFactoryService)
            ((TurbineServices) TurbineServices.getInstance())
                .getService(ALAccessControlFactoryService.SERVICE_NAME);
    ALAccessControlHandler aclhandler = aclservice.getAccessControlHandler();

    hasAclviewOther =
        aclhandler.hasAuthority(
            loginuserid,
            ALAccessControlConstants.POERTLET_FEATURE_SCHEDULE_OTHER,
            ALAccessControlConstants.VALUE_ACL_LIST);

    con = new ScheduleOnedayContainer();
    con.initField();
    con.initHour(0, 24);
  }