One of my domain data types (organization) will be endowed with a type label (an enum). Each different type will need to have, on the page that views the organization, a block that is dependent on that type. These blocks are large and quite complex, so I don't want to define those blocks in the view page's template. I'd like to put them in separate components and then have a chain of command look up the right component based on the type of the organization, return it, and display it.
Schematically, the view page for the organization might look like Organization.tml: <h1>Organization</h1> ... ${myDisplayBlock} ... Organization.java: public Block getMyDisplayBlock () { Block b = null; _orgBlockLookup.findBlock(b, _org.getType()); // Chain of command that sticks the right value in b. return b; } But I'm not sure how to set up that chain of command! Any thoughts out there? -- Bill @ PeoplePad --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]