本文整理汇总了Java中org.apache.wicket.PageParameters.remove方法的典型用法代码示例。如果您正苦于以下问题:Java PageParameters.remove方法的具体用法?Java PageParameters.remove怎么用?Java PageParameters.remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.PageParameters
的用法示例。
在下文中一共展示了PageParameters.remove方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRootPageParameters
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
private PageParameters getRootPageParameters() {
if (reusePageParameters()) {
PageParameters pp = getPageParameters();
if (pp != null) {
PageParameters params = new PageParameters(pp);
// remove named project parameter
params.remove("p");
// remove named repository parameter
params.remove("r");
// remove named user parameter
params.remove("user");
// remove days back parameter if it is the default value
if (params.containsKey("db") && params.getInt("db") == app().settings().getInteger(Keys.web.activityDuration, 7)) {
params.remove("db");
}
return params;
}
}
return null;
}
示例2: getRootPageParameters
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
private PageParameters getRootPageParameters() {
if (reusePageParameters()) {
PageParameters pp = getPageParameters();
if (pp != null) {
PageParameters params = new PageParameters(pp);
// remove named project parameter
params.remove("p");
// remove named repository parameter
params.remove("r");
// remove named user parameter
params.remove("user");
// remove days back parameter if it is the default value
if (params.containsKey("db")
&& params.getInt("db") == GitBlit.getInteger(Keys.web.activityDuration, 7)) {
params.remove("db");
}
return params;
}
}
return null;
}
示例3: getRootPageParameters
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
private PageParameters getRootPageParameters() {
if (reusePageParameters()) {
PageParameters pp = getPageParameters();
if (pp != null) {
PageParameters params = new PageParameters(pp);
// remove named project parameter
params.remove("p");
// remove named repository parameter
params.remove("r");
// remove named user parameter
params.remove("user");
// remove days back parameter if it is the default value
if (params.containsKey("db")
&& params.getInt("db") == GitBlit.getInteger(Keys.web.activityDuration, 14)) {
params.remove("db");
}
return params;
}
}
return null;
}
示例4: loginUser
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
private void loginUser(UserModel user) {
if (user != null) {
HttpServletRequest request = ((WebRequest) getRequest()).getHttpServletRequest();
HttpServletResponse response = ((WebResponse) getResponse()).getHttpServletResponse();
// Set the user into the session
GitBlitWebSession session = GitBlitWebSession.get();
// issue 62: fix session fixation vulnerability
session.replaceSession();
session.setUser(user);
request = ((WebRequest) getRequest()).getHttpServletRequest();
response = ((WebResponse) getResponse()).getHttpServletResponse();
request.getSession().setAttribute(Constants.ATTRIB_AUTHTYPE, AuthenticationType.CREDENTIALS);
// Set Cookie
app().authentication().setCookie(request, response, user);
if (!session.continueRequest()) {
PageParameters params = getPageParameters();
if (params == null) {
// redirect to this page
redirectTo(getClass());
} else {
// Strip username and password and redirect to this page
params.remove("username");
params.remove("password");
redirectTo(getClass(), params);
}
}
}
}
示例5: loginUser
import org.apache.wicket.PageParameters; //导入方法依赖的package包/类
private void loginUser(UserModel user) {
if (user != null) {
// Set the user into the session
GitBlitWebSession session = GitBlitWebSession.get();
// issue 62: fix session fixation vulnerability
session.replaceSession();
session.setUser(user);
// Set Cookie
if (GitBlit.getBoolean(Keys.web.allowCookieAuthentication, false)) {
WebResponse response = (WebResponse) getRequestCycle().getResponse();
GitBlit.self().setCookie(response, user);
}
if (!session.continueRequest()) {
PageParameters params = getPageParameters();
if (params == null) {
// redirect to this page
setResponsePage(getClass());
} else {
// Strip username and password and redirect to this page
params.remove("username");
params.remove("password");
setResponsePage(getClass(), params);
}
}
}
}