当前位置: 首页>>代码示例>>Java>>正文


Java RequestContext.getCurrentInstance方法代码示例

本文整理汇总了Java中org.primefaces.context.RequestContext.getCurrentInstance方法的典型用法代码示例。如果您正苦于以下问题:Java RequestContext.getCurrentInstance方法的具体用法?Java RequestContext.getCurrentInstance怎么用?Java RequestContext.getCurrentInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.primefaces.context.RequestContext的用法示例。


在下文中一共展示了RequestContext.getCurrentInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: appendRequestContextCallbackArgs

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
@Override
protected void appendRequestContextCallbackArgs(boolean operationSuccess, String outcome) {
	if (UPDATE_OUTCOME.equals(outcome) && WebUtil.isUserIdLoggedIn(userId)) {
		WebUtil.logout();
	} else {
		RequestContext requestContext = RequestContext.getCurrentInstance();
		if (requestContext != null) {
			requestContext.addCallbackParam(JSValues.AJAX_OPERATION_SUCCESS.toString(), operationSuccess);
			if (operationSuccess && userId != null) {
				WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_USER_PERMISSION_PROFILE_TAB_TITLE_BASE64,
						JSValues.AJAX_USER_PERMISSION_PROFILE_COUNT, MessageCodes.USER_PERMISSION_PROFILES_TAB_TITLE,
						MessageCodes.USER_PERMISSION_PROFILES_TAB_TITLE_WITH_COUNT, userPermissionProfilesOut == null ? null : new Long(userPermissionProfilesOut.size()));
				WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_USER_JOURNAL_TAB_TITLE_BASE64, JSValues.AJAX_USER_JOURNAL_ENTRY_COUNT,
						MessageCodes.USER_JOURNAL_TAB_TITLE, MessageCodes.USER_JOURNAL_TAB_TITLE_WITH_COUNT,
						WebUtil.getJournalCount(JournalModule.USER_JOURNAL, userId));
			}
		}
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:20,代码来源:UserPermissionProfileBean.java

示例2: appendRequestContextCallbackArgs

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
@Override
protected void appendRequestContextCallbackArgs(boolean operationSuccess) {
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (requestContext != null) {
		requestContext.addCallbackParam(JSValues.AJAX_OPERATION_SUCCESS.toString(), operationSuccess);
		WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext,
				JSValues.valueOf("AJAX_" + getQueue().name() + "_ECRF_FIELD_STATUS_ENTRY_TAB_TITLE_BASE64"),
				JSValues.valueOf("AJAX_" + getQueue().name() + "_ECRF_FIELD_STATUS_ENTRY_COUNT"),
				MessageCodes.ECRF_FIELD_STATUS_ENTRY_TAB_TITLE, MessageCodes.ECRF_FIELD_STATUS_ENTRY_TAB_TITLE_WITH_COUNT, new Long(ecrfFieldStatusEntryModel.getRowCount()),
				getQueueName());
	}
	//
	//
	// WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_ECRF_FIELD_STATUS_ENTRY_TAB_TITLE_BASE64, JSValues.AJAX_ECRF_FIELD_STATUS_ENTRY_COUNT,
	// MessageCodes.TRIAL_JOURNAL_TAB_TITLE, MessageCodes.TRIAL_JOURNAL_TAB_TITLE_WITH_COUNT,
	// WebUtil.getJournalCount(JournalModule.TRIAL_JOURNAL, in.getTrialId()));
	// if (operationSuccess && in.getTrialId() != null) {
	// WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_TRIAL_JOURNAL_TAB_TITLE_BASE64, JSValues.AJAX_TRIAL_JOURNAL_ENTRY_COUNT,
	// MessageCodes.TRIAL_JOURNAL_TAB_TITLE, MessageCodes.TRIAL_JOURNAL_TAB_TITLE_WITH_COUNT,
	// WebUtil.getJournalCount(JournalModule.TRIAL_JOURNAL, in.getTrialId()));
	// }
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:23,代码来源:EcrfFieldStatusEntryBean.java

示例3: ValidarDataApolice

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
public boolean ValidarDataApolice() {
    boolean valido = true;
    RequestContext requestContext = RequestContext.getCurrentInstance();
    System.out.println("data inicial " + contrato.getDataContrato());
    if (OperacaoData.compareDates(contrato.getDataInicio(), contrato.getDataFim()) == -1) {
        requestContext.execute("dataFinalInvalido()");
        valido = false;
    } else {
        requestContext.execute("dataFinalValido()");
    }
    if (OperacaoData.compareDates(contrato.getDataContrato(), contrato.getDataInicio()) == -1) {
        valido = false;
        requestContext.execute("dataContratoInvalido()");
    } else {
        requestContext.execute("dataContratoValido()");
    }
    return valido;
}
 
开发者ID:JIGAsoftSTP,项目名称:NICON,代码行数:19,代码来源:ContratoBean.java

示例4: appendRequestContextCallbackArgs

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
@Override
protected void appendRequestContextCallbackArgs(boolean operationSuccess) {
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (requestContext != null) {
		requestContext.addCallbackParam(JSValues.AJAX_OPERATION_SUCCESS.toString(), operationSuccess);
		if (operationSuccess && trialId != null) {
			// WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_VISIT_SCHEDULE_TAB_TITLE_BASE64, JSValues.AJAX_VISIT_SCHEDULE_ITEM_COUNT,
			// MessageCodes.VISIT_SCHEDULE_TAB_TITLE, MessageCodes.VISIT_SCHEDULE_TAB_TITLE_WITH_COUNT, WebUtil.getVisitScheduleItemCount(in.getTrialId(), null));
			WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext,
					JSValues.AJAX_ECRF_FIELD_STATUS_TAB_TITLE_BASE64,
					JSValues.AJAX_ECRF_FIELD_STATUS_COUNT,
					MessageCodes.ECRF_FIELD_STATUS_TAB_TITLE, MessageCodes.ECRF_FIELD_STATUS_TAB_TITLE_WITH_COUNT, new Long(ecrfFieldStatusEntryModel.getRowCount()));
			WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_TRIAL_JOURNAL_TAB_TITLE_BASE64, JSValues.AJAX_TRIAL_JOURNAL_ENTRY_COUNT,
					MessageCodes.TRIAL_JOURNAL_TAB_TITLE, MessageCodes.TRIAL_JOURNAL_TAB_TITLE_WITH_COUNT,
					WebUtil.getJournalCount(JournalModule.TRIAL_JOURNAL, trialId));
		}
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:19,代码来源:EcrfFieldStatusBean.java

示例5: poll

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
public void poll(){
RequestContext requestContextNew = RequestContext.getCurrentInstance();
requestContextNew.update("CPUTEST");
System.out.println("poll called");
}
 
开发者ID:dice-project,项目名称:DICE-Fault-Injection-GUI,代码行数:6,代码来源:CpuView.java

示例6: handleTypeChange

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
public void handleTypeChange() {
	loadSelectedType();
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (requestContext != null && contactDetailType != null) {
		requestContext.addCallbackParam(JSValues.AJAX_CONTACT_DETAIL_TYPE_EMAIL.toString(), contactDetailType.getEmail());
		requestContext.addCallbackParam(JSValues.AJAX_CONTACT_DETAIL_TYPE_PHONE.toString(), contactDetailType.getPhone());
		requestContext.addCallbackParam(JSValues.AJAX_CONTACT_DETAIL_NA.toString(), in.getNa());
		requestContext.addCallbackParam(JSValues.AJAX_CONTACT_DETAIL_TYPE_NOTIFY_PRESET.toString(), contactDetailType.getNotifyPreset());
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:11,代码来源:StaffContactDetailBean.java

示例7: appendRequestContextCallbackArgs

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
@Override
protected void appendRequestContextCallbackArgs(boolean operationSuccess, String outcome) {
	if ((UPDATE_OUTCOME.equals(outcome) || DELETE_OUTCOME.equals(outcome)) && WebUtil.isUserIdentityIdLoggedIn(in.getId())) {
		WebUtil.logout();
	} else {
		RequestContext requestContext = RequestContext.getCurrentInstance();
		if (requestContext != null) {
			requestContext.addCallbackParam(JSValues.AJAX_WINDOW_TITLE_BASE64.toString(), JsUtil.encodeBase64(getTitle(operationSuccess), false));
			requestContext.addCallbackParam(JSValues.AJAX_WINDOW_NAME.toString(), getWindowName(operationSuccess));
			requestContext.addCallbackParam(JSValues.AJAX_OPERATION_SUCCESS.toString(), operationSuccess);
			requestContext.addCallbackParam(JSValues.AJAX_ROOT_ENTITY_CREATED.toString(), out != null);
			WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_STAFF_TAG_TAB_TITLE_BASE64, JSValues.AJAX_STAFF_TAG_VALUE_COUNT,
					MessageCodes.STAFF_TAGS_TAB_TITLE, MessageCodes.STAFF_TAGS_TAB_TITLE_WITH_COUNT, tabCountMap.get(JSValues.AJAX_STAFF_TAG_VALUE_COUNT.toString()));
			WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_STAFF_IMAGE_TAB_TITLE_BASE64, JSValues.AJAX_STAFF_IMAGE_COUNT,
					MessageCodes.STAFF_IMAGE_TAB_TITLE, MessageCodes.STAFF_IMAGE_TAB_TITLE_WITH_COUNT, tabCountMap.get(JSValues.AJAX_STAFF_IMAGE_COUNT.toString()));
			WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_STAFF_CONTACT_DETAIL_TAB_TITLE_BASE64,
					JSValues.AJAX_STAFF_CONTACT_DETAIL_VALUE_COUNT, MessageCodes.STAFF_CONTACT_DETAILS_TAB_TITLE, MessageCodes.STAFF_CONTACT_DETAILS_TAB_TITLE_WITH_COUNT,
					tabCountMap.get(JSValues.AJAX_STAFF_CONTACT_DETAIL_VALUE_COUNT.toString()));
			WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_STAFF_ADDRESS_TAB_TITLE_BASE64, JSValues.AJAX_STAFF_ADDRESS_COUNT,
					MessageCodes.STAFF_ADDRESSES_TAB_TITLE, MessageCodes.STAFF_ADDRESSES_TAB_TITLE_WITH_COUNT, tabCountMap.get(JSValues.AJAX_STAFF_ADDRESS_COUNT.toString()));
			WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_STAFF_STATUS_TAB_TITLE_BASE64, JSValues.AJAX_STAFF_STATUS_ENTRY_COUNT,
					MessageCodes.STAFF_STATUS_TAB_TITLE, MessageCodes.STAFF_STATUS_TAB_TITLE_WITH_COUNT, tabCountMap.get(JSValues.AJAX_STAFF_STATUS_ENTRY_COUNT.toString()));
			WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_STAFF_DUTY_ROSTER_TURN_TAB_TITLE_BASE64, JSValues.AJAX_STAFF_DUTY_ROSTER_TURN_COUNT,
					MessageCodes.STAFF_DUTY_ROSTER_TURNS_TAB_TITLE, MessageCodes.STAFF_DUTY_ROSTER_TURNS_TAB_TITLE_WITH_COUNT,
					tabCountMap.get(JSValues.AJAX_STAFF_DUTY_ROSTER_TURN_COUNT.toString()));
			WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_CV_POSITION_TAB_TITLE_BASE64, JSValues.AJAX_CV_POSITION_COUNT,
					MessageCodes.CV_POSITIONS_TAB_TITLE, MessageCodes.CV_POSITIONS_TAB_TITLE_WITH_COUNT, tabCountMap.get(JSValues.AJAX_CV_POSITION_COUNT.toString()));
			WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_COURSE_PARTICIPATION_STATUS_TAB_TITLE_BASE64,
					JSValues.AJAX_COURSE_PARTICIPATION_STATUS_ENTRY_COUNT, MessageCodes.COURSE_PARTICIPATION_STATUS_TAB_TITLE,
					MessageCodes.COURSE_PARTICIPATION_STATUS_TAB_TITLE_WITH_COUNT, tabCountMap.get(JSValues.AJAX_COURSE_PARTICIPATION_STATUS_ENTRY_COUNT.toString()));
			WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_STAFF_HYPERLINK_TAB_TITLE_BASE64, JSValues.AJAX_STAFF_HYPERLINK_COUNT,
					MessageCodes.STAFF_HYPERLINKS_TAB_TITLE, MessageCodes.STAFF_HYPERLINKS_TAB_TITLE_WITH_COUNT,
					tabCountMap.get(JSValues.AJAX_STAFF_HYPERLINK_COUNT.toString()));
			WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_STAFF_FILE_TAB_TITLE_BASE64, JSValues.AJAX_STAFF_FILE_COUNT,
					MessageCodes.STAFF_FILES_TAB_TITLE, MessageCodes.STAFF_FILES_TAB_TITLE_WITH_COUNT, tabCountMap.get(JSValues.AJAX_STAFF_FILE_COUNT.toString()));
			WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_STAFF_JOURNAL_TAB_TITLE_BASE64, JSValues.AJAX_STAFF_JOURNAL_ENTRY_COUNT,
					MessageCodes.STAFF_JOURNAL_TAB_TITLE, MessageCodes.STAFF_JOURNAL_TAB_TITLE_WITH_COUNT, tabCountMap.get(JSValues.AJAX_STAFF_JOURNAL_ENTRY_COUNT.toString()));
		}
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:41,代码来源:StaffBean.java

示例8: logout

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
private synchronized void logout(String redirectUrl) {
	FacesContext context = FacesContext.getCurrentInstance();
	context.getExternalContext().invalidateSession();
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (requestContext != null) {
		requestContext.addCallbackParam(JSValues.AJAX_OPERATION_SUCCESS.toString(), true);
		requestContext.addCallbackParam(JSValues.AJAX_LOGGED_OUT.toString(), true);
		requestContext.addCallbackParam(JSValues.AJAX_REFERER_BASE64.toString(), redirectUrl);
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:11,代码来源:SessionScopeBean.java

示例9: handlePickCurrentPage

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
public final void handlePickCurrentPage() {
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (requestContext != null) {
		requestContext.addCallbackParam(JSValues.PICK_TARGET_FIELD.toString(), pickTargetField);
		requestContext.addCallbackParam(JSValues.PICK_CURRENT_PAGE_IDS.toString(), getCurrentPageIds());
		requestContext.addCallbackParam(JSValues.PICK_ADD_REMOTE_COMMAND.toString(), addRemoteCommand);
		if (hasOnClick()) {
			requestContext.addCallbackParam(JSValues.PICK_ON_CLICK.toString(), onclick);
		}
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:12,代码来源:PickerBeanBase.java

示例10: handleCategoryChange

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
public void handleCategoryChange() {
	loadSelectedCategory();
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (requestContext != null && category != null) {
		requestContext.addCallbackParam(JSValues.AJAX_JOURNAL_CATEGORY_TITLE_PRESET_BASE64.toString(), JsUtil.encodeBase64(category.getTitlePreset(), false));
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:8,代码来源:JournalBean.java

示例11: handleTypeChange

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
public void handleTypeChange() {
	loadSelectedType();
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (requestContext != null && addressType != null) {
		requestContext.addCallbackParam(JSValues.AJAX_ADDRESS_TYPE_DELIVER_PRESET.toString(), addressType.getDeliverPreset());
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:8,代码来源:StaffAddressBean.java

示例12: handleTypeChange

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
public void handleTypeChange() {
	loadSelectedType();
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (requestContext != null && maintenanceType != null) {
		requestContext.addCallbackParam(JSValues.AJAX_MAINTENANCE_TYPE_TITLE_PRESET_BASE64.toString(), JsUtil.encodeBase64(maintenanceType.getTitlePreset(), false));
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:8,代码来源:InventoryMaintenanceBean.java

示例13: handleSectionChange

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
public void handleSectionChange() {
	loadSelectedSection();
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (requestContext != null && cvSection != null) {
		requestContext.addCallbackParam(JSValues.AJAX_CV_SECTION_SHOW_CV_PRESET.toString(), cvSection.getShowCvPreset());
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:8,代码来源:CourseParticipationStatusBeanBase.java

示例14: appendRequestContextCallbackArgs

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
@Override
protected void appendRequestContextCallbackArgs(boolean operationSuccess) {
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (requestContext != null) {
		requestContext.addCallbackParam(JSValues.AJAX_DIALOG_TITLE_BASE64.toString(), JsUtil.encodeBase64(getTitle(), false));
		requestContext.addCallbackParam(JSValues.AJAX_OPERATION_SUCCESS.toString(), operationSuccess);
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:9,代码来源:TimelineTrialTimelineEventBean.java

示例15: appendRequestContextCallbackArgs

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
@Override
protected void appendRequestContextCallbackArgs(boolean operationSuccess) {
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (requestContext != null) {
		requestContext.addCallbackParam(JSValues.AJAX_WINDOW_TITLE_BASE64.toString(), JsUtil.encodeBase64(getTitle(), false));
		requestContext.addCallbackParam(JSValues.AJAX_OPERATION_SUCCESS.toString(), operationSuccess);
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:9,代码来源:TeamMemberPickerBean.java


注:本文中的org.primefaces.context.RequestContext.getCurrentInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。