本文整理了Java中org.jboss.seam.core.Events.instance()
方法的一些代码示例,展示了Events.instance()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Events.instance()
方法的具体详情如下:
包路径:org.jboss.seam.core.Events
类名称:Events
方法名:instance
暂无
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base
/**
* Dispatches an event to get interested components informed when a changeable document was created (thus not saved)
* and before the form is displayed.
*/
public static void raiseEventsOnDocumentCreate(DocumentModel document) {
Events.instance().raiseEvent(EventNames.NEW_DOCUMENT_CREATED);
}
代码示例来源:origin: org.jboss.seam/jboss-seam
@Override
protected void process()
{
Events.instance().raiseEvent(type, parameters);
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-core
protected void notifyChildrenChanged(DocumentModel containerDocument) {
if (containerDocument != null) {
Events.instance().raiseEvent(DOCUMENT_CHILDREN_CHANGED, containerDocument);
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void setUsername(String username)
{
if (this.username != username && (this.username == null || !this.username.equals(username)))
{
this.username = username;
invalid = false;
if (Events.exists()) Events.instance().raiseEvent(EVENT_CREDENTIALS_UPDATED);
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
/**
* Clears any roles added by calling addRole() while not authenticated.
* This method may be overridden by a subclass if different
* pre-authentication logic should occur.
*/
protected void preAuthenticate()
{
preAuthenticationRoles.clear();
if (Events.exists()) Events.instance().raiseEvent(EVENT_PRE_AUTHENTICATE);
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void setPassword(String password)
{
if (this.password != password && (this.password == null || !this.password.equals(password)))
{
this.password = password;
invalid = false;
if (Events.exists()) Events.instance().raiseEvent(EVENT_CREDENTIALS_UPDATED);
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void remove(String name)
{
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name);
additions.remove(name);
removals.add(name);
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name);
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void remove(String name)
{
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name);
map.remove(name);
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name);
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void raiseEventsAfterPhase(PhaseEvent event)
{
if ( Contexts.isApplicationContextActive() )
{
Events.instance().raiseEvent("org.jboss.seam.afterPhase", event);
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void set(String name, Object value)
{
// We can't raise a preSetVariable event for Events itself because it doesn't exist yet...
if ( !Seam.getComponentName(Events.class).equals(name) && Events.exists() )
{
Events.instance().raiseEvent("org.jboss.seam.preSetVariable." + name);
}
map.put(name, value);
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postSetVariable." + name);
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void afterProcessValidations(FacesContext facesContext)
{
failed = facesContext.getRenderResponse();
if (failed)
{
Events.instance().raiseEvent("org.jboss.seam.validationFailed");
}
succeeded = !failed;
}
代码示例来源:origin: org.jboss.seam/jboss-seam
protected void raiseEndEventIfNecessary()
{
if ( processInstance.hasEnded() )
{
Events.instance().raiseEvent(
"org.jboss.seam.endPageflow." +
processInstance.getProcessDefinition().getName()
);
Events.instance().raiseEvent(
"org.jboss.seam.endPageflow");
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void set(String name, Object value)
{
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preSetVariable." + name);
getCurrentWritableMap().put( getKey(name), value );
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postSetVariable." + name);
}
代码示例来源:origin: org.jboss.seam/jboss-seam
protected void noConversation()
{
Events.instance().raiseEvent("org.jboss.seam.noConversation");
FacesMessages.instance().addFromResourceBundleOrDefault(
StatusMessage.Severity.WARN,
"org.jboss.seam.NoConversation",
"The conversation ended, timed out or was processing another request"
);
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base
@Override
public void setCurrentTabIds(String tabIds) {
if (tabIds != null && tabIds.startsWith(MAIN_TABS_CATEGORY) && currentTabActions.getCurrentTabIds() != null
&& !currentTabActions.getCurrentTabIds().startsWith(tabIds)) {
Events.instance().raiseEvent(EventNames.MAIN_TABS_CHANGED);
}
currentTabActions.setCurrentTabIds(actionManager, createActionContext(), tabIds);
// reset subtabs just in case
resetSubTabs();
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public String getUsername()
{
if (!isInitialized() && Events.exists())
{
setInitialized(true);
Events.instance().raiseEvent(EVENT_INIT_CREDENTIALS, this);
}
return username;
}
代码示例来源:origin: org.jboss.seam/jboss-seam
/**
* Force the resource bundle to reload, using the current locale,
* and raise the org.jboss.seam.timeZoneSelected event
*/
public void select()
{
setCookieValueIfEnabled( getTimeZoneId() );
if ( Events.exists() )
{
Events.instance().raiseEvent( "org.jboss.seam.timeZoneSelected", getTimeZoneId() );
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void logout()
{
if (isLoggedIn())
{
unAuthenticate();
Session.instance().invalidate();
if (Events.exists()) Events.instance().raiseEvent(EVENT_LOGGED_OUT);
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
@AroundInvoke
public Object aroundInvoke(InvocationContext invocation) throws Exception
{
Method method = invocation.getMethod();
if ( isNoConversationForConversationalBean(method) )
{
Events.instance().raiseEvent("org.jboss.seam.noConversation");
throw new NoConversationException( "no long-running conversation for @Conversational bean: " + getComponent().getName() );
}
return invocation.proceed();
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base
public void toggleConfigurationForCurrentDocument(String configurationFacet) {
DocumentModel currentDocument = navigationContext.getCurrentDocument();
if (currentDocument.hasFacet(configurationFacet)) {
currentDocument.removeFacet(configurationFacet);
} else {
currentDocument.addFacet(configurationFacet);
}
documentManager.saveDocument(currentDocument);
navigationContext.invalidateCurrentDocument();
documentManager.save();
Events.instance().raiseEvent(EventNames.LOCAL_CONFIGURATION_CHANGED, navigationContext.getCurrentDocument());
}
内容来源于网络,如有侵权,请联系作者删除!