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


Java IRequestParameters.getParameterValue方法代码示例

本文整理汇总了Java中org.apache.wicket.request.IRequestParameters.getParameterValue方法的典型用法代码示例。如果您正苦于以下问题:Java IRequestParameters.getParameterValue方法的具体用法?Java IRequestParameters.getParameterValue怎么用?Java IRequestParameters.getParameterValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.wicket.request.IRequestParameters的用法示例。


在下文中一共展示了IRequestParameters.getParameterValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: actionDoAction

import org.apache.wicket.request.IRequestParameters; //导入方法依赖的package包/类
private Object actionDoAction(AjaxRequestTarget aTarget, IRequestParameters request, JCas jCas,
        VID paramId)
    throws IOException
{
    StringValue layerParam = request.getParameterValue(PARAM_SPAN_TYPE);
    if (!layerParam.isEmpty()) {
        long layerId = Long.parseLong(layerParam.beforeFirst('_'));
        AnnotationLayer layer = annotationService.getLayer(layerId);
        if (!StringUtils.isEmpty(layer.getOnClickJavascriptAction())) {
            // parse the action
            List<AnnotationFeature> features = annotationService.listAnnotationFeature(layer);
            AnnotationFS anno = WebAnnoCasUtil.selectByAddr(jCas, paramId.getId());
            Map<String, Object> functionParams = OnClickActionParser.parse(layer, features,
                    getModelObject().getDocument(), anno);
            // define anonymous function, fill the body and immediately execute
            String js = String.format("(function ($PARAM){ %s })(%s)",
                    layer.getOnClickJavascriptAction(), JSONUtil.toJsonString(functionParams));
            aTarget.appendJavaScript(js);
        }
    }
    
    return null;
}
 
开发者ID:webanno,项目名称:webanno,代码行数:24,代码来源:BratAnnotationEditor.java

示例2: createUrlFragmentBehavior

import org.apache.wicket.request.IRequestParameters; //导入方法依赖的package包/类
private UrlParametersReceivingBehavior createUrlFragmentBehavior()
{
    return new UrlParametersReceivingBehavior()
    {
        private static final long serialVersionUID = -3860933016636718816L;

        @Override
        protected void onParameterArrival(IRequestParameters aRequestParameters,
                AjaxRequestTarget aTarget)
        {
            aTarget.addChildren(getPage(), IFeedback.class);

            StringValue project = aRequestParameters.getParameterValue(PAGE_PARAM_PROJECT_ID);
            StringValue document = aRequestParameters.getParameterValue(PAGE_PARAM_DOCUMENT_ID);
            StringValue focus = aRequestParameters.getParameterValue(PAGE_PARAM_FOCUS);

            handleParameters(aTarget, project, document, focus, false);
        }
    };
}
 
开发者ID:webanno,项目名称:webanno,代码行数:21,代码来源:AnnotationPage.java

示例3: getUrlFragment

import org.apache.wicket.request.IRequestParameters; //导入方法依赖的package包/类
protected OmUrlFragment getUrlFragment(IRequestParameters params) {
	for (AreaKeys key : AreaKeys.values()) {
		StringValue type = params.getParameterValue(key.name());
		if (!type.isEmpty()) {
			return new OmUrlFragment(key, type.toString());
		}
	}
	return null;
}
 
开发者ID:apache,项目名称:openmeetings,代码行数:10,代码来源:BasePage.java

示例4: newSession

import org.apache.wicket.request.IRequestParameters; //导入方法依赖的package包/类
@Override
public Session newSession(final Request request, final Response response) {
    if(!DEMO_MODE_USING_CREDENTIALS_AS_QUERYARGS) {
        return super.newSession(request, response);
    } 
    
    // else demo mode
    final AuthenticatedWebSessionForIsis s = (AuthenticatedWebSessionForIsis) super.newSession(request, response);
    IRequestParameters requestParameters = request.getRequestParameters();
    final org.apache.wicket.util.string.StringValue user = requestParameters.getParameterValue("user");
    final org.apache.wicket.util.string.StringValue password = requestParameters.getParameterValue("pass");
    s.signIn(user.toString(), password.toString());
    return s;
}
 
开发者ID:TesisTarjetasMejorar,项目名称:TarjetasISIS,代码行数:15,代码来源:SimpleApplication.java

示例5: parse

import org.apache.wicket.request.IRequestParameters; //导入方法依赖的package包/类
@Override
public Result parse(IRequestParameters params) {
    final Set<ClientSideLogObject> logObjects = new HashSet<>();
    final ClientInfos clientInfos = new ClientInfos();
    final List<Integer> parsedIndex = new ArrayList<>();

    for (final String paramName : params.getParameterNames()) {
        final String realParamName = extractRealParamName(paramName);

        switch (realParamName) {
            case ParamNames.TIMESTAMP:
            case ParamNames.LEVEL:
            case ParamNames.MESSAGE:
            case ParamNames.FILE:
            case ParamNames.LINE:
            case ParamNames.STACKTRACE:
                final int index = extractIndex(paramName);

                if (index > -1 && !parsedIndex.contains(index)) {
                    ClientSideLogObject obj = new ClientSideLogObject(params.getParameterValue(ParamNames.LEVEL + DefaultValues.paramSplitter + index),
                                                                      params.getParameterValue(ParamNames.MESSAGE + DefaultValues.paramSplitter + index),
                                                                      params.getParameterValue(ParamNames.TIMESTAMP + DefaultValues.paramSplitter + index),
                                                                      params.getParameterValue(ParamNames.FILE + DefaultValues.paramSplitter + index),
                                                                      params.getParameterValue(ParamNames.LINE + DefaultValues.paramSplitter + index),
                                                                      params.getParameterValue(ParamNames.STACKTRACE + DefaultValues.paramSplitter + index),
                                                                      index);

                    if (obj.isValid()) {
                        logObjects.add(obj);
                    } else {
                        LOG.warn("skip log object because it isn't valid: {}", obj);
                    }

                    parsedIndex.add(index);
                }
                break;

            case ParamNames.AJAX_BASE_URL:
            case ParamNames.SCREEN_SIZE:
            case ParamNames.WINDOW_SIZE:
            case ParamNames.USER_AGENT:
                clientInfos.put(paramName, params.getParameterValue(paramName).toString(DefaultValues.defaultClientInfoValue));
        }
    }

    return new Result(logObjects, clientInfos);
}
 
开发者ID:l0rdn1kk0n,项目名称:wicket-clientside-logging,代码行数:48,代码来源:IParamValueExtractor.java


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