[
https://issues.apache.org/jira/browse/SHINDIG-1596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13091326#comment-13091326
]
[email protected] commented on SHINDIG-1596:
--------------------------------------------------------
bq. On 2011-08-25 15:32:47, Henry Saputra wrote:
bq. > http://svn.apache.org/repos/asf/shindig/trunk/config/container.js, line
160
bq. > <https://reviews.apache.org/r/1657/diff/2/?file=35523#file35523line160>
bq. >
bq. > I dont think we need to add alias for "default" view to other
default view names. The gadget.xml could contain <Content> with no "view"
property which will be set as "default" in Shindig.
bq. >
bq. > When metadata request come, it will contain "default" view as one of
the supported views and it depends on controller in the container to render the
gadget with the right view.
bq. >
bq. > The only aliases we could set for default view is probably empty
string so container could render gadget in default view, which is <Content>
block without view property.
Henry this kind of stems from the conversation I started on the spec list.
There is a disconnect here between the spec and the implementation. There is
no concept of the default view in the spec. The spec never calls out what
content section is called which has no view. In Shindig assumes this is
something called the default view. However the spec also does not state that
every gadget needs to implement the default view. However if the container
does not specify the view to render and the gadget does not have a default
view, than the container fails to render the gadget. In my eyes this is not
right. One way to fix this, is to alias the default view to any other view.
That way if the gadget does not have a default view, ie a content section with
no view, than we can render something.
I guess the bottom line is something needs to change. I would like to resolve
it at a spec level, so all 2.NEXT gadgets and containers will not have this
problem. However I would also like to come up with a solution for 2.0 and
2.NEXT containers can support gadgets developed against prior specs as well.
- Ryan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1657/#review1643
-----------------------------------------------------------
On 2011-08-25 13:18:11, Stanton Sievers wrote:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/1657/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2011-08-25 13:18:11)
bq.
bq.
bq. Review request for Ryan Baxter.
bq.
bq.
bq. Summary
bq. -------
bq.
bq. osapi.container.GadgetSite.prototype.render fails to render a gadget using
a given view when that gadget does not explicitly define that view, even in the
case where the container configuration has aliases for that view.
bq.
bq. For instance, Gadget A supports the "profile" and "canvas" views only. The
container configuration defines the "home" view and provides "profile" as an
alias for "home". In the use case where the container tries to render Gadget A
using the "home" view, gadget render will fail, even though the gadget supports
"profile" and it has been specified as an alias for "home" in the container
configuration.
bq.
bq. This problem commonly manifests itself in Shindig because of the way
"default" views are handled. By default, Shindig will attempt to render the
gadget using the "default" view. If the gadget does not support that view,
rendering will fail.
bq.
bq.
bq. This addresses bug SHINDIG-1596.
bq. https://issues.apache.org/jira/browse/SHINDIG-1596
bq.
bq.
bq. Diffs
bq. -----
bq.
bq. http://svn.apache.org/repos/asf/shindig/trunk/config/container.js
1160327
bq.
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.gadget/gadget_site.js
1160327
bq.
bq. Diff: https://reviews.apache.org/r/1657/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq. Tested rendering a gadget in the "default" view case where the gadget
doesn't support default.
bq.
bq.
bq. Thanks,
bq.
bq. Stanton
bq.
bq.
> Common Container does not utilize view aliases when rendering a gadget
> ----------------------------------------------------------------------
>
> Key: SHINDIG-1596
> URL: https://issues.apache.org/jira/browse/SHINDIG-1596
> Project: Shindig
> Issue Type: Improvement
> Components: Javascript
> Affects Versions: 3.0.0
> Reporter: Stanton Sievers
> Fix For: 3.0.0
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> osapi.container.GadgetSite.prototype.render fails to render a gadget using a
> given view when that gadget does not explicitly define that view, even in the
> case where the container configuration has aliases for that view.
> For instance, Gadget A supports the "profile" and "canvas" views only. The
> container configuration defines the "home" view and provides "profile" as an
> alias for "home". In the use case where the container tries to render Gadget
> A using the "home" view, gadget render will fail, even though the gadget
> supports "profile" and it has been specified as an alias for "home" in the
> container configuration.
> This problem commonly manifests itself in Shindig because of the way
> "default" views are handled. By default, Shindig will attempt to render the
> gadget using the "default" view. If the gadget does not support that view,
> rendering will fail.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira