Esempio n. 1
0
 private void modifyDataSource(final DataSource datasource) {
   final DataSourceTextField partnumber = new DataSourceTextField(MillerTreeView.NAME);
   final DataSourceTextField description_de =
       new DataSourceTextField(MillerTreeView.DESCRIPTION_DE);
   final DataSourceTextField description_en =
       new DataSourceTextField(MillerTreeView.DESCRIPTION_EN);
   final DataSourceTextField description_fr =
       new DataSourceTextField(MillerTreeView.DESCRIPTION_FR);
   final DataSourceTextField description_pl =
       new DataSourceTextField(MillerTreeView.DESCRIPTION_PL);
   final DataSourceTextField description_tr =
       new DataSourceTextField(MillerTreeView.DESCRIPTION_TR);
   final DataSourceIntegerField id = new DataSourceIntegerField(MillerTreeView.ID);
   final DataSourceIntegerField parentid = new DataSourceIntegerField(MillerTreeView.PARENT_ID);
   final DataSourceIntegerField level = new DataSourceIntegerField(MillerTreeView.LEVEL);
   id.setHidden(true);
   parentid.setHidden(true);
   level.setHidden(true);
   datasource.setFields(
       id,
       parentid,
       level,
       partnumber,
       description_de,
       description_en,
       description_fr,
       description_pl,
       description_tr);
 }
  public CallsLogClientDS(String id) {
    setID(id);
    DataSourceIntegerField call_log_id = new DataSourceIntegerField("id");
    call_log_id.setHidden(true);
    call_log_id.setPrimaryKey(true);
    call_log_id.setRequired(true);

    DataSourceTextField op_user_name = new DataSourceTextField("op_user_name", "ოპერატორი");
    DataSourceTextField phone = new DataSourceTextField("phone", "ნომერი");
    DataSourceTextField abonent_name = new DataSourceTextField("abonent_name", "აბონენტი");
    DataSourceIntegerField call_duration =
        new DataSourceIntegerField("call_duration", "ხანგრძლივობა");
    DataSourceDateTimeField incomming_date =
        new DataSourceDateTimeField("incomming_date", "შემოსვლის დრო");
    DataSourceDateTimeField end_date = new DataSourceDateTimeField("end_date", "დასრულების დრო");
    DataSourceIntegerField status = new DataSourceIntegerField("status", "სტატუსი");

    setFields(
        call_log_id,
        op_user_name,
        phone,
        abonent_name,
        call_duration,
        incomming_date,
        end_date,
        status);
    setClientOnly(true);
  }
  public ExtendedAttributeOptionsDS(long templateId, String attribute, boolean withEmpty) {
    setRecordXPath("/list/option");
    DataSourceTextField id = new DataSourceTextField("id");
    id.setPrimaryKey(true);
    id.setHidden(true);
    id.setRequired(true);
    DataSourceTextField _attribute = new DataSourceTextField("attribute");
    _attribute.setHidden(true);

    DataSourceTextField value = new DataSourceTextField("value");

    DataSourceIntegerField position = new DataSourceIntegerField("position");
    position.setHidden(true);

    DataSourceTextField _templateId = new DataSourceTextField("templateId");
    _templateId.setHidden(true);

    setFields(id, _attribute, value, position, _templateId);
    setClientOnly(true);

    setDataURL(
        "data/extoptions.xml?sid="
            + Session.get().getSid()
            + "&"
            + "templateId="
            + templateId
            + "&"
            + "attribute="
            + attribute
            + "&withempty="
            + withEmpty);
  }
  public AbPhonesClientDS(String id) {
    // setID(id);

    DataSourceIntegerField pk = new DataSourceIntegerField("pk");
    pk.setPrimaryKey(true);
    pk.setRequired(true);
    pk.setHidden(true);

    // phone number descr
    DataSourceTextField phone = new DataSourceTextField("phone", "ტელეფონის ნომერი", 140);

    DataSourceTextField opCloseField =
        new DataSourceTextField("is_hide_descr", "ღია/დაფარული", 100);
    // is parallel or not field
    DataSourceTextField parallelUsualField =
        new DataSourceTextField("is_parallel_descr", "პარალელური", 120);
    // phone status field
    DataSourceTextField phoneStatusField = new DataSourceTextField("phone_status", "სტატუსი", 100);
    // phone state field
    DataSourceTextField phoneStateField =
        new DataSourceTextField("phone_state", "მდგომარეობა", 100);
    // phone type field
    DataSourceTextField phoneTypeField = new DataSourceTextField("phone_type", "ტიპი", 119);

    DataSourceIntegerField is_hide = new DataSourceIntegerField("is_hide");
    is_hide.setHidden(true);

    DataSourceIntegerField is_parallel = new DataSourceIntegerField("is_parallel");
    is_parallel.setHidden(true);

    DataSourceIntegerField phone_status_id = new DataSourceIntegerField("phone_status_id");
    phone_status_id.setHidden(true);

    DataSourceIntegerField phone_state_id = new DataSourceIntegerField("phone_state_id");
    phone_state_id.setHidden(true);

    DataSourceIntegerField phone_type_id = new DataSourceIntegerField("phone_type_id");
    phone_type_id.setHidden(true);

    setFields(
        pk,
        phone,
        opCloseField,
        parallelUsualField,
        phoneStatusField,
        phoneStateField,
        phoneTypeField,
        is_hide,
        is_parallel,
        phone_status_id,
        phone_state_id,
        phone_type_id);
    setClientOnly(true);
  }