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);
  }
Exemplo n.º 2
0
  public OrderItemLocalDS(String id) {

    setID(id);

    DataSourceSequenceField pkField = new DataSourceSequenceField("pk");
    pkField.setHidden(true);
    pkField.setPrimaryKey(true);

    DataSourceIntegerField orderIdField = new DataSourceIntegerField("orderID", "Order ID");
    orderIdField.setCanEdit(false);
    orderIdField.setPluralTitle("Orders");

    DataSourceTextField itemDescriptionField =
        new DataSourceTextField("itemDescription", "Description");
    DataSourceTextField categoryField = new DataSourceTextField("category", "Category");

    DataSourceDateField shipDateField = new DataSourceDateField("shipDate", "Ship Date");
    DataSourceIntegerField quantityField = new DataSourceIntegerField("quantity", "Quantity");
    DataSourceFloatField unitPriceField = new DataSourceFloatField("unitPrice", "Price");

    setFields(
        pkField,
        orderIdField,
        itemDescriptionField,
        categoryField,
        shipDateField,
        quantityField,
        unitPriceField);

    setTestData(OrderItemData.getRecords());
    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);
  }
Exemplo n.º 4
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 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);
  }
Exemplo n.º 6
0
  public PZoneChange() {
    restrictedEdits = DocFlow.user_obj.getZoneConfiguration().getRestricted_edits();
    CHARCOUNT = DocFlow.user_obj.getZoneConfiguration().getCharcount();
    tsMain = new ToolStrip();
    tsMain.setWidth100();
    HashMap<String, String> listSqls = new HashMap<String, String>();
    listSqls.put("" + ClSelection.T_REGION, "" + ClSelection.T_REGION);
    listSqls.put("" + ClSelection.T_CUST_TYPE, "" + ClSelection.T_CUST_TYPE);
    dsZoneDS = DocFlow.getDataSource("ZoneDS");
    dsCustomer = DocFlow.getDataSource("CustomerDS");
    miSearch = new ToolStripButton("Search");
    tiNewZone = new TextItem("newzone", "New Zone");
    biSaveData = new ButtonItem("saveData", "Change Zone");

    tiNewZone.addKeyPressHandler(
        new KeyPressHandler() {

          @Override
          public void onKeyPress(KeyPressEvent event) {
            newZoneKeyPressed(event);
          }
        });
    VLayout vl = new VLayout();

    dmCriteria = new DynamicForm();
    dmCriteria.setNumCols(4);
    dmCriteria.setHeight("8%");
    dmCriteria.setTitleOrientation(TitleOrientation.TOP);
    siCustomerType = new SelectItem("custypeid", "Customer Type");
    siZones = new SelectItem("zones", "Zones");
    siZones.setValueField("zone");
    siZones.setAutoFetchData(false);
    siZones.setDisplayField("zone");
    siZones.setOptionDataSource(dsZoneDS);

    tsMain.setHeight("15");
    vl.addMember(tsMain);
    tsMain.addButton(miSearch);
    vl.addMember(dmCriteria);
    lgCustomers = new ListGrid();
    lgCustomers.setDataSource(dsCustomer);
    lgCustomers.setAutoFetchData(false);
    lgCustomers.setShowResizeBar(false);
    lgCustomers.setCanDragRecordsOut(true);
    lgCustomers.setDragDataAction(DragDataAction.COPY);
    lgCustomers.setHeight100();
    lgCustomers.setHeight100();

    DataSource dsSelectedData = new DataSource();
    dsSelectedData.setClientOnly(true);

    DataSourceIntegerField dsfcusid = new DataSourceIntegerField("cusid", "Customer ID");
    dsfcusid.setPrimaryKey(true);

    DataSourceTextField dsZone = new DataSourceTextField("zone", "Zone");
    dsSelectedData.setFields(dsfcusid, dsZone);

    lgZoneCustomers = new ListGrid();
    lgZoneCustomers.setDataSource(dsSelectedData);
    lgZoneCustomers.setAutoFetchData(false);
    lgZoneCustomers.setCanAcceptDroppedRecords(true);
    lgZoneCustomers.setCanRemoveRecords(true);
    lgZoneCustomers.setAutoFetchData(false);
    lgZoneCustomers.setPreventDuplicates(true);
    lgZoneCustomers.setHeight100();
    lgZoneCustomers.setWidth100();

    HStack hStack = new HStack(10);
    hStack.setWidth100();
    hStack.setHeight100();
    hStack.setShowEdges(true);

    VStack vStack = new VStack();
    vStack.setHeight100();
    vStack.setWidth("60%");
    vStack.addMember(lgCustomers);
    hStack.addMember(vStack);
    TransferImgButton arrowImg = new TransferImgButton(TransferImgButton.RIGHT);
    arrowImg.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            lgZoneCustomers.transferSelectedData(lgCustomers);
          }
        });

    TransferImgButton arrowImgLeft = new TransferImgButton(TransferImgButton.LEFT);
    arrowImgLeft.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            lgZoneCustomers.removeSelectedData();
          }
        });
    hStack.addMember(arrowImg);
    hStack.addMember(arrowImgLeft);
    VStack vStack2 = new VStack();
    vStack2.setHeight100();
    vStack2.setWidth("40%");
    vStack2.addMember(lgZoneCustomers);
    hStack.addMember(vStack2);

    miSearch.addClickHandler(
        new ClickHandler() {

          @Override
          public void onClick(ClickEvent event) {
            search();
          }
        });

    lgCustomers.addClickHandler(
        new com.smartgwt.client.widgets.events.ClickHandler() {

          @Override
          public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) {}
        });

    vl.addMember(hStack);

    this.addMember(vl);
    DocFlow.docFlowService.getListTypesForDocument(
        listSqls,
        -1,
        new AsyncCallback<HashMap<String, ArrayList<ClSelectionItem>>>() {

          @Override
          public void onFailure(Throwable caught) {
            setResults(null);
          }

          @Override
          public void onSuccess(HashMap<String, ArrayList<ClSelectionItem>> result) {

            setResults(result);
          }
        });
  }