Examples of AttributeChoice


Examples of no.ugland.utransprod.model.AttributeChoice

        .addValueChangeListener(listener);
    }

    @Override
    public AttributeChoiceModel getBufferedObjectModel(PresentationModel presentationModel) {
        AttributeChoiceModel attributeChoiceModel = new AttributeChoiceModel(new AttributeChoice());
        attributeChoiceModel.setChoiceValue((String) presentationModel
                .getBufferedValue(PROPERTY_CHOICE_VALUE));
        attributeChoiceModel.setProdCatNo((String) presentationModel
                .getBufferedValue(PROPERTY_PROD_CAT_NO));
        attributeChoiceModel.setProdCatNo2((String) presentationModel
View Full Code Here

Examples of no.ugland.utransprod.model.AttributeChoice

   */
  public static ArrayListModel cloneChoices(List<AttributeChoice> orgCoices) {
    ArrayListModel newList = new ArrayListModel();
    if (orgCoices != null) {
      for (AttributeChoice choice : orgCoices) {
        newList.add(new AttributeChoice(choice.getAttributeChoiceId(),
            choice.getChoiceValue(), choice.getAttribute(), choice
                .getComment(),choice.getProdCatNo(),choice.getProdCatNo2()));
      }
    }
    return newList;
View Full Code Here

Examples of no.ugland.utransprod.model.AttributeChoice

    Attribute findAttribute = attributeManager.findByName("testatle");
    assertNotNull(findAttribute);
    assertEquals("testatle", findAttribute.getName());

    Set<AttributeChoice> attributeChoices = new HashSet<AttributeChoice>();
    AttributeChoice attributeChoice = new AttributeChoice(null, "valg",
        findAttribute, null, null, null);
    attributeChoices.add(attributeChoice);
    findAttribute.setAttributeChoices(attributeChoices);

    attributeManager.saveAttribute(findAttribute);
View Full Code Here

Examples of no.ugland.utransprod.model.AttributeChoice

        : new HashSet<AttributeChoice>();
    boolean hasChoices = false;
    boolean notFound = true;
    Iterator<AttributeChoice> choiceIt = choices.iterator();
    while (choiceIt.hasNext() && notFound) {
      AttributeChoice choice = choiceIt.next();
      hasChoices = true;
      Ordln ordln = choice.hasProdCatNo() ? ordlnManager
          .findByOrderNrProdCatNo(orderLine.getOrderNr(), choice
              .getProdCatNo(), choice.getProdCatNo2())
          : Ordln.UNKNOWN;
      String value = ordln != Ordln.UNKNOWN ? choice.getChoiceValue()
          : "";
      orderLineAttribute.setAttributeValue(value);
      notFound = value.length() != 0 ? false : true;
    }
    return hasChoices;
View Full Code Here

Examples of no.ugland.utransprod.model.AttributeChoice

    return "AttributeChoice";
  }

  @Override
  public AttributeChoice getNewObject() {
    return new AttributeChoice();
  }
View Full Code Here

Examples of no.ugland.utransprod.model.AttributeChoice

  public boolean doDelete(WindowInterface window) {
    boolean returnValue = true;
    int selectedIndex = getSelectedIndex();

    if (selectedIndex != -1) {
      AttributeChoice attributeChoice = (AttributeChoice) objectSelectionList
          .getElementAt(selectedIndex);
      CheckObject checkObject = checkDeleteObject(attributeChoice);
      String msg = null;
      if (checkObject != null) {
        msg = checkObject.getMsg();
View Full Code Here

Examples of no.ugland.utransprod.model.AttributeChoice

     * @param rowIndex
     * @param columnIndex
     * @return verdi
     */
    public Object getValueAt(int rowIndex, int columnIndex) {
      AttributeChoice attributeChoice = (AttributeChoice) getRow(rowIndex);
      switch (columnIndex) {
      case 0:
        return attributeChoice.getChoiceValue();
      case 1:
        return attributeChoice.getProdCatNo();
      case 2:
        return attributeChoice.getProdCatNo2();
      default:
        throw new IllegalStateException("Unknown column");
      }

    }
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.