Here is a list of the tickets fixed for the upcoming 3.1
https://coldbox.assembla.com/spaces/coldbox/milestones/374985-3-1-0
The new features to test are the following:
1.Rendering local variables:
You can now pass an optional args struct to renderLayout() and
renderView() that allows you to have localized variables only for
those renderings
renderView(view="sayHello", args={name="luis", lname="majano"});
The view then can use them locally ONLY
#args.name# #args.lname#
Great flexibility
2. Request context now returns itself on calls that don't retrieve
anything, for method concatenation and readibility
3. renderData() has a location argument to set a location header if
you are building RESTful services:
event.renderData(type="json",data=user,location="/user/
#user.getUserName()#");
4. Renderering helper: html
Every layout and view have a new variable in the variables scope: html
that is an instance of the HTMLHelper plugin already available and
ready for usage.
5. Renderlayout(layout="custom", view="email") when using an explicit
renderLayout() with a view, we needed to have a
#renderView(arguments.view)# in our layout for this to work, which was
confusing. This is now not needed so you can REALLY use any layout to
wrap view contents -> renderView() that's it.
6. Rendering Collections
This was inspired by Rails for a long time and I was too lazy to
build. You can now render views with collections. This means that
the view will be rendered as many times as the collection items. The
collection can be a query or an array of whatever you like objects,
structs, etc.
renderView(view="user",collection=qUsers);
Then in the view:
Name: #user.name#
Id: #user.id#
The #user# variable placeholder is called "user" by convention since
that is the name of the view argument. You can change the name of the
collection with:
renderView(view="user",collection=qUsers, collectionAs="thisUser");
Then in the view:
Name: #thisUser.name#
Id: #thisUser.id#
This is a great technique that will allow you to render a view self-
iterating via a collection. You can also still use the "args" to have
localized arguments if needed.
Enjoy and let me know how it goes