// Update the form parameters. This involves iterating through all the
// fields removing any protocol specific parameters from the request url
// and adding them to the pure url. Currently the
for (int i = 0; i < count; i += 1) {
FieldDescriptor field = (FieldDescriptor) fields.get(i);
FieldType type = field.getType();
FieldHandler handler = type.getFieldHandler(protocol);
if (logger.isDebugEnabled()) {
logger.debug("Updating parameter(s) for " + field);
}
handler.updateParameterValue(this, field, pureRequestURL,
pureRequestURL);
}
return;
}
if (logger.isDebugEnabled()) {
logger.debug("Session data is " + url.getExternalForm());
}
// Add the parameters from the session into the pure request url.
Map parameterMap = pureRequestURL.getParameterMap();
for (int i = 0; i < count; i += 1) {
FieldDescriptor field = (FieldDescriptor) fields.get(i);
if (logger.isDebugEnabled()) {
logger.debug("Copying parameter(s) for " + field);
}
String name = field.getName();
if (name != null) {
String[] sessionValues = url.getParameterValues(name);
// Don't overwrite values from the current request that haven't yet been stored in
// the session. so:
// - don't add empty parameters