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


Java RequestContext.launchDialog方法代码示例

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


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

示例1: poll

import org.apache.myfaces.trinidad.context.RequestContext; //导入方法依赖的package包/类
public void poll(PollEvent event)
{
  FacesContext context = FacesContext.getCurrentInstance();
  UIViewRoot root = context.getApplication().getViewHandler().createView(
                         context, "/demos/simpleDialog.jspx");

  // Launch a dialog with a call to RequestContext
  RequestContext afContext = RequestContext.getCurrentInstance();
  afContext.launchDialog(root, null, event.getComponent(), true, null);
  // Stop the poll from running
  event.getComponent().setRendered(false);
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:13,代码来源:LaunchDialogBean.java

示例2: launchDialog

import org.apache.myfaces.trinidad.context.RequestContext; //导入方法依赖的package包/类
/**
 *
 */
public void launchDialog(boolean useWindow)
{
  RequestContext afContext = RequestContext.getCurrentInstance();
  afContext.launchDialog(getViewRoot(),
                         getDialogParameters(),
                         getComponent(),
                         useWindow,
                         getWindowProperties());
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:13,代码来源:LaunchEvent.java

示例3: queueActionEvent

import org.apache.myfaces.trinidad.context.RequestContext; //导入方法依赖的package包/类
@Override
protected void queueActionEvent(
  FacesContext context,
  UIComponent  component)
{
  FacesBean bean = getFacesBean(component);
  // If there's a non-default action, then just launch away
  if (getActionExpression(component, bean) != null)
  {
    super.queueActionEvent(context, component);
  }
  // Otherwise, we'll fall back to launching the default dialog
  // (This should only happen on devices without support for
  // custom windows - everything else would have just launched
  // a calendar window with the _ldp JS function)
  else
  {
    Object submittedValue = getSubmittedValue(component, bean);
    try
    {
      getConvertedValue(context, component, submittedValue);
    }
    // Not a big deal;  just means that an invalid value was entered,
    // so we'll launch the dialog showing nothing
    catch (ConverterException ce)
    {
      _LOG.fine(ce);
    }


    RequestContext afContext = RequestContext.getCurrentInstance();

    // =-=AEW Parameters?  Shouldn't we pass in the color?
    Map<String, Object> parameters = null;
    afContext.launchDialog(GenericEntry.getGenericEntryViewRoot(context),
                           parameters,
                           component,
                           true,
                           null);
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:42,代码来源:SimpleInputColorRenderer.java


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