[Checkins] SVN: bluebream/trunk/docs/source/howto/defaultview.rst better wordings

Baiju M baiju.m.mail at gmail.com
Sun Jan 10 02:58:40 EST 2010


Log message for revision 107978:
  better wordings
  

Changed:
  U   bluebream/trunk/docs/source/howto/defaultview.rst

-=-
Modified: bluebream/trunk/docs/source/howto/defaultview.rst
===================================================================
--- bluebream/trunk/docs/source/howto/defaultview.rst	2010-01-10 07:02:42 UTC (rev 107977)
+++ bluebream/trunk/docs/source/howto/defaultview.rst	2010-01-10 07:58:39 UTC (rev 107978)
@@ -2,61 +2,69 @@
 ========================
 
 Normally in BlueBream, a browser view can be accessed using ``@@``
-symbol before the view name.  For example, if you have registered a
-view named ``testview`` for an object, it can be accessed like this:
-``myobject/@@testview``.
+symbols before the view name.  For example, if you have registered a
+view named ``testview`` for an object, that view can be accessed like
+this: ``myobject/@@testview``.
 
-The view could be accessed without using the ``@@`` symbol also,
-provided there is no object with same same exists inside the
+The view could be accessed without using the ``@@`` symbols also,
+provided there is no object with same same exist inside the
 container.  In the above example, If there is no object named
 ``testview`` inside ``myobject`` container, then, the view can be
-accessed like this: ``myobject/testview``.  BlueBream reccommends to
-use ``@@`` symbol always to access view.
+accessed like ``myobject/testview``.  However, BlueBream reccommends
+to use ``@@`` symbols always to access view to avoid ambiguity.
 
-If you access an object without specifying any view, BlueBream will
-try to display the default view registered.  You can specify what
-should be the default view for a particular type object using
-``browser:defaultView`` directive .  If there is no default view
-registered, and then you try to access an object without specifying
-the view, you will get a ``ComponentLookupError`` with a message
-like: ``Couldn't find default view name``.  For example, if you
-access the root folder and there is no default view registered, you
-will get an error like this::
+If you try to access an object without specifying any view name,
+BlueBream will try to display the default view registered.  You can
+configure the name os default view for a particular type object using
+``browser:defaultView`` directive available in ``zope.publisher``
+package.  If the name of default view is not configured, and you try
+to access an object without specifying the view name, you will get a
+``ComponentLookupError`` with a message like this: ``Couldn't find
+default view name``.  For example, if you try to access the root
+folder like: htt://localhost:8080/ and name of default view is not
+configured, you will get an error like this::
 
   ComponentLookupError: ("Couldn't find default view name",
   <zope.site.folder.Folder object at 0xa3a09ac>,
   <zope.publisher.browser.BrowserRequest instance
   URL=http://localhost:8080>)
 
-If you created the application using ``bluebream`` project template,
-you won't get this error.  Beacause there is already a
-``defaultView`` configured in ``application.zcml`` configure file
-inside the main package.  Now if there is a default view name
-configured, but that there is no view registed in that name, you will
-get ``NotFound`` error.  For example, if the defaultView is ``index``
-and there is no such view registered for root folder, you will get an
-error like this::
+If you have created the application using ``bluebream`` project
+template, you won't get this error.  Beacause there is already a a
+default view name (``index``) is configured in ``application.zcml``
+configuration file inside the main package.
 
+If there is a default view name configured, but that there is no view
+registered with that name, you will get ``NotFound`` error when you
+try to access object directly without specifying the name of view.
+For example, if the default view name is ``index`` and there is no
+such view registered for root folder, you will get an error like
+this::
+
   NotFound: Object: <zope.site.folder.Folder object at 0xac9b9ec>,
   name: u'@@index'
 
-The ``browser:defaultView`` directive is defined in
-``zope.publisher``.  To use this directive, you need to include
-``meta.zcml`` using ``include`` directive::
+As mentioned earlier, the ``browser:defaultView`` directive is
+defined in ``zope.publisher``.  To use this directive, you need to
+include ``meta.zcml`` using ``include`` directive::
 
   <include package="zope.publisher" file="meta.zcml" />
 
-You can specify the default view for ``IContainer`` like this ::
+For example, you can specify the default view for ``IContainer`` like
+this::
 
   <browser:defaultView
      name="index"
      for="zope.container.interfaces.IContainer"
      />
 
-Now, BlueBream will try to get ``@@index`` view for any containers,
-if the view is not explicitly mentioned in the URL.
+If ``index`` is registered as the name for default view, BlueBream
+will try to get ``@@index`` view for any containers, if the view is
+not explicitly mentioned in the URL.  However, you need to have a
+browser view registered to acces the view, otherwise a ``NotFound``
+error will be raised as mentioned above.
 
-More details about registering a browser page using ``browser:page``
+More details about registering a browser view using ``browser:page``
 directive is explained in `browser page HOWTO <browserpage.html>`_.
 
 .. raw:: html



More information about the checkins mailing list