001    package railo.transformer.cfml.attributes.impl;
002    
003    import railo.transformer.bytecode.statement.tag.Attribute;
004    import railo.transformer.bytecode.statement.tag.Tag;
005    import railo.transformer.bytecode.util.ASMUtil;
006    import railo.transformer.cfml.attributes.AttributeEvaluator;
007    import railo.transformer.cfml.attributes.AttributeEvaluatorException;
008    import railo.transformer.library.tag.TagLibTag;
009    
010    public class Transaction implements AttributeEvaluator {
011    
012            public TagLibTag evaluate(TagLibTag tagLibTag, Tag tag) throws AttributeEvaluatorException {
013                    Attribute action = tag.getAttribute("action");
014                    
015                    if(action!=null){
016                            Tag parent = ASMUtil.getAncestorTag(tag, tag.getFullname());
017                            if(parent!=null) {
018                                    tagLibTag=tagLibTag.duplicate(false);
019                                    tagLibTag.setBodyContent("empty");
020                            }
021                    }
022                    
023                    return tagLibTag;
024            }
025    
026    }