• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IPageRequestHandler类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.wicket.core.request.handler.IPageRequestHandler的典型用法代码示例。如果您正苦于以下问题:Java IPageRequestHandler类的具体用法?Java IPageRequestHandler怎么用?Java IPageRequestHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IPageRequestHandler类属于org.apache.wicket.core.request.handler包,在下文中一共展示了IPageRequestHandler类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getComponent

import org.apache.wicket.core.request.handler.IPageRequestHandler; //导入依赖的package包/类
private Component getComponent() {
    if (component == null && !NESTED_PAGE_RETRIEVAL.get()) {
        NESTED_PAGE_RETRIEVAL.set(true);
        try {
            final IPageRequestHandler handler = PageRequestHandlerTracker.getLastHandler(RequestCycle.get());
            if (handler != null) {
                if (componentClass != null) {
                    final Component foundComponent = Components.findComponent(componentClass,
                            (Page) handler.getPage());
                    if (foundComponent != null) {
                        return foundComponent;
                    }
                }
                return (Page) handler.getPage();
            }
        } finally {
            NESTED_PAGE_RETRIEVAL.set(false);
        }
    }
    return component;
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:22,代码来源:I18nModel.java


示例2: extractCurrentPage

import org.apache.wicket.core.request.handler.IPageRequestHandler; //导入依赖的package包/类
private Page extractCurrentPage(boolean fullSearch)
{
	final RequestCycle requestCycle = RequestCycle.get();

	IRequestHandler handler = requestCycle.getActiveRequestHandler();

	if (handler == null)
	{
		handler = requestCycle.getRequestHandlerScheduledAfterCurrent();
		
		if(handler==null && fullSearch) {
			handler = OrientDbWebApplication.get().getRootRequestMapper().mapRequest(requestCycle.getRequest());
		}
	}

	if (handler instanceof IPageRequestHandler)
	{
		IPageRequestHandler pageRequestHandler = (IPageRequestHandler)handler;
		return (Page)pageRequestHandler.getPage();
	}
	return null;
}
 
开发者ID:OrienteerBAP,项目名称:wicket-orientdb,代码行数:23,代码来源:OrientDefaultExceptionsHandlingListener.java


示例3: extractCurrentPage

import org.apache.wicket.core.request.handler.IPageRequestHandler; //导入依赖的package包/类
/**
 * Returns the page being rendered when the exception was thrown, or {@code null} if it cannot be extracted.
 *
 * @return a Page
 */
private Page extractCurrentPage() {
    RequestCycle requestCycle = RequestCycle.get();

    if (requestCycle == null) {
        return null;
    }

    IRequestHandler handler = requestCycle.getActiveRequestHandler();

    if (handler == null) {
        handler = requestCycle.getRequestHandlerScheduledAfterCurrent();
    }

    if (handler instanceof IPageRequestHandler) {
        return (Page) ((IPageRequestHandler) handler).getPage();
    } else {
        return null;
    }
}
 
开发者ID:flex-oss,项目名称:flex-ui,代码行数:25,代码来源:DefaultExceptionMapper.java


示例4: getPage

import org.apache.wicket.core.request.handler.IPageRequestHandler; //导入依赖的package包/类
@Nullable
public static Page getPage() {
	if (RequestCycle.get() != null && RequestCycle.get().getActiveRequestHandler() instanceof IPageRequestHandler) {
		return (Page) ((IPageRequestHandler) RequestCycle.get().getActiveRequestHandler()).getPage();	
	} else {
		return null;
	}
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:9,代码来源:WicketUtils.java


示例5: onEndRequest

import org.apache.wicket.core.request.handler.IPageRequestHandler; //导入依赖的package包/类
@Override
public void onEndRequest(final RequestCycle cycle) {
    final IPageRequestHandler handler = PageRequestHandlerTracker.getLastHandler(cycle);
    if (handler != null) {
        PageFactory.get().updatePage((Page) handler.getPage());
    }
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:8,代码来源:PageFactoryUpdatingRequestCycleListener.java


示例6: getCommentedFiles

import org.apache.wicket.core.request.handler.IPageRequestHandler; //导入依赖的package包/类
@SuppressWarnings("unused")
private static List<String> getCommentedFiles() {
	IPageRequestHandler handler = (IPageRequestHandler) RequestCycle.get().getActiveRequestHandler();
	return ((CodeCommentsPage)handler.getPage()).getCommentedFiles();
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:6,代码来源:CodeCommentsPage.java


示例7: initExceptionPages

import org.apache.wicket.core.request.handler.IPageRequestHandler; //导入依赖的package包/类
public static final void initExceptionPages(WebApplication application) {
    application.getExceptionSettings().setUnexpectedExceptionDisplay(
            IExceptionSettings.SHOW_EXCEPTION_PAGE);
    application.getExceptionSettings().setThreadDumpStrategy(
            ThreadDumpStrategy.ALL_THREADS);
    application.getExceptionSettings().setAjaxErrorHandlingStrategy(
            AjaxErrorStrategy.REDIRECT_TO_ERROR_PAGE);

    application.getApplicationSettings().setAccessDeniedPage(
            AccessDeniedPage.class);
    application.getApplicationSettings().setInternalErrorPage(
            InternalErrorPage.class);
    application.getApplicationSettings().setPageExpiredErrorPage(
            PageExpiredErrorPage.class);

    application.getRequestCycleListeners().add(
            new AbstractRequestCycleListener() {
                @Override
                public IRequestHandler onException(RequestCycle cycle,
                        Exception e) {

                    Page currentPage = null;

                    IRequestHandler handler = cycle
                            .getActiveRequestHandler();

                    if (handler == null) {
                        handler = cycle
                                .getRequestHandlerScheduledAfterCurrent();
                    }

                    if (handler instanceof IPageRequestHandler) {
                        IPageRequestHandler pageRequestHandler = (IPageRequestHandler) handler;
                        currentPage = (Page) pageRequestHandler.getPage();
                    }

                    return new RenderPageRequestHandler(new PageProvider(
                            new ExceptionErrorPage(e, currentPage)));
                }
            });

}
 
开发者ID:PkayJava,项目名称:pluggable,代码行数:43,代码来源:FrameworkUtilities.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ColumnType类代码示例发布时间:2022-05-22
下一篇:
Java DatabindingConfig类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap