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

Java RedirectRequestHandler类代码示例

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

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



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

示例1: onSubmit

import org.apache.wicket.request.http.handler.RedirectRequestHandler; //导入依赖的package包/类
@Override
protected void onSubmit()
{
    System.out.println( "form was submitted!" );
    HttpServletRequest servletReq = ( HttpServletRequest ) getRequest().getContainerRequest();
    Principal principal = servletReq.getUserPrincipal();
    if ( principal == null )
    {
        if ( StringUtils.isNotEmpty( userId ) && StringUtils.isNotEmpty( pswdField ) )
        {
            try
            {
                servletReq.login( userId, pswdField );
                setResponsePage( LaunchPage.class );
            }
            catch ( ServletException se )
            {
                String error = "Login form caught ServletException=" + se;
                LOG.error( error );
                getRequestCycle().replaceAllRequestHandlers( new RedirectRequestHandler( "/login/error.html" ) );
            }
        }
        else
        {
            LOG.debug( "null userid or password detected" );
        }
    }
    else
    {
        setResponsePage( LaunchPage.class );
    }
}
 
开发者ID:apache,项目名称:directory-fortress-commander,代码行数:33,代码来源:LoginPage.java


示例2: TopLinksPanel

import org.apache.wicket.request.http.handler.RedirectRequestHandler; //导入依赖的package包/类
public TopLinksPanel(String id, final IModel<String> linkModel, final IModel<String> pageTitleModel) {
    super(id);
    this.linkModel = linkModel;
    this.pageTitleModel = pageTitleModel != null ? pageTitleModel : new Model<String>(null);
    shareMenu = new BootstrapDropdown("shareOptions", new ListModel<>(getShareMenuOptions())) {
        @Override
        protected Component createDropDownLink(String id) {

            return super.createDropDownLink(id)
                    .add(new AttributeAppender("class", "btn-sm", " "));
        }

        @Override
        protected Serializable getButtonIconClass() {
            return "fa fa-share-alt";
        }

    };

    add(shareMenu);

    // modal dialogue for bookmark/copy link
    linkModal = new BootstrapModal("linkPanel") {
        @Override
        protected IModel<String> getTitle() {
            return Model.of("Page link");
        }
    };
    modalBookmarkLinkPanel = new BookmarkLinkPanel(linkModal.getContentId(), linkModel, pageTitleModel);
    add(linkModal.add(modalBookmarkLinkPanel));

    // inline 'dialogue' for bookmark/copy link (non-js alternative for modal)
    inlineBookmarkLinkPanelVisibilityModel = Model.of(false);
    add(new WebMarkupContainer("inlineBookmarkPanel") {
        @Override
        protected void onConfigure() {
            setVisible(inlineBookmarkLinkPanelVisibilityModel.getObject());
        }
    }
            .add(inlineBookmarkLinkPanel = new BookmarkLinkPanel("linkPanel", linkModel, pageTitleModel))
            .add(new Link("close") {
                @Override
                public void onClick() {
                    inlineBookmarkLinkPanelVisibilityModel.setObject(false);
                }
            })
    );

    // feedback link
    add(new Link("feedback") {

        @Override
        public void onClick() {
            // construct a feedback URL; this takes the current page URL as a parameter
            // (needs to be URL encoded)
            final String thisPageUrlParam = UrlEncoder.QUERY_INSTANCE.encode(linkModel.getObject(), "UTF-8");
            final String feedbackUrl = vloConfig.getFeedbackFromUrl() + thisPageUrlParam;
            // tell Wicket to redirect to the constructed feedback URL
            getRequestCycle().scheduleRequestHandlerAfterCurrent(new RedirectRequestHandler(feedbackUrl));
        }
    });
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:63,代码来源:TopLinksPanel.java


示例3: initComponent

import org.apache.wicket.request.http.handler.RedirectRequestHandler; //导入依赖的package包/类
private void initComponent() {
   	String urlForgot = signUpLinks.getForgottenUrl();
   	getRequestCycle().scheduleRequestHandlerAfterCurrent(new 
   		    RedirectRequestHandler(urlForgot));
       	
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:7,代码来源:LoginForgotPage.java


示例4: initComponent

import org.apache.wicket.request.http.handler.RedirectRequestHandler; //导入依赖的package包/类
private void initComponent() {
	String urlMailSupport = contactUsBean.getMailTo();
	getRequestCycle().scheduleRequestHandlerAfterCurrent(new RedirectRequestHandler( "mailto:" + urlMailSupport));
	
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:6,代码来源:EmailSupport.java


示例5: initComponent

import org.apache.wicket.request.http.handler.RedirectRequestHandler; //导入依赖的package包/类
private void initComponent() {
   	String urlForCreate = signUpLinks.getSignupUrl();
   	getRequestCycle().scheduleRequestHandlerAfterCurrent(new 
   		    RedirectRequestHandler(urlForCreate));
       	
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:7,代码来源:LoginForNewUserPage.java


示例6: redirect

import org.apache.wicket.request.http.handler.RedirectRequestHandler; //导入依赖的package包/类
public static void redirect(Page page, String url) {
    IRequestHandler requestTarget = new RedirectRequestHandler(url);
    page.getRequestCycle().replaceAllRequestHandlers(requestTarget);
}
 
开发者ID:payneteasy,项目名称:superfly,代码行数:5,代码来源:SSOUtils.java


示例7: SAML2SPBeforeLogout

import org.apache.wicket.request.http.handler.RedirectRequestHandler; //导入依赖的package包/类
public SAML2SPBeforeLogout() {
    super();

    RequestCycle.get().scheduleRequestHandlerAfterCurrent(new RedirectRequestHandler(
            UrlUtils.rewriteToContextRelative("saml2sp/logout", RequestCycle.get())));
}
 
开发者ID:apache,项目名称:syncope,代码行数:7,代码来源:SAML2SPBeforeLogout.java


示例8: redirectToUrl

import org.apache.wicket.request.http.handler.RedirectRequestHandler; //导入依赖的package包/类
/**
 * @param url
 * @see #getUrl(String)
 */
protected void redirectToUrl(final String url)
{
  getRequestCycle().scheduleRequestHandlerAfterCurrent(new RedirectRequestHandler(getUrl(url)));
}
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:9,代码来源:AbstractUnsecureBasePage.java


示例9: CasLogoutPage

import org.apache.wicket.request.http.handler.RedirectRequestHandler; //导入依赖的package包/类
public CasLogoutPage() {
	String logoutUrl = CasUtil.getLogoutUrl();
	getRequestCycle().scheduleRequestHandlerAfterCurrent(new RedirectRequestHandler(logoutUrl));
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:5,代码来源:CasLogoutPage.java


示例10: CasLoginPage

import org.apache.wicket.request.http.handler.RedirectRequestHandler; //导入依赖的package包/类
public CasLoginPage() {
	String loginUrl = CasUtil.getLoginUrl();
	getRequestCycle().scheduleRequestHandlerAfterCurrent(new RedirectRequestHandler(loginUrl));
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:5,代码来源:CasLoginPage.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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