Hello all,
I'm interested in rendering a component template that I can selectively
declare. For example, I'd like to do something like the following:
<<<<<MyPage.java>>>>>
public class MyPage {
@Component
private Fruit myFruit;
Object onAction(String switchValue) {
if(switchValue.equals("apple") {
myFruit = new Apple();
} else {
myFruit = new Banana();
}
}
}
<<<<<MyPage.html>>>>>
<t:fruit/>
<a t:type="actionlink" context="literal:apple">Make me an Apple!</a>
I'll save you from having to read the "Apple.html" and "Banana.html"
component templates. :-)
Anyway, I'm pretty sure it's not this easy, and I was wondering what's
the "best practice" for accomplishing what I'm after.
Thanks!
Joel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]