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


Java RedirectToUrlException类代码示例

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


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

示例1: AbstractFormPage

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
public AbstractFormPage(@Nullable ActionContext context, @Nullable Class<? extends SType<?>> formType) {
    if (context == null) {
        String url = singularServerMetadata.getServerBaseUrl();
        getLogger().info(" Redirecting to {}", url);
        throw new RedirectToUrlException(url);
    }

    this.config = new FormPageExecutionContext(Objects.requireNonNull(context), getTypeName(formType), getFlowResolver(context), getRequirementSender(context));
    this.formKeyModel = $m.ofValue();
    this.parentRequirementFormKeyModel = $m.ofValue();
    this.inheritParentFormData = $m.ofValue();
    this.typeName = config.getFormName();
    this.singularFormPanel = new SingularFormPanel("singular-panel");
    onBuildSingularFormPanel(singularFormPanel);

    context.getInheritParentFormData().ifPresent(inheritParentFormData::setObject);

    if (this.config.getFormName() == null) {
        throw new SingularServerException("Tipo do formulário da página nao foi definido");
    }
}
 
开发者ID:opensingular,项目名称:singular-server,代码行数:22,代码来源:AbstractFormPage.java

示例2: ApplicationAccessTemplate

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
public ApplicationAccessTemplate(PageParameters parameters) {
	super(parameters);
	
	if (Boolean.TRUE.equals(propertyService.get(MAINTENANCE)) && !authenticationService.hasAdminRole()
			&& hasMaintenanceRestriction()) {
		throw new RedirectToUrlException(propertyService.get(MAINTENANCE_URL));
	}
	
	add(new EnvironmentPanel("environment"));
	
	add(new AnimatedGlobalFeedbackPanel("feedback"));
	
	add(new TransparentWebMarkupContainer("htmlRootElement")
			.add(AttributeAppender.append("lang", BasicApplicationSession.get().getLocale().getLanguage())));
	
	addHeadPageTitlePrependedElement(new BreadCrumbElement(new ResourceModel("common.rootPageTitle")));
	add(createHeadPageTitle("headPageTitle"));
	
	add(new CoreLabel("title", getTitleModel()));
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:21,代码来源:ApplicationAccessTemplate.java

示例3: startTimer

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
private void startTimer(IPartialPageRequestHandler handler) {
	label.add(new OmRedirectTimerBehavior(DELAY, labelId) {
		private static final long serialVersionUID = 1L;

		@Override
		protected void onFinish(AjaxRequestTarget target) {
			if (Strings.isEmpty(url)) {
				throw new RestartResponseException(Application.get().getHomePage());
			} else {
				throw new RedirectToUrlException(url);
			}
		}
	});
	if (handler != null) {
		handler.add(label);
	}
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:18,代码来源:RedirectMessageDialog.java

示例4: additionalMenuPerformed

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
private void additionalMenuPerformed(MainMenuItem menu) {
	LOGGER.trace("additionalMenuPerformed: {}", menu);

    if (menu.getPageClass() != null) {
        setResponsePage(menu.getPageClass());
    } else {
        throw new RedirectToUrlException(((AdditionalMenuItem)menu).getTargetUrl());
    }
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:10,代码来源:MainMenuPanel.java

示例5: createOptionsDropdown

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
protected Component createOptionsDropdown(final ResourceInfoModel resourceInfoModel) {
    final ArrayList options = Lists.newArrayList(
            new BootstrapDropdown.DropdownMenuItem("Process with Language Resource Switchboard", "glyphicon glyphicon-open-file") {
        @Override
        protected Link getLink(String id) {
            return new Link(id) {
                @Override
                public void onClick() {
                    throw new RedirectToUrlException(getLanguageSwitchboardUrl(resourceInfoModel.getObject()));
                }

            };
        }
    }
    );

    return new BootstrapDropdown("dropdown", new ListModel(options)) {
        @Override
        protected Serializable getButtonClass() {
            return null; //render as link, not button
        }

        @Override
        protected Serializable getButtonIconClass() {
            return "glyphicon glyphicon-option-horizontal";
        }

        @Override
        protected boolean showCaret() {
            return false;
        }

    };
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:35,代码来源:ResourceLinksPanel.java

示例6: buildContent

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
protected void buildContent() {
        queue(new Label("nome", $m.ofValue(SingularSession.get().getName())));

        WebMarkupContainer avatar    = new WebMarkupContainer("codrh");
        Optional<String>   avatarSrc = Optional.ofNullable(null);
        avatarSrc.ifPresent(src -> avatar.add($b.attr("src", src)));
        queue(avatar);
        avatar.setVisible(avatarSrc.isPresent());

        SecurityAuthPathsFactory securityAuthPathsFactory = new SecurityAuthPathsFactory();
        SecurityAuthPaths        securityAuthPaths        = securityAuthPathsFactory.get();

        Link logout = new Link("logout") {
            @Override
            public void onClick() {
                throw new RedirectToUrlException(securityAuthPaths.getLogoutPath(RequestCycle.get()));
            }
        };

        queue(logout);


//        final WebMarkupContainer opcoesVisuais = new WebMarkupContainer("opcoes-visuais");
//        opcoesVisuais.setRenderBodyOnly(true);
//        opcoesVisuais.setVisible(option.options().size() > 1);
//        opcoesVisuais.queue(buildSkinOptions());
//        queue(opcoesVisuais);
    }
 
开发者ID:opensingular,项目名称:singular-server,代码行数:29,代码来源:TopMenu.java

示例7: resetLogin

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
private void resetLogin(RequestCycle cycle) {
    SecurityAuthPathsFactory securityAuthPathsFactory = new SecurityAuthPathsFactory();
    SecurityAuthPaths securityAuthPaths = securityAuthPathsFactory.get();
    String redirectURL = securityAuthPaths.getLogoutPath(cycle);
    getLogger().info("Redirecting to {}", redirectURL);
    throw new RedirectToUrlException(redirectURL);
}
 
开发者ID:opensingular,项目名称:singular-server,代码行数:8,代码来源:SingularServerContextListener.java

示例8: exit

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
public void exit(IPartialPageRequestHandler handler) {
	exitRoom(room.getClient());
	if (WebSession.getRights().contains(User.Right.Dashboard)) {
		room.getMainPanel().updateContents(ROOMS_PUBLIC, handler);
	} else {
		String url = getBean(ConfigurationDao.class).getString(CONFIG_REDIRECT_URL_FOR_EXTERNAL, "");
		throw new RedirectToUrlException(Strings.isEmpty(url) ? getBaseUrl() : url);
	}
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:10,代码来源:RoomMenuPanel.java

示例9: onSignInSucceeded

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
@Hidden
public void onSignInSucceeded() {
    // If login has been called because the user was not yet logged in, then continue to the
    // original destination, otherwise to the Home page
    final ISavedRequest savedRequest = Roles.getAuthenticationService().getSavedRequest();
    //saved request might be null from spring-security, since redirect to login might have been handled by wicket instead
    if (savedRequest != null && savedRequest.getRedirectUrl() != null) {
        throw new RedirectToUrlException(savedRequest.getRedirectUrl());
    }
    component.continueToOriginalDestination();
    throw new RestartResponseException(ABaseWebApplication.get().getHomePage());
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:13,代码来源:SignIn.java

示例10: newRedirectToUrlException

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
@Override
public RedirectToUrlException newRedirectToUrlException() throws LinkInvalidTargetRuntimeException,
		LinkParameterValidationRuntimeException, LinkParameterInjectionRuntimeException {
	throw invalidException();
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:6,代码来源:InvalidLinkGenerator.java

示例11: newRedirectToUrlException

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
@Override
public RedirectToUrlException newRedirectToUrlException() throws LinkParameterValidationRuntimeException {
	return new RedirectToUrlException(fullUrl());
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:5,代码来源:CorePageLinkDescriptorImpl.java

示例12: newRedirectToUrlException

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
@Override
public RedirectToUrlException newRedirectToUrlException() throws LinkInvalidTargetRuntimeException {
	return new RedirectToUrlException(fullUrl());
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:5,代码来源:CorePageInstanceLinkGenerator.java

示例13: newRedirectToUrlException

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
@Override
public RedirectToUrlException newRedirectToUrlException() throws LinkInvalidTargetRuntimeException,
		LinkParameterValidationRuntimeException, LinkParameterInjectionRuntimeException {
	return delegate().newRedirectToUrlException();
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:6,代码来源:ChainedPageLinkGeneratorImpl.java

示例14: showAuth

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
public static void showAuth(final OAuthServer s) {
	String authUrl = prepareUrlParams(s.getRequestKeyUrl(), s.getClientId(), getRedirectUri(s), null, null, null);
	log.debug("redirectUrl={}", authUrl);
	throw new RedirectToUrlException(authUrl);
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:6,代码来源:SignInPage.java

示例15: redirectToNewPollPage

import org.apache.wicket.request.flow.RedirectToUrlException; //导入依赖的package包/类
public static void redirectToNewPollPage(final PageParameters parameters) {
  throw new RedirectToUrlException(RequestCycle.get().urlFor(NewPollPage.class, parameters).toString());
}
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:4,代码来源:NewPollPage.java


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