本文整理汇总了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;
}
示例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);
}
};
}
示例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;
}
示例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;
}
示例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);
}