• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ResourceReferenceRequestHandler类的典型用法和代码示例

java 1次浏览

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

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

示例1: DMDOnClickIndicatorAttributeModifier

点赞 3

import org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler; //导入依赖的package包/类
/**
 * Constructor of the DMDOnClickIndicatorAttributeModifier. Just create a
 * new instance and attach it to a AjaxLink, AjaxSubmitLink or AjaxButton.
 * 
 * @param parent
 *            A parent component is needed to load the indicator text from a
 *            property file attached to the main page. We use the component
 *            to finde the page.
 */
public DMDOnClickIndicatorAttributeModifier(final Component parent) {
    super(ONCLICK, new LoadableDetachableModel<String>() {
        private static final long serialVersionUID = 1L;

        /**
         * @see org.apache.wicket.model.LoadableDetachableModel#load()
         */
        @Override
        protected String load() {
            return String.format(BLOCKER_SCRIPT, parent.getMarkupId(), getIndicatorUrl(),
                    parent.getString(LOADING_TITLE));
        }

        /**
         * @return url of the animated indicator image
         */
        private CharSequence getIndicatorUrl() {
            return RequestCycle.get().urlFor(new ResourceReferenceRequestHandler(INDICATOR));
        }
    });
}
 

开发者ID:Nocket,
项目名称:nocket,
代码行数:31,
代码来源:DMDOnClickIndicatorAttributeModifier.java

示例2: getBeforeSendHandler

点赞 2

import org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler; //导入依赖的package包/类
@Override
public CharSequence getBeforeSendHandler(Component component) {
	IRequestHandler handler = new ResourceReferenceRequestHandler(
			AbstractPostAjaxBehavior.INDICATOR);
	CharSequence url = RequestCycle.get().urlFor(handler);
	return String.format(""
			+ "$('#%s-working-indicator').remove(); "
			+ "$('#%s').after('<img id=\"%s-working-indicator\" src=\"%s\" class=\"working-indicator\"></img>');", 
			component.getMarkupId(), component.getMarkupId(), component.getMarkupId(), url);
}
 

开发者ID:jmfgdev,
项目名称:gitplex-mit,
代码行数:11,
代码来源:IndicateWorkingListener.java

示例3: getLoadingComponent

点赞 2

import org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler; //导入依赖的package包/类
/**
 * @param markupId The components markupid.
 * @return The component to show while the real component is being created.
 */
public Component getLoadingComponent(final String markupId) {
    IRequestHandler handler = new ResourceReferenceRequestHandler(
            AbstractDefaultAjaxBehavior.INDICATOR);
    return new Label(markupId, "<img alt=\"Loading...\" src=\"" +
            RequestCycle.get().urlFor(handler) + "\"/>").setEscapeModelStrings(false);
}
 

开发者ID:alancnet,
项目名称:artifactory,
代码行数:11,
代码来源:AjaxLazyLoadSpanPanel.java

示例4: isOurContent

点赞 2

import org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler; //导入依赖的package包/类
@Override
public boolean isOurContent(RequestCycle cycle, IRequestHandler handler) {
	if(handler instanceof ResourceReferenceRequestHandler)
	{
		ResourceReferenceRequestHandler rrrHandler = (ResourceReferenceRequestHandler)handler;
		ResourceReference reference = rrrHandler.getResourceReference();
		return !(reference instanceof PackageResourceReference);
	}
	return true;
}
 

开发者ID:OrienteerBAP,
项目名称:wicket-orientdb,
代码行数:11,
代码来源:TransactionRequestCycleListener.java

示例5: ProjectBlobPage

点赞 2

import org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler; //导入依赖的package包/类
public ProjectBlobPage(PageParameters params) {
	super(params);
	
	if (getProject().getDefaultBranch() == null) 
		throw new RestartResponseException(NoBranchesPage.class, paramsOf(getProject()));
	
	List<String> revisionAndPathSegments = new ArrayList<>();
	String segment = params.get(PARAM_REVISION).toString();
	if (segment != null && segment.length() != 0)
		revisionAndPathSegments.add(segment);
	segment = params.get(PARAM_PATH).toString();
	if (segment != null && segment.length() != 0)
		revisionAndPathSegments.add(segment);
	
	for (int i=0; i<params.getIndexedCount(); i++) {
		segment = params.get(i).toString();
		if (segment.length() != 0)
			revisionAndPathSegments.add(segment);
	}

	BlobIdent blobIdent = new BlobIdent(getProject(), revisionAndPathSegments); 
	state = new State(blobIdent);

	String modeStr = params.get(PARAM_MODE).toString();
	if (modeStr != null)
		state.mode = Mode.valueOf(modeStr.toUpperCase());

	resolvedRevision = getProject().getObjectId(state.blobIdent.revision);
	
	state.mark = TextRange.of(params.get(PARAM_MARK).toString());
	
	state.requestId = params.get(PARAM_REQUEST).toOptionalLong();
	
	state.commentId = params.get(PARAM_COMMENT).toOptionalLong();
	
	state.query = params.get(PARAM_QUERY).toString();
	
	if (state.mode == Mode.ADD || state.mode == Mode.EDIT || state.mode == Mode.DELETE) {
		if (!isOnBranch()) 
			throw new IllegalArgumentException("Files can only be edited on branch");
		
		String path = state.blobIdent.path;
		if (path != null && state.blobIdent.isTree())
			path += "/";
		if (!SecurityUtils.canModify(getProject(), state.blobIdent.revision, path))
			unauthorized();
	}

	WebRequest request = (WebRequest) RequestCycle.get().getRequest();
	String accept = request.getHeader("Accept");
	if (accept != null && !accept.startsWith("text/html") && state.blobIdent.isFile()) {
		RequestCycle.get().scheduleRequestHandlerAfterCurrent(
				new ResourceReferenceRequestHandler(new RawBlobResourceReference(), getPageParameters()));
	}
}
 

开发者ID:jmfgdev,
项目名称:gitplex-mit,
代码行数:56,
代码来源:ProjectBlobPage.java

示例6: getIndicatorUrl

点赞 2

import org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler; //导入依赖的package包/类
/**
 * @return url of the animated indicator image
 */
   private CharSequence getIndicatorUrl() {
	IRequestHandler handler = new ResourceReferenceRequestHandler(SPINNER);
	return RequestCycle.get().urlFor(handler);
}
 

开发者ID:U-QASAR,
项目名称:u-qasar.platform,
代码行数:8,
代码来源:AjaxIndicatorAppender.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)