Ay, that's a example of usage, but not a usecase, per se, as it doesn't provide any motive or story. Is this something for end users? for component developers? for framework integration? Given the end product being a tool for end users to use, i assume it is not something end users themselves will use.
On Fri, Dec 10, 2010 at 12:38 PM, Antonio Petrelli <antonio.petre...@gmail.com> wrote: > 2010/12/10 Nathan Bubna <nbu...@gmail.com>: >> I haven't actually looked at the autotag stuff. Can you give an >> example usecase? > > Write this: > <snip> > public class PutAttributeModel { > > public void execute(@Parameter(required = true) String name, Object value, > String expression, String role, String type, boolean cascade, > Request request, ModelBody modelBody) throws IOException { > Deque<Object> composeStack = ComposeStackUtil.getComposeStack(request); > Attribute attribute = new Attribute(); > composeStack.push(attribute); > String currentBody = modelBody.evaluateAsString(); > TilesContainer container = TilesAccess.getCurrentContainer(request); > attribute = (Attribute) composeStack.pop(); > putAttributeInParent(attribute, container, composeStack, name, > value, expression, currentBody, role, type, cascade, request); > } > </snip> > > And automatically have JSP tags, Freemarker directive models and > Velocity directive (one parameter: a map) mapping all that parameters. > Notice the compose stack (allows to nest tags between them in a > technology agnostic way), the Request (request abstraction) and > ModelBody (tag/directive body abstraction). > No more implicit parameter maps, no more TLDs to write, only a simple > "execute" method with explicit parameters. > > Antonio > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org > For additional commands, e-mail: dev-h...@velocity.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org For additional commands, e-mail: dev-h...@velocity.apache.org