Package com.pre.entity.base

Examples of com.pre.entity.base.UnitOfMeasure


    item.getDescription().setLongDescription(descriptionBox.getText());
    item.getDescription().setComment(commentBox.getText());
    if(!item.isLocked()){
      Division divi=dmanager.findByCode(divisionCombo.getText()).get(0);
      item.setDivision(divi);
      UnitOfMeasure uom=uomManager.findByName(uomText.getText()).get(0);
      item.setBasicUnitOfMeasure(uom);
    }
  }
View Full Code Here


    String searchKey=inputEvent.getValue();

    List<UnitOfMeasure> uoms=uomManager.searchByName(searchKey, 0L, 32);
    Iterator<UnitOfMeasure> uomIterator=uoms.iterator();
    while(uomIterator.hasNext()){
      UnitOfMeasure uom=uomIterator.next();
      Listitem item=new Listitem();
      Listcell nameCell=new Listcell(uom.getName());
      Listcell descCell=new Listcell(uom.getDescription().getShortDescription());
      item.appendChild(nameCell);
      item.appendChild(descCell);
      uomList.appendChild(item);
    }
    uomText.open();
View Full Code Here

      manageOption("create");
      return;
    }
    if(!ids.isEmpty()){
     
      final UnitOfMeasure c=manager.find(new Long(ids.get(0)));
     
      cbox.setText(c.getName());
      sbox.setText(c.getDescription().getShortDescription());
      dbox.setText(c.getDescription().getLongDescription());
      cmbox.setText(c.getDescription().getComment());
      if(options.get(0).equals("show")){
        cbox.setDisabled(true);
        sbox.setDisabled(true);
        dbox.setDisabled(true);
        cmbox.setDisabled(true);
      }
      if(options.get(0).equals("edit")){
        cbox.setDisabled(true);
       
        Button okButton=new Button("OK");
        okButton.addEventListener("onClick", new EventListener(){

          public void onEvent(Event event) throws Exception {
            c.getDescription().setShortDescription(sbox.getText());
            c.getDescription().setLongDescription(dbox.getText());
            c.getDescription().setComment(cmbox.getText());
            manager.update(c);
            detach();           
          }
         
        });
View Full Code Here

    Button okButton=new Button("OK");
    okButton.addEventListener("onClick", new EventListener(){

      public void onEvent(Event event) throws Exception {
        //init();
        UnitOfMeasure divi=new UnitOfMeasure();
        divi.setName(cbox.getText());
        BaseDescription description=new BaseDescription();
        divi.setDescription(description);
        divi.getDescription().setShortDescription(sbox.getText());
        divi.getDescription().setLongDescription(dbox.getText());
        divi.getDescription().setComment(cmbox.getText());
        manager.create(divi);
        detach();           
      }
     
    });
View Full Code Here

    UnitOfMeasureManager manager=(UnitOfMeasureManager)WebApplication.lookup(UnitOfMeasureManager.LocalJNDIName);
    List<UnitOfMeasure> divisions=manager.findAll();
    Iterator<UnitOfMeasure> it=divisions.iterator();
    while(it.hasNext()){
      Row row=new Row();
      UnitOfMeasure c=it.next();
      row.appendChild(new Checkbox());
      row.appendChild(new Label(c.getId().toString()));
      row.appendChild(new Label(c.getName()));
      row.appendChild(new Label(c.getDescription().getShortDescription()));
     
      gridRows.appendChild(row);
    }
   
  }
View Full Code Here

TOP

Related Classes of com.pre.entity.base.UnitOfMeasure

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.