本文整理匯總了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);
}
示例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);
}
}
示例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);
}
示例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();
}
示例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.");
}
}
示例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();
}
}
}
示例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();
}
}
}
}*/
}
}
示例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());
}
}
示例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;
}
示例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");
}
}
示例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());
}
}
示例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;
}
示例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);
}
}
示例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);
}