Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Doc updates

  • Loading branch information...
commit 8b732334f05025dc09dec00484718c242431fbcf 1 parent 40c18df
@marcpalmer marcpalmer authored
View
15 src/docs/guide/navigation/navigation_recipes.gdoc
@@ -1,15 +0,0 @@
-h3. Declaring a controller and all of its actions
-
-h3. Declaring a controller and some of its actions
-
-h3. Handling multiple actions that should activate the same item
-
-h3. Associate extra data with items, for example to render icons
-
-h3. Controlling visibility
-
-h3. Controlling enabled status
-
-h3. Declaring a scope in a plugin, bypassing automatic name spacing
-
-h3. Merging application navigation items into a plugin's navigation scopes
View
26 src/docs/guide/navigation/using_navigation_dsl.gdoc
@@ -105,10 +105,12 @@ These values are passed through to the navigation tags for link rendering just a
There are some special behaviours however:
-# @controller@ need not be specified - it will be inherited from the parent node if the parent uses @controller@ to create its link, or failing that it will use the name of the DSL method call
-# @action@ need not be specified, it will fall back to the name of the method call if the controller is specified or inherited. If the controller was not specified either (and hence "uses up" the method call name), this will use the default action of the controller or "index" if none is set.
-# @action@ can be a List or comma-delimited string. If it is, the first element is the action used to generate the item's link, and any other actions listed will have sub-items created for them, in alphabetical order.
-# @actionAliases@ is an optional list of actions that will also *activate* this navigation item. The link is always to the @action@ defined for the item in the DSL, but if the current controller/action resolves to an action in this alias list, the navigation item will appear to be active. Used for those situations where you have multiple actions presenting the same user view i.e. create/save, edit/update
+{table}
+*Argument* | *Usage*
+@controller@ | Optional - it will be inherited from the parent node if the parent uses @controller@ to create its link, or failing that it will use the name of the DSL method call
+@action@ | Optional - it will fall back to the name of the method call if the controller is specified or inherited. If the controller was not specified either (and hence "uses up" the method call name), this will use the default action of the controller or "index" if none is set. The @action@ value can be a List or comma-delimited string. If it is, the first element is the action used to generate the item's link, and any other actions listed will have sub-items created for them, in alphabetical order.
+@actionAliases@ | Optional - list of actions that will also *activate* this navigation item. The link is always to the @action@ defined for the item in the DSL, but if the current controller/action resolves to an action in this alias list, the navigation item will appear to be active. Used for those situations where you have multiple actions presenting the same user view i.e. create/save, edit/update
+{table}
h4. Visibility and Status
@@ -116,8 +118,11 @@ You can control per request whether items are visible or enabled, or set this in
The arguments:
-# visible - determines if the item is visible and can be a boolean or a Closure. If it is a Closure, it will receive a "grailsApplication" property that can be used to reach beans in the main context and will be called every time the item needs to be rendered.
-# enabled - determines if the item is enabled or not and can be a boolean or a Closure. If it is a Closure, it will receive a "grailsApplication" property that can be used to reach beans in the main context and will be called every time the item needs to be rendered.
+{table}
+*Argument* | *Usage*
+@visible@ | Determines whether the item is visible and can be a boolean or a Closure. If it is a Closure, it will receive a "grailsApplication" property that can be used to reach beans in the main context and will be called every time the item needs to be rendered.
+@enabled@ | Determines if the item is enabled or not and can be a boolean or a Closure. If it is a Closure, it will receive a "grailsApplication" property that can be used to reach beans in the main context and will be called every time the item needs to be rendered.
+{table}
Typically you will want to hide items if the user is not permitted to see them. An example of doing this with Spring Security Core:
@@ -162,8 +167,11 @@ The title of an item is the text used to display the navigation item.
Two arguments are used for this:
-# @title@ represents an i18n message code to use. It defaults to "nav." plus the the item's activation path with "/" converted to "." so path @app/messages/inbox@ becomes the i18n code @nav.app.messages.inbox@
-# @titleText@ represents literal text to use for the navigation item title if the i18n bundle does not resolve anything for the value of @title@
+{table}
+*Argument* | *Usage*
+@title@ | Optional. Represents an i18n message code to use. It defaults to "nav." plus the the item's activation path with "/" converted to "." so path @app/messages/inbox@ becomes the i18n code @nav.app.messages.inbox@
+@titleText@ | Optional. represents literal text to use for the navigation item title if the i18n bundle does not resolve anything for the value of @title@
+{table}
For automatically created action navigation items, the titleText defaults to the "human friendly" form of the action name. i.e. "index" becomes "Index", "showItems" becomes "Show Items".
@@ -189,7 +197,7 @@ Items are ordered naturally in the order they are declared in the DSL.
However you may wish to manually order items, for example so that plugins (or the application) can inject items into certain positions in your navigation.
-Just pass the integer value in the order argument:
+Just pass the integer value in the @order@ argument:
{code}
navigation = {
View
7 src/docs/guide/overview/changelog.gdoc
@@ -1,7 +1,10 @@
h3. 1.0.M2-SNAPSHOT
-Refined and documented Navigation API.
-
+* Refined and documented Navigation API
+* There are no longer any "g" namespaced tags. All @g:@ tags have move to @p:@ namespace
+* Added "site.url" Config setting for [siteLink|tagsUiExtension] tag to use instead of grails.serverURL if the two differ for your use case
+* Refactored Injection, Conventions and Navigation implementations into public interface + implementation classes
+
h3. 1.0.M1
First public release with Config and Security APIs and some UI Extensions. Work-in-progress APIs for Events, Injection, Conventions and Navigation.
View
2  src/docs/guide/overview/knownissues.gdoc
@@ -1,6 +1,6 @@
h3. 1.0.M2-SNAPSHOT
-* Navigation artefacts do not reload
+* Automatic convention controller navigation includes all actions, not just those with GET allowedMethod
h3. 1.0.M1
View
1  src/docs/guide/toc.yml
@@ -29,6 +29,5 @@ navigation:
menu_navigation: Rendering other menus
using_navigation_dsl: Using the Navigation DSL
navigation_tags: The Navigation Tags
- navigation_recipes: Navigation Recipes - getting things done
convention:
title: Convention API
View
2  src/groovy/org/grails/plugin/platform/navigation/NavigationImpl.groovy
@@ -527,6 +527,7 @@ class NavigationImpl implements Navigation {
if (log.debugEnabled) {
log.debug "Found auto actions $actionNames for controller $controllerName"
}
+ // @todo ONLY ADD THOSE WITH "GET" ALLOWED METHOD
actionsToAdd.addAll(actionNames.sort())
log.debug "Registering actions $actionsToAdd for controller $controllerName"
@@ -541,7 +542,6 @@ class NavigationImpl implements Navigation {
def n = 0
- // @todo make default action first in list always, sort others alpha!
for (action in actionsToAdd) {
declareControllerNode(
parent:controllerNode,
Please sign in to comment.
Something went wrong with that request. Please try again.