Package org.jallinone.variants.java

Examples of org.jallinone.variants.java.VariantsItemDescriptor


    this.repaint();
  }


  public final void setItem(Form form) {
    VariantsItemDescriptor itemVO = (VariantsItemDescriptor)form.getVOModel().getValueObject();

    if (form.getMode()==Consts.INSERT ||
        itemVO.getItemCodeItm01()==null ||
        itemVO.getItemCodeItm01().equals("") ||
        (!Boolean.TRUE.equals(itemVO.getUseVariant1ITM01()) &&
         !Boolean.TRUE.equals(itemVO.getUseVariant2ITM01()) &&
         !Boolean.TRUE.equals(itemVO.getUseVariant3ITM01()) &&
         !Boolean.TRUE.equals(itemVO.getUseVariant4ITM01()) &&
         !Boolean.TRUE.equals(itemVO.getUseVariant5ITM01()))
    ) {
      clearData();
    }
    else {
      this.removeAll();
View Full Code Here


    this.repaint();
  }


  public final void setItem(Form form) {
    VariantsItemDescriptor itemVO = (VariantsItemDescriptor)form.getVOModel().getValueObject();

    if (form.getMode()==Consts.INSERT ||
        itemVO.getItemCodeItm01()==null ||
        itemVO.getItemCodeItm01().equals("") ||
        (!Boolean.TRUE.equals(itemVO.getUseVariant1ITM01()) &&
         !Boolean.TRUE.equals(itemVO.getUseVariant2ITM01()) &&
         !Boolean.TRUE.equals(itemVO.getUseVariant3ITM01()) &&
         !Boolean.TRUE.equals(itemVO.getUseVariant4ITM01()) &&
         !Boolean.TRUE.equals(itemVO.getUseVariant5ITM01()))
    ) {
      clearData();
    }
    else {
      this.removeAll();
View Full Code Here

   */
  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    try {

      // create VariantsMatrixVO v.o.
      VariantsItemDescriptor itemVO = (VariantsItemDescriptor)inputPar;
      LoadProductVariantsMatrix bean = (LoadProductVariantsMatrix)JAIOBeanFactory.getInstance().getBean(LoadProductVariantsMatrix.class);     

      if (itemVO instanceof DetailItemVO)
        return new VOResponse( bean.getDetailItemVariantsMatrix(
          (DetailItemVO)itemVO,
          ((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername()
        ));
      else if (itemVO instanceof GridItemVO)
          return new VOResponse( bean.getGridItemVariantsMatrix(
            (GridItemVO)itemVO,
            ((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername()
          ));
      else if (itemVO instanceof SupplierPriceItemVO)
          return new VOResponse( bean.getSupplierPriceItemVariantsMatrix(
            (SupplierPriceItemVO)itemVO,
            ((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername()
          ));
      else if (itemVO instanceof SupplierPriceVO)
          return new VOResponse( bean.getSupplierPriceVariantsMatrix(
            (SupplierPriceVO)itemVO,
            ((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername()
          ));
      else if (itemVO instanceof PriceVO)
          return new VOResponse( bean.getPriceVariantsMatrix(
            (PriceVO)itemVO,
            ((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername()
          ));
      else if (itemVO instanceof PriceItemVO)
          return new VOResponse( bean.getPriceItemVariantsMatrix(
            (PriceItemVO)itemVO,
            ((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername()
          ));
      else
        return new ErrorResponse("Unsupported class type: "+itemVO.getClass().getName());
  

    }
    catch (Throwable ex) {
      Logger.error(userSessionPars.getUsername(),this.getClass().getName(),"executeCommand","Error while fetching the variants matrix",ex);
View Full Code Here

  /**
   * Lookup code has been changed.
   */
  public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
    VariantsItemDescriptor lookupVO = (VariantsItemDescriptor)lookupController.getLookupVO();

    if (form.getMode()!=Consts.INSERT ||
        controlItemCode.getValue()==null ||
        controlItemCode.getValue().equals("") ||
        (lookupVO!=null &&
         !Boolean.TRUE.equals(lookupVO.getUseVariant1ITM01()) &&
         !Boolean.TRUE.equals(lookupVO.getUseVariant2ITM01()) &&
         !Boolean.TRUE.equals(lookupVO.getUseVariant3ITM01()) &&
         !Boolean.TRUE.equals(lookupVO.getUseVariant4ITM01()) &&
         !Boolean.TRUE.equals(lookupVO.getUseVariant5ITM01())
    ) ) {
      if (form.getMode()==Consts.INSERT)
        controlQty.setEnabled(true);
      if (splitPane!=null)
        splitPane.setDividerLocation(initialDiv);
View Full Code Here

TOP

Related Classes of org.jallinone.variants.java.VariantsItemDescriptor

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.