This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm redesigning a few related views to reuse common components. Currently (in experimental phase) I'm using include actions, and passing pages parameters with request-scoped variables (so far: collections, strings and booleans). I'm not exactly happy with this, because it feels dirty.
A stripped example:
Because the parameters are request scoped, there's a chance of similarly named variables being contaminated or inadvertently re-used. So basically, I want to do it another way. After reading the Struts Tiles taglib documentation I couldn't find a way to pass collections as a parameter. Am I wrong? It appears you can pass pages, strings and definitions, but so far I haven't found a way to pass objects of other types. I suppose this goes beyong templating, which is what Tiles is trying to do. Even if it's misusing Tiles, it would have solved the scope issue.
I'm considering the include directive which would let me keep variables within the page scope and take away the need to pass them.
Also, custom tags. I personally don't want to develop custom tags to contain the limited logic that the components have. However, it is the cleanest solution I can think of.
Is there a method I'm missing? I welcome any advice as to which way to go.