AjaxPage.java revision cfba646ddfa9d543f0c40e4c7788c65b4a24b34d
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: AjaxPage.java,v 1.24 2010/01/04 19:15:16 veiming Exp $
*
* Portions Copyrighted 2011-2015 ForgeRock AS.
*/
public ActionLink checkPasswordsLink =
public ActionLink validateInputLink =
public ActionLink resetSessionAttributesLink =
new ActionLink("resetSessionAttributes", this,
"resetSessionAttributes");
public static final String OLD_RESPONSE_TEMPLATE = "{\"isValid\":${isValid}, \"errorMessage\":\"${errorMessage}\"}";
private static int MIN_PASSWORD_SIZE = 8;
private boolean rendering = false;
// localization properties
public AjaxPage() {
}
public void onInit() {
super.onInit();
addModel("page", this);
}
public boolean isRendering() {
return rendering;
}
return value;
}
return false;
}
return true;
} else {
return false;
}
}
int intValue = 0;
try {
} catch ( NumberFormatException e ) {}
}
return intValue;
}
protected void writeValid() {
writeValid( null );
}
writeJsonResponse(true, out);
}
writeJsonResponse( false, out );
}
}
}
try {
// Note: this writer is obtained from the Apache Click context. Should this be triggered by a JSP this
// may not be in compliance with the JSP spec regarding mandatory use of the buffered JspWriter.
this.rendering = true;
} catch ( IOException e ) {
throw new RuntimeException( e );
}
}
public void initializeResourceBundle() {
}
} else {
if ((acceptLangHeader != null) &&
{
} else {
}
}
try {
} catch (MissingResourceException mre) {
// do nothing
}
}
}
}
}
try {
} catch (MissingResourceException mre) {
// do nothing
}
}
public String getHostName() {
}
return hostName;
}
try {
} catch (MalformedURLException mue) {
return defaultHostName;
}
}
try {
} catch (MalformedURLException mue) {
return defaultPort;
}
}
}
if (idx != -1) {
}
tmp;
}
return basedir;
}
public String getCookieDomain() {
try {
if (lastidx == -1) {
return "." + hostname;
} else {
return "";
}
} else {
}
} catch (IOException ioe) {
return "";
}
}
public boolean validateInput() {
responseString = "missing.required.field";
} else {
}
return false;
}
public boolean resetSessionAttributes() {
try {
try {
} catch (IllegalAccessException e) {
//ingore
}
}
} catch (SecurityException e) {
writeToResponse(e.getMessage());
}
return false;
}
}
}
public boolean checkPasswords() {
} else {
} else {
}
}
return false;
}
}