This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Container_view
A container_view is a view helper providing a container for all kinds of view. It can be used to have different views appear in one place in the page, for example based on a selection of possiblities.
<%= container_view :name_of_view ,
:bind => {
:content => 'MyApp.ObjectController.property'
}
%>
- name_of_view :: The name of the view to be used
The content binding of the container view needs to point at a property of an object controller. This property needs to return a SC.View.
The property can be a computed property in case a model is used to keep track of the different views:
returnView: function(){
var viewname = this.get('view').dasherize().camelize();
return SC.page.get(viewname);
}.property('view')
The views that need to be put in the container_view have to be declared in the rhtml files, but outside the content_for(‘body’) part, in the same way as declaring a pane_view. It is possible to create separate rhtml files for every view.






