See
http://www.webmacro.org
With WebMacro, from the programmers viewpoint all you have
to do to make an array of customers available is this:
Customer[] people = ...
context.put("Customers", people);
WebMacro passes you a hashtable called "context", you just drop anything
you like into it. Then you load a template and pass this hashtable
to it. WebMacro does the rest.
WebMacro will analyze your customer class and automatically open it
up so that in the template you can write:
#foreach $cust in $Customers {
<li>$Customer.Name owes $Customer.Billing.totalOwing()
}
WebMacro by default works with bean-like names, so the above assumes your
Customer class has methods like
String getName()
Account getBilling()
but in case you want to access something else, you can call the
Account.totalBilling() method explicitly.
In other words, minimal work for the programmer and total separation
of HTML from servlet code. Your page designer will thank you for
that, and your code will be more readable.
Justin
http://www.webmacro.org
Quoting Robb Shecter ([EMAIL PROTECTED]):
> Paul Philion wrote:
>
> > Greetings...
> >
> > [Sorry, I deleted the original posting.]
> >
> > I have a question: Why use a "HTML generator" when there are several
> > templete evaluation engines available?
>
> Hi.
>
> What's a typical template evaluation system? How does the code look that servlet
> programmers must write when they use it?
>
> Thanks,
> Robb
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html