You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Stanton Sievers <ss...@us.ibm.com> on 2011/08/22 19:03:29 UTC
What is the intent of view aliases?
Hi everyone,
In the shindig-project/config/container.js there is configuration provided
for views. Here's an example of what I'm talking about:
.........
"views" : {
"profile" : {
"isOnlyVisible" : false,
"urlTemplate" : "http://localhost$
{CONTEXT_ROOT}/gadgets/profile?{var}",
"aliases": ["DASHBOARD", "default"]
},
........
I see that aliases are being used in
org.apache.shindig.gadgets.process.Processor.getView(GadgetContext,
GadgetSpec) to determine the current view for a gadget. The use case
seems to be that if the exact view name from the context isn't found in
the gadget spec then the aliases for the view name are checked against the
gadget spec. In the case of the snippet I provided above, for example, if
"profile" is not found in the gadget spec, then "DASHBOARD" and "default"
will be checked.
This all makes sense, however, in the common container code (more
specifically osapi.container.GadgetSite.prototype.render), we don't check
the view aliases when deciding what view to render. It only checks the
exact view name and "default". Is this by design or is it simply a bug
that aliases are not being checked as well?
I have a patch that would fix this problem that I can post shortly if this
is indeed a bug.
Thanks,
-Stanton