I am trying to generate an xml file using Rythm template and I get the org.rythmengine.utils.TextBuilder
build() error when I add an @if()
condition with a @for()
loop.
@if(errorObjs != null) {
<Errors>
@for(ErrorObject errObj : errorObjs) {
<Error>
<ErrorCode>@errObj.errorid</ErrorCode>
<ErrorMessage>@errObj.errorcode</ErrorMessage>
</Error>
}
</Errors>
}
There is nothing wrong with your template try the code below at:
http://fiddle.rythmengine.org/#/editor
The issue might be in your Java Code.