Created
May 23, 2012 22:24
-
-
Save greenlaw110/2778215 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For example, you have a part of content to be passed to different tags as callback, and you except the tag will change the content by passing arguments, as shown below: | |
bc. @lookupRole(permission: "superuser").callback(List<Role> roleList) { | |
<ul> | |
@for(Role role: roleList) { | |
<li>role.getName()</li> | |
} | |
</ul> | |
} | |
Later you decide to grab a list of roles with another permission: | |
bc. @lookupRole(permission: "db-admin").callback(List<Role> roleList) { | |
<ul> | |
@for(Role role: roleList) { | |
<li>role.getName()</li> | |
} | |
</ul> | |
} | |
And you found it's tedious to write the the same code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment