final FormState entryState = (FormState) request.getContext().getVariable(ENTRY_FIELDS);
boolean isforThisForm = entryState != null && entryState.isForForm(formId);
if (entryState != null && entryState.isForForm(formId)) {
}
final InputField nameField = createdField("username", "User Name", InputField.TEXT, isforThisForm ? entryState : null);
final String width = request.getOptionalProperty("width");
if (width != null) {
final int w = Integer.valueOf(width).intValue();
nameField.setWidth(w);
}
final InputField passwordField = createdField("password", "Password", InputField.PASSWORD, isforThisForm ? entryState : null);
final InputField[] fields = new InputField[] { nameField, passwordField, };
final String formTitle = request.getOptionalProperty(FORM_TITLE);
final String loginButtonTitle = request.getOptionalProperty(BUTTON_TITLE, "Log in");
final String className = request.getOptionalProperty(CLASS, "login");