final protected void populate(Map objectModel, String instanceId, String xpath) throws PreceptorViolationException, InvalidXPathSyntaxException {
Request request = ObjectModelHelper.getRequest(objectModel);
Session session = request.getSession(false);
if (session != null) {
Instance instance = (Instance) session.getAttribute(instanceId);
if (instance != null) {
String value = request.getParameter(xpath);
//String[] values = request.getParameterValues(xpath);
if (value == null) value = "false";
getLogger().debug("populating into " + String.valueOf(xpath) + " = " + String.valueOf(value));
instance.setValue(xpath, value);
}
}
}