On 8/11/06, Adam Brod <[EMAIL PROTECTED]> wrote:
Hi- I really like the lifecycle methods provided by the Shale ViewController. However, I'm having trouble coming up with a simple ViewController Mapping for Facelets Compositions (aka Tag files). For example, let's say I've got a reusable Portlet-like panel that contains a list of the user's Todos. This panel shows up on lots of different screens through-out the application. Facelets gives me the ability to extract this common code into a Tag file (just like a JSP tag file). This Tag file also uses a request-scoped ViewController, called the TodoViewController that fetches the Todos from a database. Here is an example: MyHomePage.xhtml->TodoTag.xhtml->TodoViewController MyInboxPage.xhtml->TodoTag.xhtml->TodoViewController The two JSF views MyHomePage and MyInboxPage both have references to the TodoTag. Can anybody help me with a strategy for how to map these Tag files? I want to give the ViewController the lifecycle methods without needing to explicitly track every page that uses the tag file. I can't just do the mapping based on the name of the tag file because the tag file isn't the actual JSF view. I don't want to have another xml file that developers are required to keep up-to-date with this mapping.
Hmm ... the closest analog in Shale today is the way it uses the <s:subview> component tag to provide view controller functionality to a subview. Would it be possible to create a Facelets widget for Subview that could do this? (It might also require extending the default ViewControllerMapper, but that's certainly feasible.) Any ideas are greatly appreciated.
Adam Brod Product Development Team
Craig Disclaimer: This electronic mail and any attachments are confidential and
may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.