In prior Domino web dev it’s been commonplace to define a $$ViewTemplate form for web development, allowing one display framework to be used for multiple views, independent of each view’s structure, labels, etc…
The community has been asking for formulaic view column titles for quite some time, as a means to address a major pain point with developing international applications.
xPages seem to be a possible way to address this. You can include a “view” container control on your page, and then add columns and column headers. Those column headers can have programmatic (i.e. formulaic) labels. Problem solved? Maybe…
BUT, it appears that you have to actually set up each column header and label separately on the xPage.
Is it possible to have an xPage dynamically determine the view shown (e.g. via CGI)? From my plugging around I believe the answer to be “yes”. If so, how can one leverage programmatic column headers?
Subject: one solution
(there may be more, but I’m at an airport right now!) You can always put a view control in a custom control to reuse everywhere…
Subject: I don’t think that gives you computed view title functionality
Thanks for the response, Maureen. That would allow you to swap out views based on a CGI parameter, mostly simulating $$ViewTemplate functionality.
But I think it still doesn’t address computed view header labels. If I have several views, with varying numbers and layouts of columns in each, is it possible to formulaically (or with any other programmatic means) change the header labels?
Is there any other way to do that without creating a separate view container (either on the same xPage or an entirely new one) for each view?
Subject: if the xpage had a view data source on the page…
and it was computed to resolve to differing views, and the view control was bound to the computed data source, and the column header computed its value based on the data source… Yes, I think this could be done!
Subject: Hmmm… I thought that the view control had a static number of column headers.
I couldn’t find a way to have the view control have a dynamic number of column headers. I’ll dig around some more and see what comes up. Thanks again!