emd = null;
}
if (emd != null)
{
final BeanUtility bu = new BeanUtility(expression);
final ExpressionPropertyMetaData[] expressionProperties = emd.getPropertyDescriptions();
boolean propertiesOpen = false;
for (int i = 0; i < expressionProperties.length; i++)
{
final ExpressionPropertyMetaData metaData = expressionProperties[i];
final String propertyName = metaData.getName();
if (isFilteredProperty(propertyName))
{
continue;
}
if (metaData.isComputed())
{
continue;
}
if (propertiesOpen == false)
{
writer.writeTag(namespaceUri, expressionTag, expressionAttrList, XmlWriterSupport.OPEN);
writer.writeTag(namespaceUri, "properties", XmlWriterSupport.OPEN);// NON-NLS
propertiesOpen = true;
}
copyStaticResources(bundle, state, expression, bu, expressionProperties);
writeExpressionParameter(writer, bu, propertyName, namespaceUri);
}
if (propertiesOpen)
{
writer.writeCloseTag();
writer.writeCloseTag();
}
else
{
writer.writeTag(namespaceUri, expressionTag, expressionAttrList, XmlWriterSupport.CLOSE);
}
}
else
{
// the classic way, in case the expression does not provide any meta-data. This is
// in the code for legacy reasons, as there are many expression implementations out there
// that do not yet provide meta-data descriptions ..
final BeanUtility beanUtility = new BeanUtility(expression);
final String[] propertyNames = beanUtility.getProperties();
for (int i = 0; i < propertyNames.length; i++)
{
final String key = propertyNames[i];
// filter some of the standard properties. These are system-properties