Skip to content

Commit

Permalink
Merge pull request YahooArchive#283 from zhouyaoji/fix_more_api_links
Browse files Browse the repository at this point in the history
Fixed more API links.
  • Loading branch information
Joe Catera committed Jul 18, 2012
2 parents fb6bfcf + f6e9741 commit c4aacc3
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/dev_guide/api_overview/mojito_addons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Addons
======

The Action Context uses a mechanism called addons to provide functionality that lives both on the server and client. Each addon provides additional functions through a namespacing object,
which is appended to the ``ActionContext`` object that is available in every controller function. See the `ActionContextAddon Module <../../api/module_ActionContext.html>`_ for the addon classes.
which is appended to the ``ActionContext`` object that is available in every controller function. See the `ActionContext Class <../../api/classes/ActionContext.html>`_ for the addon classes.

Addons allow you to do the following:

Expand Down
6 changes: 3 additions & 3 deletions docs/dev_guide/code_exs/cookies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ The following topics will be covered:

- using the `Params addon <../../api/classes/Params.common.html>`_ from the ``actionContext`` object
- getting and setting cookies from the mojit controller
- using the `Cookie addon <../../api/Cookie.server.html>`_ and the `YUI Cookie module <http://developer.yahoo.com/yui/3/cookie/>`_ to get and set cookies
- using the `Cookie addon <../../api/classes/Cookie.server.html>`_ and the `YUI Cookie module <http://developer.yahoo.com/yui/3/cookie/>`_ to get and set cookies

Implementation Notes
####################

To access many methods on the Mojito JavaScript library, you use `ActionContext addons <../../api/module_ActionContextAddon.html>`_. In this code example,
the `Cookie addon <../../api/Cookie.server.html>`_ is used to call the methods ``getCookie`` and ``setCookie`` to get and set cookies.
To access many methods on the Mojito JavaScript library, you use `ActionContext addons <../../api/classes/ActionContext.html>`_. In this code example,
the `Cookie addon <../../api/classes/Cookie.server.html>`_ is used to call the methods ``getCookie`` and ``setCookie`` to get and set cookies.

The ``index`` function in the ``controller.server.js`` below shows how to use ``cookie.get`` and ``cookie.set``. The ``cookie.set`` method also allows you to pass a third parameter that
contains the domain, the path, and the expiration date of the cookie. For those familiar with YUI 3, these methods for getting and setting cookies should be familiar as Mojito uses the `YUI 3 Cookie Module <http://developer.yahoo.com/yui/3/api/Cookie.html>`_.
Expand Down
2 changes: 1 addition & 1 deletion docs/dev_guide/code_exs/dynamic_assets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ that contains the ``context`` object:
...
}
To dynamically add CSS and meta data from the controller, you use methods from the `Assets addon <../../api/Assets.common.html>`_.
To dynamically add CSS and meta data from the controller, you use methods from the `Assets addon <../../api/classes/Assets.common.html>`_.
In the ``controller.server.js`` below, the ``index`` function determines the calling device using the ``context`` object seen above.
To add metadata for the iPhone, the ``addBlob`` method is called from the ``Assets`` addon.
The appropriate CSS file is dynamically attached to the view template with ``ac.assets.addCss``.
Expand Down
4 changes: 2 additions & 2 deletions docs/dev_guide/code_exs/i18n_apps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This example shows how to use the i18n support built into Mojito that includes t
The following topics will be covered:

- including the `YUI Internationalization utility <http://developer.yahoo.com/yui/3/intl/>`_ in the mojit controller
- using the `Intl addon <../../api/Intl.common.html>`_
- using the `Intl addon <../../api/classes/Intl.common.html>`_
- specifying the `BCP 47 <ftp://ftp.rfc-editor.org/in-notes/bcp/bcp47.txt>`_ language tags. BCP 47 is currently the combination of `RFC 5646 <http://tools.ietf.org/html/rfc5646>`_ and `RFC 4647 <http://tools.ietf.org/html/rfc4647>`_
- specifying the resource bundles for the YUI Internationalization utility

Expand Down Expand Up @@ -63,7 +63,7 @@ Using the intl Addon

In the ``controller.server.js`` file below, the ``intl.lang`` and ``intl.formData`` methods rely on the YUI Internationalization utility to select the language and format of the title and date.
The YUI Internationalization utility uses the ``Intl.lookupBestLang`` method to determine the best language based on an application's request and a module's language support. You also need to
include the `Intl addon <../../api/Intl.common.html>`_ by adding the string 'mojito-intl-addon' to the ``requires`` array.
include the `Intl addon <../../api/classes/Intl.common.html>`_ by adding the string 'mojito-intl-addon' to the ``requires`` array.

.. code-block:: javascript
Expand Down
2 changes: 1 addition & 1 deletion docs/dev_guide/code_exs/intermojit_communication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The following topics will be covered:

- structuring your mojits for intercommunication
- implementing binders for each mojit to listen to and trigger events
- using the `Composite addon <../../api/Composite.common.html>`_ to execute code in child mojits
- using the `Composite addon <../../api/classes/Composite.common.html>`_ to execute code in child mojits

Implementation Notes
####################
Expand Down
18 changes: 9 additions & 9 deletions docs/dev_guide/faq/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ General

Yes, the Mojito API has the ``ActionContext`` addon ``Http.server`` that has methods for getting the ``request`` and ``response`` instances of the
Node.js classes ``http.ServerRequest`` and ``http.ServerResponse``. From the ``ActionContext`` object ``ac`` shown below, you call
``http.getRequest`` and ``http.getResponse`` to get the ``request`` and ``response`` instances. See `Class Http.server <../../api/Http.server.html>`_
``http.getRequest`` and ``http.getResponse`` to get the ``request`` and ``response`` instances. See `Class Http.server <../../api/classes/Http.server.html>`_
for more information.

.. code-block:: javascript
Expand All @@ -230,7 +230,7 @@ General
.. topic:: **Is it possible to access HTTP headers from a Mojito application?**

Yes, the Mojito API has the ``ActionContext`` addon ``Http.server`` that allows you to get, set, and add HTTP headers. See
`Class Http.server <../../api/Http.server.html>`_ for the available methods.
`Class Http.server <../../api/classes/Http.server.html>`_ for the available methods.


Mojits
Expand All @@ -248,7 +248,7 @@ Mojits
.. topic:: **Can mojits have child mojits?**

Yes, you can configure your application to have mojits that have one or more child mojits. The parent mojit can execute the child
mojits using the `Composite addon <../../api/Composite.common.html>`_. See `Configuring Applications to Have Multiple Mojit <../topics/intro/mojito_configuring.html#configuring-applications-to-have-multiple-mojits>`_
mojits using the `Composite addon <../../api/classes/Composite.common.html>`_. See `Configuring Applications to Have Multiple Mojit <../intro/mojito_configuring.html#configuring-applications-to-have-multiple-mojits>`_
and `Composite Mojits <../topics/mojito_composite_mojits.html#composite-mojits>`_.

You can also use framework mojits, such as `HTMLFrameMojit <../topics/mojito_framework_mojits.html#htmlframemojit>`_ that can execute one or more child mojits.
Expand Down Expand Up @@ -394,10 +394,10 @@ Data

Currently the only way to do this is to pass data to the children in either the children config or parameters.
If you use ``ac.composite.execute`` you can create/modify the children configuration in code before calling ``ac.composite.execute`` .
See `ac.composite.execute <../../api/Composite.common.html#method_execute>`_ for more information.
See `ac.composite.execute <../../api/classes/Composite.common.html#method_execute>`_ for more information.

If you want to pass the data to the children in the parameters, you can do that with the ``ac._dispatch`` function.
See `ac._dispatch <../../api/ActionContext.html#method_dispatch>`_ for more information.
See `ac._dispatch <../../api/classes/ActionContext.html#method__dispatch>`_ for more information.

Binders
-------
Expand All @@ -422,15 +422,15 @@ CSS/JavaScript Assets

You define the location of application-level or mojit-level assets in the ``application.json`` file. Once the location
of your assets has been configured, you can statically add the path to the assets in your view template. You can
also add assets to your view using the `Assets addon <../../api/Assets.common.html>`_ if your application is using the ``HTMLFrameMojit``.
also add assets to your view using the `Assets addon <../../api/classes/Assets.common.html>`_ if your application is using the ``HTMLFrameMojit``.
See the `Assets <../topics/mojito_assets.html>`_ documentation for implementation details.

------------

.. _moj_dyn_assets:
.. topic:: **How are assets dynamically added to views?**

The `Assets addon <../../api/Assets.common.html>`_ allow you to dynamically add to your view. You need to use the ``HTMLFrameMojit``, however,
The `Assets addon <../../api/classes/Assets.common.html>`_ allow you to dynamically add to your view. You need to use the ``HTMLFrameMojit``, however,
to use the ``Assets addon``. See `Using the Assets Addon <../topics/mojito_assets.html#using-the-assets-addon>`_ for more information.


Expand All @@ -443,7 +443,7 @@ Views
Mojito does not support Mustache partials, but you do have the following options for rendering data through a template:
* use a child mojit instead of a view partial
* render data from a binder through a specific template with the `render <../../api/classes/MojitProxy.html#method_render>`_ method.
* render data from the controller using `ac.partial.render <../../api/Y.mojito.lib.Partial.common.html#method_render>`_.
* render data from the controller using `ac.partial.render <../../api/classes/Partial.common.html#method_render`_.

Not clear what view partials are? See `view partial <../reference/glossary.html#view-partial>`_ in the `Mojito: Glossary <../reference/glossary.html>`_.

Expand All @@ -467,7 +467,7 @@ Views
To refresh a view, you need to deploy a binder on the client. From the ``mojitProxy`` object of the binder, you can call the ``refreshView`` method to render
a new DOM node for the current mojit and its children, as well as reattach all of the existing binders to their new nodes within the new markup. Because all binder
instances are retained, state can be stored within a binder's scope. See `Refreshing Views <../intro/mojito_binders.html#refreshing-views>`_ and the
`MojitProxy Class <../../api/MojitProxy.html>`_ in the Mojito API documentation for more information.
`MojitProxy Class <../../api/classes/MojitProxy.html>`_ in the Mojito API documentation for more information.

------------

Expand Down
2 changes: 1 addition & 1 deletion docs/dev_guide/topics/mojito_assets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ From the static URL, you cannot tell the asset is mojit or application level, bu
Using the Assets Addon
######################

Mojito provides an `Assets addon <../../api/Assets.common.html>`_ that allows you to add inline assets
Mojito provides an `Assets addon <../../api/classes/Assets.common.html>`_ that allows you to add inline assets
or links to asset files. Using the ``Assets`` addon, you can dynamically add assets to an HTML page. Two possible use cases would be adding CSS if the
HTTP request is coming from a particular device or adding JavaScript if a user takes a particular action.

Expand Down
2 changes: 1 addition & 1 deletion docs/dev_guide/topics/mojito_extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ where to place files in the Mojito framework.
Addons
######

In addition to the `Action Context <../../api/module_ActionContext.html>`_ addons that Mojito provides, you can create your own addons to add functionality to controller actions.
In addition to the `Action Context <../../api/classes/ActionContext.html>`_ addons that Mojito provides, you can create your own addons to add functionality to controller actions.

Addons allows you to do the following:

Expand Down
2 changes: 1 addition & 1 deletion docs/dev_guide/topics/mojito_run_dyn_defined_mojits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ the two methods do have some distinct differences, which are discussed in `Shoul
ac.composite.execute
--------------------

The `Composite addon <../../api/Composite.common.html>`_ includes the ``execute`` method that allows parents to run
The `Composite addon <../../api/classes/Composite.common.html>`_ includes the ``execute`` method that allows parents to run
one or more dynamically defined children mojits by passing the ``children`` object. The ``execute`` method is different than the ``done`` method
of the ``Composite`` addon in that the ``done`` method runs child mojit instances that are defined in ``application.json``.
See `Composite Mojits <./mojito_composite_mojits.html>`_ to learn how to use the ``done`` method of the ``Composite`` addon.
Expand Down
2 changes: 1 addition & 1 deletion docs/dev_guide/topics/mojito_using_contexts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ Dynamically Changing Configurations
You may dynamically change the configurations for any context by having a parent mojit execute a child mojit with new configurations. This is different than getting
different configurations by requesting a new context or specifying a different base context. Regardless of the context being used, you can use the same context and change
the configurations by executing a child mojit with new configurations. The parent mojit uses the ``execute`` method of the
`Composite addon <../../api/Composite.common.html>`_ to execute the child mojit.
`Composite addon <../../api/classes/Composite.common.html>`_ to execute the child mojit.
Let's look at an example to see how it works.

In the example controller below, if the ``child`` parameter is found in the routing, query string, or request body, a child instance with its own configuration is executed, allowing the application to add new or change configurations of the current context.
Expand Down

0 comments on commit c4aacc3

Please sign in to comment.