mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
18484: Merged DEV-TEMPORARY to V3.2 18478: XForms errors - ACT 15969 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18485 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -33,6 +33,7 @@ import java.util.List;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
import javax.faces.context.ExternalContext;
|
import javax.faces.context.ExternalContext;
|
||||||
import javax.faces.context.FacesContext;
|
import javax.faces.context.FacesContext;
|
||||||
@@ -179,6 +180,8 @@ public class XFormsBean implements Serializable
|
|||||||
private AVMBrowseBean avmBrowseBean;
|
private AVMBrowseBean avmBrowseBean;
|
||||||
private NavigationBean navigator;
|
private NavigationBean navigator;
|
||||||
|
|
||||||
|
private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
|
||||||
|
|
||||||
public static String BEAN_NAME = "XFormsBean";
|
public static String BEAN_NAME = "XFormsBean";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -240,8 +243,17 @@ public class XFormsBean implements Serializable
|
|||||||
final XMLEvent xmle = (XMLEvent)e;
|
final XMLEvent xmle = (XMLEvent)e;
|
||||||
if (XFormsBean.LOGGER.isDebugEnabled())
|
if (XFormsBean.LOGGER.isDebugEnabled())
|
||||||
XFormsBean.LOGGER.debug("received event " + xmle.getType() + ": " + xmle);
|
XFormsBean.LOGGER.debug("received event " + xmle.getType() + ": " + xmle);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock.writeLock().lock();
|
||||||
XFormsBean.this.xformsSession.eventLog.add(xmle);
|
XFormsBean.this.xformsSession.eventLog.add(xmle);
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
lock.writeLock().unlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// interaction events my occur during init so we have to register before
|
// interaction events my occur during init so we have to register before
|
||||||
@@ -631,6 +643,11 @@ public class XFormsBean implements Serializable
|
|||||||
final Document result = XMLUtil.newDocument();
|
final Document result = XMLUtil.newDocument();
|
||||||
final Element eventsElement = result.createElement("events");
|
final Element eventsElement = result.createElement("events");
|
||||||
result.appendChild(eventsElement);
|
result.appendChild(eventsElement);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock.readLock().lock();
|
||||||
|
|
||||||
for (XMLEvent xfe : this.xformsSession.eventLog)
|
for (XMLEvent xfe : this.xformsSession.eventLog)
|
||||||
{
|
{
|
||||||
final String type = xfe.getType();
|
final String type = xfe.getType();
|
||||||
@@ -695,7 +712,21 @@ public class XFormsBean implements Serializable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
lock.readLock().unlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock.writeLock().lock();
|
||||||
this.xformsSession.eventLog.clear();
|
this.xformsSession.eventLog.clear();
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
lock.writeLock().unlock();
|
||||||
|
}
|
||||||
|
|
||||||
if (LOGGER.isDebugEnabled())
|
if (LOGGER.isDebugEnabled())
|
||||||
{
|
{
|
||||||
|
@@ -1578,9 +1578,9 @@ alfresco.xforms.ComboboxSelect1 = alfresco.xforms.AbstractSelectWidget.extend({
|
|||||||
this.widget = this.domNode;
|
this.widget = this.domNode;
|
||||||
for (var i = 0; i < values.length; i++)
|
for (var i = 0; i < values.length; i++)
|
||||||
{
|
{
|
||||||
if (initial_value && !values[i].valid)
|
if (!values[i].valid)
|
||||||
{
|
{
|
||||||
// skip the invalid value if we have a default value
|
// always skip the invalid values for combos
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var option = new Element("option");
|
var option = new Element("option");
|
||||||
|
Reference in New Issue
Block a user