Package org.sprimaudi.zkspring.entity

Examples of org.sprimaudi.zkspring.entity.Referensi


        Events.echoEvent("onClick", tbShowDr, evt);
    }


    private void prepareParent() {
        Referensi grup = referensiUtil.fromCombo(txtGrup);
        if (grup.getParentGrup() == null) {
            txtParent.getChildren().clear();
        } else {
            txtParent.setAttribute("grup", "" + grup.getParentGrup().getNum());
            referensiUtil.fillCombo(txtParent);
        }
    }
View Full Code Here


    Paging pgData;
    @Wire
    Textbox txtSearch;

    public void prepareData() {
        Referensi grup = referensiUtil.fromCombo(txtGrup);
        Sort s = new Sort(Sort.Order.create(Sort.Direction.ASC, Arrays.asList(new String[]{"urut"})));
        Long lg = grup != null ? grup.getNum() : 0L;
        List<Referensi> ugs = referensiRepository.dynamically(ReferensiRepository.REFERENSI_FILTER, s, PagingUtil.fromPaging(pgData),
                new RegularParameterValues()
                        .add(EqualParameterValue.create("grup", lg))
                        .add(LikeParameterValue.create("nama", txtSearch.getText()))
                        .add(LikeParameterValue.create("kode", txtSearch.getText()))
View Full Code Here

        ListModelList<Referensi> lmUg = new ListModelList<Referensi>(grups);
        lstData.setModel(lmUg);
    }

    public Referensi extract() {
        Referensi ref = txtIdReferensi.getText() != null
                ? !"".equals(txtIdReferensi.getText())
                ? referensiRepository.findOne(txtIdReferensi.getText())
                : new Referensi()
                : new Referensi();
        ref.setNama(txtNama.getText());
        Referensi grup = referensiUtil.fromCombo(txtGrup);
        ref.setGrup(grup != null ? grup.getNum() : null);
        ref.setKeterangan(txtKeterangan.getText());
        ref.setKode(txtKode.getText());
        ref.setUrut(txtUrut.getValue());
        ref.setNilai(txtNilai.getValue() != null ? txtNilai.getValue().longValue() : null);
        ref.setNum(txtNilai.getValue() != null ? txtNum.getValue().longValue() : null);
View Full Code Here

    public void show() {
        if (dataref != null) {
            txtIdReferensi.setText(dataref.getId() != null ? "" + dataref.getId() : "");
            txtNama.setText(dataref.getNama());
            Referensi grup = referensiUtil.fromCombo(txtGrup);
            txtGrupReferensi.setText(grup != null ? grup.getNama() : null);
            txtUrut.setValue(dataref.getUrut());
            txtKode.setText(dataref.getKode());
            txtKeterangan.setText(dataref.getKeterangan());
            txtNilai.setValue(dataref.getNilai() != null ? new BigDecimal(dataref.getNilai()) : null);
            txtNum.setValue(dataref.getNum() != null ? new BigDecimal(dataref.getNum()) : null);
View Full Code Here

        prepareData();
    }

    @Listen("onClick=#tbNewDr")
    public void onNewDr(Event evt) {
        dataref = new Referensi();
        show();
        txtNama.focus();
        menu = "reference";
        ctx.switchContext(hbCrud, null, menu);
    }
View Full Code Here

        } else {
            refs = referensiRepository.byGrup(grup);
        }

        for (Iterator<Referensi> irefs = refs.iterator(); irefs.hasNext(); ) {
            Referensi ref = irefs.next();
            Comboitem ci = new Comboitem(ref.getNama());
            ci.setValue(ref.getKode());
            ci.setParent(combo);
        }
    }
View Full Code Here

            ci.setParent(combo);
        }
    }

    public void fillCombo(Combobox combo, Combobox parent) {
        Referensi pr = fromCombo(parent);
        if (pr != null) {
            combo.setAttribute(PARENT_KEY, "" + pr.getId());
            fillCombo(combo);
        }
    }
View Full Code Here

TOP

Related Classes of org.sprimaudi.zkspring.entity.Referensi

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.