當前位置: 首頁>>代碼示例>>Java>>正文


Java ValueChangeEvent.getNewValue方法代碼示例

本文整理匯總了Java中javax.faces.event.ValueChangeEvent.getNewValue方法的典型用法代碼示例。如果您正苦於以下問題:Java ValueChangeEvent.getNewValue方法的具體用法?Java ValueChangeEvent.getNewValue怎麽用?Java ValueChangeEvent.getNewValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.faces.event.ValueChangeEvent的用法示例。


在下文中一共展示了ValueChangeEvent.getNewValue方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: makeChanged

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
public void makeChanged(ValueChangeEvent vce)
{
     
  if ("".equals(vce.getNewValue()))
    _modelItems.setValue(Collections.EMPTY_LIST);
    
  Object newValue = vce.getNewValue();
  if (newValue instanceof Car)
  {
    String newCar = ((Car)newValue).getName();
    if ("cordera".equals(newCar))
      _modelItems.setValue(_CORDERA_MODELS);
    else if ("autumno".equals(newCar))
      _modelItems.setValue(_AUTUMNO_MODELS);
    else if ("grabowski".equals(newCar))
      _modelItems.setValue(_GRABOWSKI_MODELS);
  }
    
  _options.setValue(null);
  _price.setValue(null);
  _launchOptions.setDisabled(true);
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:23,代碼來源:CarBackingBean.java

示例2: landingpageTypeChanged

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
/**
 * value change listener for landingpage type
 * 
 * @param event
 */
public void landingpageTypeChanged(ValueChangeEvent event) {
    String marketplaceId = model.getSelectedMarketplace();
    String selectedLandingpageType = (String) event.getNewValue();
    try {
        if (!LandingpageType.contains(selectedLandingpageType)) {
            model.setLandingpageType(""); // nothing selected
        } else if (LandingpageType.isDefault(selectedLandingpageType)) {
            Response r = getLandingpageService()
                    .loadPublicLandingpageConfig(marketplaceId);
            switchtToPublicLandingpage(r);
        } else {
            switchToEnterpriseLandingpage();
        }
    } catch (SaaSApplicationException e) {
        ui.handleException(e);
    }
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:23,代碼來源:CustomizeLandingpageCtrl.java

示例3: processValueChange

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
/**
 * This methods is used as a callback for value-changed-event of the select
 * marketplace facelet.
 */
public void processValueChange(ValueChangeEvent event)
        throws AbortProcessingException {
	
	String selectedMarketplaceId = (String) event.getNewValue();
	
	if (selectedMarketplaceId.equals("0")) {
		marketplaceBean.setMarketplaceId(null);
	} else{
		marketplaceBean.setMarketplaceId(selectedMarketplaceId);
	}
	
    resetMembers();
    resetStage();
    this.marketplaceBean.processValueChange(event);
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:20,代碼來源:TranslationBean.java

示例4: updateSelectedTemplate

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
public void updateSelectedTemplate(ValueChangeEvent event) {

        selectedTemplate = (Template) event.getNewValue();
        if (selectedTemplate != null) {
            workingVersion = dataset.getEditVersion(selectedTemplate);
            updateDatasetFieldInputLevels();
        } else {
            dataset = new Dataset();
            dataset.setOwner(dataverseService.find(ownerId));
            workingVersion = dataset.getCreateVersion();
            updateDatasetFieldInputLevels();

            dataset.setIdentifier(datasetService.generateIdentifierSequence(protocol, authority, separator));
        }
        resetVersionUI();
    }
 
開發者ID:pengchengluo,項目名稱:Peking-University-Open-Research-Data-Platform,代碼行數:17,代碼來源:DatasetPage.java

示例5: userTypeChanged

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
public void userTypeChanged(ValueChangeEvent event) {
    if ((UserType) event.getNewValue() == UserType.ORDINARY) {
        if (this.builtinUser != null) {
            this.builtinUser.setUserType(UserType.ORDINARY);
        }
        if (this.pkuIAAAUser != null) {
            this.pkuIAAAUser.setUserType(UserType.ORDINARY);
        }
    } else {
        if (this.builtinUser != null) {
            this.builtinUser.setUserType(UserType.ADVANCE);
        }
        if (this.pkuIAAAUser != null) {
            this.pkuIAAAUser.setUserType(UserType.ADVANCE);
        }
    }
    FacesContext.getCurrentInstance().renderResponse();
}
 
開發者ID:pengchengluo,項目名稱:Peking-University-Open-Research-Data-Platform,代碼行數:19,代碼來源:BuiltinUserPage.java

示例6: processValueChange

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
/**
 * Process a value change.
 */
public void processValueChange(ValueChangeEvent event)
{
  log.debug("QuestionScore CHANGE LISTENER.");
  SubmissionStatusBean bean = (SubmissionStatusBean) ContextUtil.lookupBean("submissionStatus");
  TotalScoresBean totalScoresBean = (TotalScoresBean) ContextUtil.lookupBean("totalScores");
  QuestionScoresBean questionbean = (QuestionScoresBean) ContextUtil.lookupBean("questionScores");
  
  // we probably want to change the poster to be consistent
  String publishedId = ContextUtil.lookupParam("publishedId");

  String selectedvalue= (String) event.getNewValue();
  if ((selectedvalue!=null) && (!selectedvalue.equals("")) ){
    if (event.getComponent().getId().indexOf("sectionpicker") >-1 )
    {
      bean.setSelectedSectionFilterValue(selectedvalue);   // changed section pulldown
      totalScoresBean.setSelectedSectionFilterValue(selectedvalue);
      questionbean.setSelectedSectionFilterValue(selectedvalue);
    }
  }

  if (!submissionStatus(publishedId, bean, totalScoresBean, false))
  {
    throw new RuntimeException("failed to call questionScores.");
  }
}
 
開發者ID:sakaiproject,項目名稱:sakai,代碼行數:29,代碼來源:SubmissionStatusListener.java

示例7: onChangeTarget

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
public void onChangeTarget( ValueChangeEvent event ) {
	inputGroups = null;
	results = null;
	Object value = event.getNewValue();		
	if( value == null || value.toString().equals("Default") ) {
		targetInformation = null;
		return;
	}
	targetInformation = stringToTarget(event.getNewValue());
	if( targetInformation.getType().equals("fasta") ) {
		try {
			inputGroups = databases.getFasta(targetInformation.getPath());
			fastaFileName = null;
			baseFileName = FilenameUtils.removeExtension(new File(targetInformation.getPath()).getName());
		} catch( Exception e ) {
			searchError = e.getMessage();
		}
	}
}
 
開發者ID:akrogp,項目名稱:EhuBio,代碼行數:20,代碼來源:SearchBean.java

示例8: valueChangeVCenter

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
public void valueChangeVCenter(ValueChangeEvent event) {
    status = null;
    if (event.getNewValue() != null) {
        currentVCenter = Integer.parseInt((String) event.getNewValue());
        selectedVCenter = getVCenter(currentVCenter);
        logger.debug(selectedVCenter.name);
        /*datacenterList.clear();
        for (Datacenter dc : selectedVCenter.datacenter) {
            SelectItem item = new SelectItem(dc.name, dc.name);
            datacenterList.add(item);
            if (datacenterList.size() == 1) {
                clusterList.clear();
                for (Cluster cluster : dc.cluster) {
                    SelectItem it = new SelectItem(
                            Integer.valueOf(cluster.tkey), cluster.name);
                    clusterList.add(it);
                    if (clusterList.size() == 1) {
                        selectedCluster = cluster;
                        currentCluster = cluster.tkey;
                        parseConfiguration();
                    }
                }
            }
        }*/

    }
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:28,代碼來源:TargetLocationBean.java

示例9: processValueChange

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
@Override
public void processValueChange(ValueChangeEvent event)
        throws AbortProcessingException {
    logger.log(Level.INFO, "Entering NameChanged.processValueChange");
    if (null != event.getNewValue()) {
        FacesContext.getCurrentInstance().getExternalContext()
                .getSessionMap().put("name", event.getNewValue());
    }
}
 
開發者ID:wwu-pi,項目名稱:tap17-muggl-javaee,代碼行數:10,代碼來源:NameChanged.java

示例10: processValueChange

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
public void processValueChange(ValueChangeEvent e) {

        if (e.getNewValue() == null) {
            setSelectedTenant(null);
            return;
        }

        setSelectedTenant(e.getNewValue().toString());
        selectedMarketplace = null;
    }
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:11,代碼來源:OperatorOrgBean.java

示例11: processValueChange

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
@java.lang.Override
public void processValueChange(ValueChangeEvent event)
        throws AbortProcessingException {
    logger.log(Level.INFO, "Entering QuantityChanged.processValueChange");
    if (null != event.getNewValue()) {
        FacesContext.getCurrentInstance().getExternalContext().
                getSessionMap().put("changed", "true");
    } else {
        FacesContext.getCurrentInstance().getExternalContext().
                getSessionMap().put("changed", "false");
    }
}
 
開發者ID:wwu-pi,項目名稱:tap17-muggl-javaee,代碼行數:13,代碼來源:QuantityChanged.java

示例12: marketplaceChanged

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
public void marketplaceChanged(ValueChangeEvent event) {
    marketplaceChanged = true;
    String selectedMarketplaceId = (String) event.getNewValue();
    setMarketplaceCategories(selectedMarketplaceId);

    if (ce != null
            && ce.getCategories() != null
            && ce.getMarketplace() != null
            && ce.getMarketplace().getMarketplaceId()
                    .equals(selectedMarketplaceId)) {
        checkCategorySelection(ce.getCategories());
    }
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:14,代碼來源:ServiceBean.java

示例13: technicalServiceChanged

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
/**
 * Called by the value changed listener of the technical service
 * selectionOneMenu.
 */
public void technicalServiceChanged(ValueChangeEvent event) {
    Long newServiceKey = (Long) event.getNewValue();
    techServiceBean
            .setSelectedTechnicalServiceKeyWithExceptionAndRefresh(newServiceKey
                    .longValue());
    supplierIdToAdd = null;
    // Force a refresh of the displayed suppliers
    suppliersForTechnicalService = null;
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:14,代碼來源:OrganizationBean.java

示例14: selectedOrderChanged

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
public void selectedOrderChanged(ValueChangeEvent vce) {
currentOrderTO = null;
  	try {
      	String orderNumber = null;
  		orderNumber = (String)vce.getNewValue();
  		log.info("Selected order: " + orderNumber);
  		currentOrderTO = goFacade.load(orderNumber);
  		searchOrderList = "";
  	}
  	catch( Exception e) {
  		log.error(e.getMessage(), e);
  	}
  }
 
開發者ID:salimvanak,項目名稱:myWMS,代碼行數:14,代碼來源:ShippingBean.java

示例15: searchForLecturers

import javax.faces.event.ValueChangeEvent; //導入方法依賴的package包/類
/**
 * Searches for users in the whole system who are lecturers with the UserInput query string
 * given via ValueChangeEvent.
 */
public void searchForLecturers(ValueChangeEvent vce) {
    String query = (String) vce.getNewValue();
    log.debug("searchForLecturers called with input: " + query);
    if (query == null || query.trim().isEmpty()) {
        return;
    }

    searchResultList = userService.searchForLecturers(query);
}
 
開發者ID:stefanoberdoerfer,項目名稱:exmatrikulator,代碼行數:14,代碼來源:CommonDataController.java


注:本文中的javax.faces.event.ValueChangeEvent.getNewValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。