本文整理了Java中org.apache.wicket.Request.getParameters
方法的一些代码示例,展示了Request.getParameters
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getParameters
方法的具体详情如下:
包路径:org.apache.wicket.Request
类名称:Request
方法名:getParameters
[英]Gets an array of multiple parameters by name.
[中]按名称获取多个参数的数组。
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* Gets the request parameters for this component as strings.
*
* @return The values in the request for this component
*/
public String[] getInputAsArray()
{
String[] values = getRequest().getParameters(getInputName());
if (!isInputNullable())
{
if (values != null && values.length == 1 && values[0] == null)
{
// we the key got passed in (otherwise values would be null),
// but the value was set to null.
// As the servlet spec isn't clear on what to do with 'empty'
// request values - most return an empty string, but some null -
// we have to workaround here and deliberately set to an empty
// string if the the component is not nullable (text components)
return EMPTY_STRING_ARRAY;
}
}
return values;
}
代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket
/**
* Gets the request parameters for this component as strings.
*
* @return The values in the request for this component
*/
public String[] getInputAsArray()
{
String[] values = getRequest().getParameters(getInputName());
if (!isInputNullable())
{
if (values != null && values.length == 1 && values[0] == null)
{
// we the key got passed in (otherwise values would be null),
// but the value was set to null.
// As the servlet spec isn't clear on what to do with 'empty'
// request values - most return an empty string, but some null -
// we have to workaround here and deliberately set to an empty
// string if the the component is not nullable (text components)
return EMPTY_STRING_ARRAY;
}
}
return values;
}
代码示例来源:origin: org.wicketstuff/multi-text-input
public void updateModel() {
super.updateModel();
// do one more step by setting our model with the removed items
// in case the user of the component needs this convenience
String[] removed = getRequest().getParameters("removed_" + getInputName());
MultiTextInputModel<Collection<T>> model = (MultiTextInputModel<Collection<T>>) this.getModel();
model.setRemovedItems(convertInput(removed));
}
内容来源于网络,如有侵权,请联系作者删除!