Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Combo supports 3 types of item binding.

A. Enumerated Items

  1. In database the binding field Meta is filled in the following format.
  2. The generated module in edit.uid , the field will be a ComboBox ,wiping the inside of the Label control; the palette>formElements> ComboBox  selected and added.Enumclass and field are selected and fill.
  3. Come to Personel.Resources and added to a new Enum.
  4. Thus, the ComboBox in the desired manner is completed.

B. Constant Items

  1. A new field is added to the database of the relevant module.
  2. This field is part of the meta@code:nameOfTheField is written
  3. Shared the corresponding module is included in the package; extension const.java module, enum.codesValues method, is added by placing nameOfTheField comma between.

    Code Block
    languagejava
    titlePersonelConst.java
    linenumberstrue
    public static enum CodesValues implements IModuleConstantsEnum {
    		YakinlikDerecesi, Meslek, Sinifi;
    		@Override
    		public long getModuleId() {
    			return MODULE_ID;
    		}
  4. The relevant module in the Server, init.data go to the module extension initDataSet is added.

      Example:

Code Block
languagexml
firstline1
titlepersonel.initData.xml
linenumberstrue
<initDataSet id="PER.CODE_VALUES" author="asdf" userId="é{s.admin}">
<csv type="com.javexpress.gwt.enterprise.server.system.controller.ModuleCodeValue" file="com/emex/personel/server/update/modulKodDeger.csv"/>
</initDataSet> 

 

      5.If you insert or update a field that contains data that can be appended if the relevant module on the server.update part .csv extension module is selected. Opened with any Office program, here comboBox to appear in the desired field number is added.

      (.csv values are written to the database when the application is first run )

      6. Client in the section comboBox with the addition of the desired module edit part, in the palette>formElements section ComboBox is added by selecting.

      7.Added ComboBox’s Properties>Constant field 3.defined in Article Field name is selected.

      8.Added ComboBox's Properties>field the field name in the field of the data that will be captured in the table is selected.

      9.Thus, the ComboBox in the desired manner is completed.

 

C.REMOTE NAME

Tabloda implements kısmına bu satır eklenir.

Code Block
languagejava
com.javexpress.common.model.item.IComboItem<PK>

Tablonun generate yapılarak olusan dto class açılarak bu satırlar eklenir.

Code Block
languagejava
	@Override
	public Long getV() {
		return getId();
	}

	@Override
	public String getL() {
		return getCode();
	}

	@Override
	public String getG() {
		return null;
	}

	@Override
	public String getD() {
		return null;
	}

..servis.java açılır ve Combos bölümüne aralarına virgül koyarak combosu ekleriz.

Code Block
languagejava
	public static enum Combos {
		yetkilerCombo; 
	}

...ServisImpl.java açılırak loadComboItems kısmına kendi combomuzu ekleriz.

Code Block
languagejava
@Override
	public List<? extends IComboItem> loadComboItems(String comboName, String params) throws Exception {
		if(Combos.yetkilerCombo.toString().equals(comboName)){
			return BonusGuruSchema.instance().BngrAuthorization().list();
		}else {
			return getModuleRpcService(getModule().getSuperModuleId()).loadComboItems(comboName, params);			
		}
	}

 

 

 

Follow on ComboBox