mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
beginning to implement linton's updates to xforms screen.
- added ViewRoot which presents a title, rather than a bounding root group. made the xform generator place all components within a single root group to support this. - adding highlighting for the currently selected repeat item. found a bunch of bugs in how the current repeat item is being set. only dispatching the origin repeat select index for nested repeats. correctly setting the repeat index after move operation - updated css to match latest css changes to the product. began implementing support for inherited complex schema types. - adding support for xf:switch and xf:toggle in xforms.js. - refactored and cleaned up a particularly hard to understand part of the xform generator which handles inherited complex types. - not pretty printing the resulting xml from create web content or edit as it introduces unwanted text nodes which can confuse chiba when xsi:nil is used (i'm using xsi:nil to disable validation when i use xsi:type since otherwise there's a NullPointerException in chiba because it doesn't understand complex type definitions). - need to think about the design a bit more before continuing with this. chiba has limitations with how it handles xsi:type which makes it difficult to figure out the correct case to select at schema generation time, especially if the item is repeated. also, currently the generator emits a select1 to select the type which controls the switch. i'm not sure whether i actually want a separate select control to manage the switch... added a test for date types and removed the old one. added a test for inherited types. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4886 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -53,15 +53,21 @@ public class XMLUtil
|
||||
{
|
||||
return XMLUtil.getDocumentBuilder().newDocument();
|
||||
}
|
||||
|
||||
|
||||
/** utility function for serializing a node */
|
||||
public static void print(final Node n, final Writer output)
|
||||
{
|
||||
XMLUtil.print(n, output, true);
|
||||
}
|
||||
|
||||
/** utility function for serializing a node */
|
||||
public static void print(final Node n, final Writer output, final boolean indent)
|
||||
{
|
||||
try
|
||||
{
|
||||
final TransformerFactory tf = TransformerFactory.newInstance();
|
||||
final Transformer t = tf.newTransformer();
|
||||
t.setOutputProperty(OutputKeys.INDENT, "yes");
|
||||
t.setOutputProperty(OutputKeys.INDENT, indent ? "yes" : "no");
|
||||
|
||||
if (LOGGER.isDebugEnabled())
|
||||
{
|
||||
@@ -91,9 +97,15 @@ public class XMLUtil
|
||||
|
||||
/** utility function for serializing a node */
|
||||
public static String toString(final Node n)
|
||||
{
|
||||
return XMLUtil.toString(n, true);
|
||||
}
|
||||
|
||||
/** utility function for serializing a node */
|
||||
public static String toString(final Node n, final boolean indent)
|
||||
{
|
||||
final StringWriter result = new StringWriter();
|
||||
XMLUtil.print(n, result);
|
||||
XMLUtil.print(n, result, indent);
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user