throw new SyntaxException(
"The 'type' attribute is required on 'ui:event'!");
}
String eventName = type.getNodeValue();
InputStream is = new ByteArrayInputStream(body.getBytes());
EventParserCommand command = new EventParserCommand();
try {
TemplateParser parser = new TemplateParser(is);
parser.open(); // Needed to initialize things.
// Setup the reader...
TemplateReader reader = new TemplateReader("foo", parser); // TODO: get a real ID
reader.pushTag("event"); // The tag will be popped at the end
// Read the handlers...
command.process(new BaseProcessingContext(),
new ProcessingContextEnvironment(reader, parent, true), eventName);
// Clean up
parser.close();
} catch (IOException e) {
// TODO Auto-generated catch block