本文整理汇总了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);
}
示例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());
}
示例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);
}
}