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


Java RequestContext.addCallbackParam方法代码示例

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


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

示例1: 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

示例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_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_LECTURER_TAB_TITLE_BASE64, JSValues.AJAX_LECTURER_COUNT,
				MessageCodes.LECTURERS_TAB_TITLE, MessageCodes.LECTURERS_TAB_TITLE_WITH_COUNT, tabCountMap.get(JSValues.AJAX_LECTURER_COUNT.toString()));
		WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_COURSE_INVENTORY_BOOKING_TAB_TITLE_BASE64, JSValues.AJAX_COURSE_INVENTORY_BOOKING_COUNT,
				MessageCodes.COURSE_INVENTORY_BOOKINGS_TAB_TITLE, MessageCodes.COURSE_INVENTORY_BOOKINGS_TAB_TITLE_WITH_COUNT,
				tabCountMap.get(JSValues.AJAX_COURSE_INVENTORY_BOOKING_COUNT.toString()));
		WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_ADMIN_COURSE_PARTICIPATION_STATUS_TAB_TITLE_BASE64,
				JSValues.AJAX_ADMIN_COURSE_PARTICIPATION_STATUS_ENTRY_COUNT, MessageCodes.ADMIN_COURSE_PARTICIPATION_STATUS_TAB_TITLE,
				MessageCodes.ADMIN_COURSE_PARTICIPATION_STATUS_TAB_TITLE_WITH_COUNT, tabCountMap.get(JSValues.AJAX_ADMIN_COURSE_PARTICIPATION_STATUS_ENTRY_COUNT.toString()));
		WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_COURSE_HYPERLINK_TAB_TITLE_BASE64, JSValues.AJAX_COURSE_HYPERLINK_COUNT,
				MessageCodes.COURSE_HYPERLINKS_TAB_TITLE, MessageCodes.COURSE_HYPERLINKS_TAB_TITLE_WITH_COUNT, tabCountMap.get(JSValues.AJAX_COURSE_HYPERLINK_COUNT.toString()));
		WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_COURSE_FILE_TAB_TITLE_BASE64, JSValues.AJAX_COURSE_FILE_COUNT,
				MessageCodes.COURSE_FILES_TAB_TITLE, MessageCodes.COURSE_FILES_TAB_TITLE_WITH_COUNT, tabCountMap.get(JSValues.AJAX_COURSE_FILE_COUNT.toString()));
		WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_COURSE_JOURNAL_TAB_TITLE_BASE64, JSValues.AJAX_COURSE_JOURNAL_ENTRY_COUNT,
				MessageCodes.COURSE_JOURNAL_TAB_TITLE, MessageCodes.COURSE_JOURNAL_TAB_TITLE_WITH_COUNT, tabCountMap.get(JSValues.AJAX_COURSE_JOURNAL_ENTRY_COUNT.toString()));
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:25,代码来源:CourseBean.java

示例3: appendRequestContextCallbackArgs

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
@Override
protected void appendRequestContextCallbackArgs(boolean operationSuccess, String outcome) {
	if (ADD_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_PASSWORD_TAB_TITLE_BASE64, JSValues.AJAX_PASSWORD_COUNT,
						MessageCodes.PASSWORD_TAB_TITLE, MessageCodes.PASSWORD_TAB_TITLE_WITH_COUNT, userId == null ? null : out != null ? 1l : 0l);
				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,代码行数:19,代码来源:PasswordBean.java

示例4: appendRequestContextCallbackArgs

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
@Override
protected void appendRequestContextCallbackArgs(boolean operationSuccess) {
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (operationSuccess && inputFieldId != null) {
		WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_SELECTION_SET_VALUE_TAB_TITLE_BASE64, JSValues.AJAX_SELECTION_SET_VALUE_COUNT,
				MessageCodes.SELECTION_SET_VALUES_TAB_TITLE, MessageCodes.SELECTION_SET_VALUES_TAB_TITLE_WITH_COUNT, WebUtil.getSelectionSetValueCount(inputFieldId));
		WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_INPUT_FIELD_JOURNAL_TAB_TITLE_BASE64, JSValues.AJAX_INPUT_FIELD_JOURNAL_ENTRY_COUNT,
				MessageCodes.INPUT_FIELD_JOURNAL_TAB_TITLE, MessageCodes.INPUT_FIELD_JOURNAL_TAB_TITLE_WITH_COUNT,
				WebUtil.getJournalCount(JournalModule.INPUT_FIELD_JOURNAL, inputFieldId));
	}
	if (requestContext != null) {
		requestContext.addCallbackParam(JSValues.AJAX_OPERATION_SUCCESS.toString(), operationSuccess);
		// requestContext.addCallbackParam(JSValues.AJAX_INPUT_FIELD_VARIABLE_VALUES_BASE64.toString(),
		// JsUtil.encodeBase64(JsUtil.inputFieldVariableValueToJson(new ArrayList()), false));
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:17,代码来源:DummyInputFieldValueBean.java

示例5: 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

示例6: 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(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_SELECTION_SET_VALUE_TAB_TITLE_BASE64, JSValues.AJAX_SELECTION_SET_VALUE_COUNT,
				MessageCodes.SELECTION_SET_VALUES_TAB_TITLE, MessageCodes.SELECTION_SET_VALUES_TAB_TITLE_WITH_COUNT,
				tabCountMap.get(JSValues.AJAX_SELECTION_SET_VALUE_COUNT.toString()));
		WebUtil.appendRequestContextCallbackTabTitleArgs(requestContext, JSValues.AJAX_INPUT_FIELD_JOURNAL_TAB_TITLE_BASE64, JSValues.AJAX_INPUT_FIELD_JOURNAL_ENTRY_COUNT,
				MessageCodes.INPUT_FIELD_JOURNAL_TAB_TITLE, MessageCodes.INPUT_FIELD_JOURNAL_TAB_TITLE_WITH_COUNT,
				tabCountMap.get(JSValues.AJAX_INPUT_FIELD_JOURNAL_ENTRY_COUNT.toString()));
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:17,代码来源:InputFieldBean.java

示例7: 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

示例8: appendRequestContextCallbackInputModelValuesOutArgs

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
protected void appendRequestContextCallbackInputModelValuesOutArgs(boolean operationSuccess) {
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (requestContext != null) {
		requestContext.addCallbackParam(JSValues.AJAX_OPERATION_SUCCESS.toString(), operationSuccess);
		if (inquiryValuesIn != null && inquiryValuesOut != null && jsInquiryValuesOut != null && jsInquiryValuesOut.size() > 0) {
			ProbandOutVO proband = getProband();
			ArrayList<InquiryValueJsonVO> out = new ArrayList<InquiryValueJsonVO>(jsInquiryValuesOut.size());
			HashMap<Long, InquiryOutVO> inquiryVOsMap = new HashMap<Long, InquiryOutVO>(inquiryValuesOut.size());
			Iterator<InquiryValueOutVO> inquiryIt = inquiryValuesOut.iterator();
			while (inquiryIt.hasNext()) {
				InquiryValueOutVO inquiryValueVO = inquiryIt.next();
				InquiryOutVO inquiryVO = inquiryValueVO.getInquiry();
				if (!CommonUtil.isEmptyString(inquiryVO.getJsVariableName())) {
					inquiryVOsMap.put(inquiryVO.getId(), inquiryVO);
				}
			}
			copyInquiryValuesInToJson(out, inquiryValuesIn, inquiryVOsMap);
			Iterator<InquiryValueJsonVO> jsInquiryValueIt = jsInquiryValuesOut.iterator();
			while (jsInquiryValueIt.hasNext()) {
				InquiryValueJsonVO jsInquiryValue = jsInquiryValueIt.next();
				if (!inquiryVOsMap.containsKey(jsInquiryValue.getInquiryId())) {
					out.add(jsInquiryValue);
				}
			}
			requestContext.addCallbackParam(JSValues.AJAX_INPUT_FIELD_VARIABLE_VALUES_BASE64.toString(), JsUtil.encodeBase64(JsUtil.inputFieldVariableValueToJson(out), false));
			requestContext.addCallbackParam(JSValues.AJAX_INPUT_FIELD_PROBAND_BASE64.toString(), JsUtil.encodeBase64(JsUtil.voToJson(proband), false));
			requestContext.addCallbackParam(JSValues.AJAX_INPUT_FIELD_TRIAL_BASE64.toString(), JsUtil.encodeBase64(JsUtil.voToJson(trial), false));
			requestContext.addCallbackParam(JSValues.AJAX_INPUT_FIELD_PROBAND_ADDRESSES_BASE64.toString(), JsUtil.encodeBase64(JsUtil.voToJson(getProbandAddresses()), false));
			requestContext.addCallbackParam(JSValues.AJAX_INPUT_FIELD_ACTIVE_USER_BASE64.toString(),
					JsUtil.encodeBase64(JsUtil.voToJson(WebUtil.getUser()), false));
		}
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:34,代码来源:InquiryValueBeanBase.java

示例9: handleCategoryChange

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

示例10: keepAliveCallback

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
public void keepAliveCallback() {
	FacesContext context = FacesContext.getCurrentInstance();
	Map map = context.getExternalContext().getRequestParameterMap();
	String ajaxKeepAliveJsCallback = (String) map.get(JSValues.AJAX_KEEP_ALIVE_JS_CALLBACK.toString());
	String ajaxKeepAliveJsCallbackArgs = (String) map.get(JSValues.AJAX_KEEP_ALIVE_JS_CALLBACK_ARGS.toString());
	RequestContext requestContext = RequestContext.getCurrentInstance();
	if (requestContext != null) {
		requestContext.addCallbackParam(JSValues.AJAX_OPERATION_SUCCESS.toString(), true);
		requestContext.addCallbackParam(JSValues.AJAX_KEEP_ALIVE_JS_CALLBACK.toString(), ajaxKeepAliveJsCallback);
		if (ajaxKeepAliveJsCallbackArgs != null) {
			requestContext.addCallbackParam(JSValues.AJAX_KEEP_ALIVE_JS_CALLBACK_ARGS.toString(), ajaxKeepAliveJsCallbackArgs);
		}
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:15,代码来源:ApplicationScopeBean.java

示例11: 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());
		requestContext.addCallbackParam(JSValues.AJAX_CV_SECTION_TITLE_PRESET_BASE64.toString(), JsUtil.encodeBase64(cvSection.getTitlePreset(), false));
	}
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:9,代码来源:CvPositionBean.java

示例12: 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

示例13: 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

示例14: appendRequestContextCallbackTabTitleArgs

import org.primefaces.context.RequestContext; //导入方法依赖的package包/类
public static RequestContext appendRequestContextCallbackTabTitleArgs(RequestContext context,
		JSValues tabTitleBase64Arg,
		JSValues countJsVar,
		String tabTitleMsgCode,
		String tabTitleWithCountMsgCode,
		Long count, Object... args) {
	RequestContext requestContext = context == null ? RequestContext.getCurrentInstance() : context;
	if (requestContext != null) {
		requestContext.addCallbackParam(tabTitleBase64Arg.toString(), JsUtil.encodeBase64(getTabTitleString(tabTitleMsgCode, tabTitleWithCountMsgCode, count, args), false));
		requestContext.addCallbackParam(countJsVar.toString(), count != null ? count : -1l);
	}
	return requestContext;
}
 
开发者ID:phoenixctms,项目名称:ctsms,代码行数:14,代码来源:WebUtil.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.addCallbackParam方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。