public NavigationMicrowaveOvenBean() {
   ExistKitchenApplianceMicrowaveOvenProductBrandBean
       existKitchenApplianceMicrowaveOvenProductBrand =
           (ExistKitchenApplianceMicrowaveOvenProductBrandBean)
               SpringFacesUtil.getManagedBean(
                   ManageBeanConstants
                       .EXIST_KITCHEN_APPLIANCE_MICROWAVE_OVEN_PRODUCT_BRAND_BEAN_NAME);
   SelectItem[] result = null;
   result = existKitchenApplianceMicrowaveOvenProductBrand.getBrandCodeItems();
   this.setBrandCodeItems(result);
   List<RangeParam> tempPriceRange = new ArrayList<RangeParam>();
   tempPriceRange.add(new RangeParam(null, null, "全部"));
   tempPriceRange.add(new RangeParam(new Double(0), new Double(99), "<=399"));
   tempPriceRange.add(new RangeParam(new Double(399.1), new Double(599.9), "399.1-599.9"));
   tempPriceRange.add(new RangeParam(new Double(599), new Double(799.9), "599.1-799.9"));
   tempPriceRange.add(new RangeParam(new Double(800), null, ">=800"));
   this.setPriceRangeList(tempPriceRange);
   List<RangeParam> tempVolumeRange = new ArrayList<RangeParam>();
   tempVolumeRange.add(new RangeParam(null, null, "全部"));
   tempVolumeRange.add(new RangeParam(new Double(0), new Double(22), "<=22"));
   tempVolumeRange.add(new RangeParam(new Double(22.1), new Double(25), "22.1-25"));
   tempVolumeRange.add(new RangeParam(new Double(25.1), null, ">=25.1"));
   this.setVolumeRangeList(tempVolumeRange);
   ExistElectricPressureCookerControlTypeBean existElectricPressureCookerControlType =
       (ExistElectricPressureCookerControlTypeBean)
           SpringFacesUtil.getManagedBean(
               ManageBeanConstants.EXIST_ELECTRIC_PRESSURE_COOKER_CONTROL_TYPE_BEAN_NAME);
   SelectItem[] controlTypeItems = existElectricPressureCookerControlType.getControlTypeItems();
   this.setControlTypeItems(controlTypeItems);
 }
 public String loginOutAction() throws LoginException {
   UserBean userBean =
       (UserBean) SpringFacesUtil.getManagedBean(ManageBeanConstants.CURRENT_USER_BEAN_NAME);
   if (loginService.loginOut(userBean)) {
     userBean.setUserLoginFlag(false);
     userBean.setUserInfo(null);
   }
   return null;
 }
  public ExistKitchenApplianceFryerProductBrandBean() {
    IProductService productService =
        (IProductService) SpringFacesUtil.getSpringBean("productService");
    List<String> brandList = new ArrayList<String>();
    HeaderTabPanelBean headerTabPanel =
        (HeaderTabPanelBean)
            SpringFacesUtil.getManagedBean(ManageBeanConstants.HEADER_TABPANEL_BEAN_NAME);
    List<MenuItem> subMenu = headerTabPanel.getKitchenAppliance().getSubMenu();
    MenuItem paraItem =
        HeaderMenuUtil.getMenuItemByName(HeaderConstants.KITCHEN_APPLIANCE_FRYER_NAME, subMenu);
    try {
      brandList =
          productService.getBrandCodeListByCategory(paraItem.getIdFirst(), paraItem.getIdSecond());
    } catch (ProductException e) {

    }
    ProductBrandUtil productBrandUtil =
        (ProductBrandUtil) SpringFacesUtil.getSpringBean("productBrandUtil");
    SelectItem[] result = null;
    result = productBrandUtil.getBrandCodeItem(brandList);
    this.setBrandCodeItems(result);
  }
  public String loginInAction() throws LoginException {
    String result = "";
    this.setErrorMessage("");
    if (null == loginInfo.getUserId()
        || "".equals(loginInfo.getUserId())
        || null == loginInfo.getUserPassword()
        || "".equals(loginInfo.getUserPassword())) {
      this.setErrorMessage("请输入用户名和密码!");
      return null;
    }
    PaintVerifyCodeBean paintVerifyCode =
        (PaintVerifyCodeBean)
            SpringFacesUtil.getManagedBean(ManageBeanConstants.PAINT_VERIFY_CODE_BEAN_NAME);
    if (null == this.getVerifyCode() || "".equals(this.getVerifyCode())) {
      this.setErrorMessage("请输入验证码!");
      return null;
    } else if (!((this.getVerifyCode().toUpperCase())
        .equals(paintVerifyCode.getVerifyCode().toUpperCase()))) {
      this.setErrorMessage("输入的验证码有误!");
      return null;
    }
    Stakeholder stakeholder = null;
    stakeholder = loginService.loginIn(loginInfo.getUserId(), loginInfo.getUserPassword());
    if (null == stakeholder) { // no this stakeholder
      userLoginFlag = false;
      this.setUserInfo(stakeholder);
      this.setErrorMessage("请输入正确的用户名和密码");

    } else { // exist this stakeholder
      List<Person> persons = stakeholder.getConatctMans();
      for (int j = persons.size() - 1; j >= 0; j--) {
        if (null == persons.get(j)) {
          persons.remove(j);
        }
      }
      this.setUserInfo(stakeholder);
      userLoginFlag = true;
    }
    // clear password;
    this.loginInfo.setUserPassword("");
    String comeFrom = this.getComeFrom();
    if (null != comeFrom && !("".equals(comeFrom))) {
      result = comeFrom;
    }
    return result;
  }
  public String clickLink() {

    Object brandCode = SpringFacesUtil.getRequestParameter("brandCode");
    Object brandLabel = SpringFacesUtil.getRequestParameter("brandLabel");
    Object priceRangeMin = SpringFacesUtil.getRequestParameter("priceRangeMin");
    Object priceRangeMax = SpringFacesUtil.getRequestParameter("priceRangeMax");
    Object priceRangeLabel = SpringFacesUtil.getRequestParameter("priceRangeLabel");
    Object volumeRangeMin = SpringFacesUtil.getRequestParameter("volumeRangeMin");
    Object volumeRangeMax = SpringFacesUtil.getRequestParameter("volumeRangeMax");
    Object volumeRangeLabel = SpringFacesUtil.getRequestParameter("volumeRangeLabel");
    Object controlType = SpringFacesUtil.getRequestParameter("controlType");
    Object controlTypeLabel = SpringFacesUtil.getRequestParameter("controlTypeLabel");
    MicrowaveOvenProductBean listMicrowaveOvenProduct =
        (MicrowaveOvenProductBean)
            SpringFacesUtil.getManagedBean(
                ManageBeanConstants.LIST_MICROWAVE_OVEN_PRODUCT_BEAN_NAME);
    listMicrowaveOvenProduct.setDataModel(null);
    RangeParam priceRange = new RangeParam();
    priceRange.setMin(
        null == priceRangeMin
            ? null
            : ("".equals(priceRangeMin) ? null : new Double(priceRangeMin.toString())));
    priceRange.setMax(
        null == priceRangeMax
            ? null
            : ("".equals(priceRangeMax) ? null : new Double(priceRangeMax.toString())));
    priceRange.setDescription(
        null == priceRangeLabel
            ? "全部"
            : ("".equals(priceRangeLabel) ? "全部" : priceRangeLabel.toString()));
    if (null != priceRangeMin || null != priceRangeMax) {
      listMicrowaveOvenProduct.setPriceRange(priceRange);
      listMicrowaveOvenProduct.setPriceRangeLabel(priceRange.getDescription());
    }
    RangeParam volumeRange = new RangeParam();
    volumeRange.setMin(
        null == volumeRangeMin
            ? null
            : ("".equals(volumeRangeMin) ? null : new Double(volumeRangeMin.toString())));
    volumeRange.setMax(
        null == volumeRangeMax
            ? null
            : ("".equals(volumeRangeMax) ? null : new Double(volumeRangeMax.toString())));
    volumeRange.setDescription(
        null == volumeRangeLabel
            ? "全部"
            : ("".equals(volumeRangeLabel) ? "全部" : volumeRangeLabel.toString()));
    if (null != volumeRangeMin || null != volumeRangeMax) {
      listMicrowaveOvenProduct.setVolumeRange(volumeRange);
      listMicrowaveOvenProduct.setVolumeRangeLabel(volumeRange.getDescription());
    }
    if (null != brandCode) {
      listMicrowaveOvenProduct.setBrandCode((String) brandCode);
    }
    if (null != brandLabel) {
      listMicrowaveOvenProduct.setBrandLabel((String) brandLabel);
    }
    if (null != controlType) {
      listMicrowaveOvenProduct.setControlType((String) controlType);
    }
    if (null != controlTypeLabel) {
      listMicrowaveOvenProduct.setControlTypeLabel((String) controlTypeLabel);
    }
    return null;
  }