Examples of Item


Examples of com.saya.model.Item

        throws IOException
      {
        resp.setContentType("application/json;charset=utf8");
        Boolean validate = Boolean.valueOf(true);
        String des = "Thêm mới item thành công";
        Item item = new Item();
        String itemid = "";
        try {
          itemid = req.getParameter("ItemId");
        } catch (Exception ex) {
          item.setId("");
        }
        item.setId(itemid);

        String name = req.getParameter("Name");
        if ((name == null) || ("".equals(name))) {
          des = "Tên không được để trống";
          validate = Boolean.valueOf(false);
        } else {
          item.setName(name);
        }
        String product = req.getParameter("Product");

        if ((product == null) || ("".equals(product))) {
          des = "Sản phẩm không được để trống";
          validate = Boolean.valueOf(false);
        } else {
          Product pro = Product.getProduct(product);
          if (pro != null) {
            item.setProduct(product);
          } else {
            des = "Không tìm được sản phẩm tương ứng " + product;
            validate = Boolean.valueOf(false);
          }
        }

        if (validate.booleanValue()) {
          item.setPrice(req.getParameter("Price"));
          item.setType(req.getParameter("Type"));
          item.setIntroduction(req.getParameter("Introduction"));
          item.setUsage(req.getParameter("Usage"));
          item.setNote(req.getParameter("Note"));
          itemid = Item.createorUpdateItem(item);
          if ("".equals(itemid)) {
            validate = Boolean.valueOf(false);
            des = "Có lỗi khi thêm mới item";
          }
View Full Code Here

Examples of com.scriptographer.adm.Item

  }

  protected int addToContent(Dialog dialog,
      LinkedHashMap<String, com.scriptographer.adm.Component> content,
      int column, int row) {
    Item valueItem = createItem(dialog);
    String label = component.getLabel();
    boolean isRuler = component.getType() == ComponentType.RULER;
    boolean hasLabel = !isRuler && label != null && !"".equals(label);
    if (hasLabel) {
      TextPane labelItem = new TextPane(dialog);
      labelItem.setText(label + ":");
      // Adjust top margin of label to reflect the native margin
      // in the value item.
      Item marginItem = valueItem;
      // If this is an item group, use the first item in it instead
      // This is only needed for FontPopupList so far.
      if (marginItem instanceof ItemGroup)
        marginItem = (Item) ((ItemGroup) marginItem).getContent().get(0);
      Border margin = marginItem.getVisualMargin();
      // Also take into account any margins the component might have set
      if (valueItem != marginItem)
        margin = margin.add(valueItem.getMargin());
      labelItem.setMargin(margin.top + 3, 4, 0, 0);
      content.put(column + ", " + row + ", right, top", labelItem);
View Full Code Here

Examples of com.sissi.protocol.iq.disco.Item

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    Disco disco = protocol.cast(Disco.class);
    // 如果一个用户以不同资源进入房间则仅显示其中一个
    for (JID each : super.iSubscribedWho((super.build(protocol.parent().getTo())))) {
      disco.add(new Item(each.asStringWithBare(), each.resource()));
    }
    context.write(disco.parent().reply().setType(ProtocolType.RESULT));
    return true;
  }
View Full Code Here

Examples of com.sissi.protocol.iq.search.field.Item

    super(config, jidBuilder, limit, filters, mapping);
  }

  @Override
  protected Fields build(DBObject each, Fields target) {
    return target.add(new Item(super.jidBuilder.build(MongoUtils.asString(each, Dictionary.FIELD_USERNAME), null).asStringWithBare(), MongoUtils.asString(each, VCardContext.FIELD_NICK), null, null, null));
  }
View Full Code Here

Examples of com.sissi.protocol.muc.Item

  public boolean input(JIDContext context, Protocol protocol) {
    XMucAdmin admin = protocol.cast(XMucAdmin.class);
    JID group = super.build(admin.clear().parent().getTo());
    for (Relation relation : this.relationContext.myRelations(group, admin.affiliation())) {
      // Always not hidden, 永远显示JID
      admin.add(new Item(false, relation.cast(MucRelation.class)));
    }
    context.write(protocol.parent().reply().setType(ProtocolType.RESULT));
    return true;
  }
View Full Code Here

Examples of com.sk89q.craftbook.access.Item

                        if (itemArray[i].id == id &&
                                itemArray[i].count >= 1) {
                            int newAmount = itemArray[i].count - 1;

                            if (newAmount > 0) {
                                itemArray[i] = new Item(itemArray[i].id, newAmount);
                            } else {
                                itemArray[i] = null;
                            }

                            InventoryUtil.setContents(chest, itemArray);
View Full Code Here

Examples of com.starbase.starteam.Item

        void processUncontrolledItems() throws BuildException {
            if (this.isActive()) {
                Enumeration e = this.keys();
                while (e.hasMoreElements()) {
                    java.io.File local = (java.io.File) e.nextElement();
                    Item remoteItem = (Item) this.get(local);
                    remoteItem.update();

                    // once we find a folder that isn't in the repository,
                    // we know we can add it.
                    if (local.isDirectory()) {
                        Folder folder = (Folder) remoteItem;
View Full Code Here

Examples of com.stoyanr.todo.model.Item

        TestUtils.assertDocumentEquals(document, documentx, false);
    }

    private void testGetItemFromJson(Item item) {
        JSONObject json = ser.toJson(item);
        Item itemx = ser.getItem(json);
        TestUtils.assertItemEquals(item, itemx);
    }
View Full Code Here

Examples of com.sun.jersey.samples.extendedwadl.model.Item

        _repository = new HashMap<Integer, Item>();
    }

    @Path("{id}")
    public ItemResource getItem( @PathParam("id") final Integer id ) {
        final Item item = _repository.get( id );
        if ( item == null ) {
            throw new NotFoundException("Item with id " + id + " does not exist!");
        }
       
        return new ItemResource( item );
View Full Code Here

Examples of com.sun.jersey.samples.generatewadl.model.Item

        _repository = new HashMap<Integer, Item>();
    }

    @Path("{id}")
    public ItemResource getItem( @PathParam("id") final Integer id ) {
        final Item item = _repository.get( id );
        if ( item == null ) {
            throw new NotFoundException("Item with id " + id + " does not exist!");
        }
       
        return new ItemResource( item );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.