本文整理汇总了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;未经允许,请勿转载。 |
请发表评论