myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r615820 - /myfaces/tobago/trunk/src/docbook/tobago-tutorial.xml
Date Mon, 28 Jan 2008 09:44:45 GMT
Author: idus
Date: Mon Jan 28 01:44:44 2008
New Revision: 615820

minor improvements


Modified: myfaces/tobago/trunk/src/docbook/tobago-tutorial.xml
--- myfaces/tobago/trunk/src/docbook/tobago-tutorial.xml (original)
+++ myfaces/tobago/trunk/src/docbook/tobago-tutorial.xml Mon Jan 28 01:44:44 2008
@@ -101,7 +101,7 @@
     <filename>WEB-INF/tobago-config.xml</filename> file. A minimal configuration
should at least
     specify the default theme for the Tobago application.</para>
-    <programlisting>&lt;tobago-config&gt;
+    <programlisting role="XML">&lt;tobago-config&gt;
@@ -187,7 +187,7 @@
       <para>A basic Tobago page looks like this:</para>
-      <programlisting>&lt;%@ taglib uri="" prefix="f"
+      <programlisting role="XML">&lt;%@ taglib uri=""
prefix="f" %&gt;
 &lt;%@ taglib uri="" prefix="tc" %&gt;
 &lt;%@ taglib uri="" prefix="tx" %&gt;
 &lt;%@ page contentType="text/html;charset=UTF-8" language="java" %&gt;
@@ -263,7 +263,8 @@
     <para>Tobago also contains a deprecated tree control. The API of this tree
     control does not really fit to the other controls. But the sandbox already
-    contains a preliminary version of the future tree control.</para>
+    contains a version of the future tree control, which will be introduced
+    in Tobago 1.1.</para>
       <title>Basic Controls</title>
@@ -294,7 +295,7 @@
         The label is connected to the input control. If the label is clicked
         the input control gains focus.</para>
-        <programlisting>&lt;tx:in
+        <programlisting role="XML">&lt;tx:in
     required="false" readonly="false"
@@ -337,7 +338,7 @@
         versions are <literal>&lt;tc:button&gt;</literal> and <literal>&lt;tc:link&gt;</literal>;
others include
         toolbars and menus, which are described in later sections.</para>
-        <programlisting>&lt;tc:button label="Delete" action="#{controller.delete}"

+        <programlisting role="XML">&lt;tc:button label="Delete" action="#{controller.delete}"
     image="image/delete.png" defaultCommand="false"&gt;
   &lt;f:facet name="confirmation"&gt;
     &lt;tc:out value="Do you want to delete it?" /&gt;
@@ -370,7 +371,7 @@
         selected, a change event is triggered, the page is submitted, and the
         action of the <literal>&lt;tc:command&gt;</literal> inside the
<literal>change</literal> facet is called:</para>
-        <programlisting>&lt;tx:selectOneChoice label="#{bundle.footerTheme}" value="#{controller.theme}"&gt;
+        <programlisting role="XML">&lt;tx:selectOneChoice label="#{bundle.footerTheme}"
   &lt;f:selectItems value="#{controller.themeItems}" /&gt;
   &lt;f:facet name="change"&gt;
     &lt;tc:command action="#{controller.themeChanged}"/&gt;
@@ -390,7 +391,7 @@
       address book uses it to provide an overview of all stored
-      <programlisting>&lt;tc:sheet columns="1*;1*;1*" value="#{controller.currentAddressList}"
+      <programlisting role="XML">&lt;tc:sheet columns="1*;1*;1*" value="#{controller.currentAddressList}"
     var="address" state="#{controller.selectedAddresses}"
     sortActionListener="#{controller.sheetSorter}" rows="25"
     showRowRange="left" showPageRange="right" showDirectLinks="center"&gt;
@@ -447,7 +448,7 @@
       code fragment show the method bound to the delete button and describes
       how to access the selected rows:</para>
-      <programlisting>public String deleteAddresses() throws AddressDaoException {
+      <programlisting role="JAVA">public String deleteAddresses() throws AddressDaoException
   List&lt;Integer&gt; selection = selectedAddresses.getSelectedRows();
   if (selection.size() &lt; 1) {
     FacesMessage error 
@@ -487,7 +488,7 @@
       rendering information of all tab panels has to be transferred to the
       client at once.</para>
-      <programlisting>&lt;tc:tabGroup switchType="reloadTab" immediate="true"&gt;
+      <programlisting role="XML">&lt;tc:tabGroup switchType="reloadTab" immediate="true"&gt;
   &lt;tc:tab label="#{bundle.editorTabPersonal}"&gt;
     &lt;jsp:include page="tab/personal.jsp"/&gt;
@@ -525,7 +526,7 @@
       item <literal>&lt;tc:menuCheckbox&gt;</literal> to change the mode
of the
-      <programlisting>&lt;tc:menuBar id="menuBar"&gt;
+      <programlisting role="XML">&lt;tc:menuBar id="menuBar"&gt;
   &lt;tc:menu label="_File"&gt;
     &lt;tc:menuItem label="_New" action="#{controller.createAddress}" image
@@ -559,7 +560,7 @@
       <literal>&lt;tc:toolBarCommand&gt;</literal> tag, which is a slightly
limited version of
       the standard button tag.</para>
-      <programlisting>&lt;tc:toolBar iconSize="big"&gt;
+      <programlisting role="XML">&lt;tc:toolBar iconSize="big"&gt;
   &lt;tc:toolBarCommand label="#{bundle.toolbarAddressList}" 
       action="#{}" immediate="true" image=
@@ -591,7 +592,7 @@
       list can be controlled via a popup. This popup is bound to a button in
       the toolbar for the sheet.</para>
-      <programlisting>&lt;tc:button label="Open Popup"&gt;
+      <programlisting role="XML">&lt;tc:button label="Open Popup"&gt;
   &lt;f:facet name="popup"&gt;
     &lt;tc:popup width="300" height="270"&gt;
       &lt;tc:box label="Popup Title"&gt;
@@ -633,7 +634,7 @@
       open a popup with the file select control which is created by the
       following code fragment:</para>
-      <programlisting>&lt;tc:file value="#{controller.uploadedFile}" required="true"&gt;
+      <programlisting role="XML">&lt;tc:file value="#{controller.uploadedFile}"
   &lt;tc:validateFileItem contentType="image/*"/&gt;
@@ -673,7 +674,7 @@
     <para>A layout token may be an absolute length in pixels like 100px, a
     percentage length like 50%, a relative length like 2* or * as a shorthand
-    for 1*, or the value <literal>fixed</literal>. Relative lengths are served
by layout manager
+    for 1*, or the value <literal>fixed</literal>. Relative lengths are served
by the layout manager
     from the remaining available space, which is distributed proportionally
     based on the number before the *.</para>
@@ -689,7 +690,7 @@
     <literal>&lt;tx:in&gt;</literal>. For a more concrete example see
the following code fragment
     based on the editor view of the address book:</para>
-    <programlisting>&lt;tc:panel&gt;
+    <programlisting role="XML">&lt;tc:panel&gt;
   &lt;f:facet name="layout"&gt;
     &lt;tc:gridLayout columns="*" rows="fixed;fixed;fixed;*"/&gt;
@@ -785,7 +786,7 @@
     <filename>tobago-config.xml</filename> file, and a button triggers an action
in the controller
     to set the theme in the Tobago <classname>ClientProperties</classname> object:</para>
-    <programlisting>public String themeChanged() {
+    <programlisting role="JAVA">public String themeChanged() {
   FacesContext facesContext = FacesContext.getCurrentInstance();
   ClientProperties client 
       = ClientProperties.getInstance(facesContext);
@@ -832,7 +833,7 @@
       switching to a newer version of Tobago, since the theme files are not
       stable yet and do not count as an official external API.</para>
-      <programlisting>&lt;tobago-config&gt;
+      <programlisting role="XML">&lt;tobago-config&gt;
@@ -880,7 +881,7 @@
       you want to extend and specify the selected theme as fallback theme. The
       Example theme extends Speyside and adds markup for columns.</para>
-      <programlisting>&lt;tobago-theme&gt;
+      <programlisting role="XML">&lt;tobago-theme&gt;
@@ -991,7 +992,7 @@
       <para>The following code shows some parts of our component class:</para>
-      <programlisting>public class UIInputNumberSlider extends javax.faces.component.UIInput
+      <programlisting role="JAVA">public class UIInputNumberSlider extends javax.faces.component.UIInput
   public static final String COMPONENT_TYPE
       = "org.apache.myfaces.tobago.InputNumberSlider";
@@ -1090,7 +1091,7 @@
       for default properties: "Tobago." + <literal>key</literal>. We could (but
will not)
       specify a width padding of five pixels for our control by adding the
       property <literal>InputNumberSlider.paddingWidth=5</literal> in the theme
configuration of
-      the sandbox theme. Please note that the ressource location mechanism as
+      the sandbox theme. Please note that the resource location mechanism as
       described in <xref linkend="sec-resource-management"/> is used to find a
@@ -1102,7 +1103,7 @@
       input field 34 percent. The value can be accessed in the renderer with
       the following line of code:</para>
-      <para><programlisting>int sliderWidthPercent
+      <para><programlisting role="JAVA">int sliderWidthPercent
     = ThemeConfig.getValue(facesContext, component, "sliderWidthPercent");</programlisting></para>
       <para>The Tobago theming mechanism locates renderers by their location
@@ -1129,7 +1130,7 @@
       back from the HTTP request.</para>
       <example><title>Renderer for the slider bar control</title>
-      <programlisting>package org.apache.myfaces.tobago.renderkit.html.sandbox.standard.tag;
+      <programlisting role="JAVA">package org.apache.myfaces.tobago.renderkit.html.sandbox.standard.tag;
 public class InputNumberSliderRenderer extends LayoutableRendererBase {
@@ -1185,7 +1186,7 @@
       account when creating HTML elements. The following source snippet
       demonstrates the usage of the style map.</para>
-      <programlisting>HtmlStyleMap style = (HtmlStyleMap) component.getAttributes().get("style");
+      <programlisting role="JAVA">HtmlStyleMap style = (HtmlStyleMap) component.getAttributes().get("style");
 int width = style.getInt("width");</programlisting>
@@ -1252,7 +1253,7 @@
     <example><title>Tag declaration for the slider bar tag</title>
-      <programlisting>@Tag(name = "numberSlider")
+      <programlisting role="JAVA">@Tag(name = "numberSlider")
 @UIComponentTag(rendererType = "InputNumberSlider",
     uiComponent = "org.apache.myfaces.tobago.component.UIInputNumberSlider")
 public interface InputNumberSliderTagDeclaration extends
@@ -1283,7 +1284,7 @@
       a JSP page. It is important to switch to the Sandbox theme in the Tobago
-      <programlisting>&lt;%@ taglib uri=""
prefix="tcs" %&gt;
+      <programlisting role="XML">&lt;%@ taglib uri=""
prefix="tcs" %&gt;
 &lt;%@ taglib uri="" prefix="f" %&gt;
@@ -1323,7 +1324,7 @@
     subsequently change the rendered field names with JavaScript inside the
-    <programlisting>&lt;tx:in id="j_username" label="Username"/&gt;
+    <programlisting role="XML">&lt;tx:in id="j_username" label="Username"/&gt;
 &lt;tx:in id="j_password" password="true" label="Password"/&gt;
@@ -1360,7 +1361,7 @@
     button points to a method in the <classname>AdminController</classname>.
This method is annotated
     with the required role <emphasis>admin</emphasis>:</para>
-    <programlisting>@RolesAllowed("admin")
+    <programlisting role="JAVA">@RolesAllowed("admin")
 public String admin() {
   return OUTCOME_ADMIN;
@@ -1388,7 +1389,7 @@
     theme and the language are isolated to sub forms to avoid conflicts with
     validations elsewhere on the page:</para>
-    <programlisting>&lt;tc:form&gt;
+    <programlisting role="XML">&lt;tc:form&gt;
   &lt;tx:selectOneChoice label="Theme" value="#{controller.theme}"&gt;
   &lt;f:selectItems value="#{controller.themeItems}" /&gt;
     &lt;f:facet name="change"&gt;
@@ -1421,7 +1422,7 @@
     <para>The following code fragment shows a simple example where an input
     control is enabled depending on the state of a checkbox.</para>
-    <programlisting>&lt;tc:page id="page"&gt;
+    <programlisting role="XML">&lt;tc:page id="page"&gt;
   &lt;tc:box label="Container" id="box"&gt;
     &lt;tx:selectBooleanCheckbox label="Enable" 
@@ -1447,7 +1448,7 @@
     <literal>&lt;tc:reload&gt;</literal> tag to specify the frequency
for the reload in
-    <programlisting>&lt;tc:panel&gt;
+    <programlisting role="XML">&lt;tc:panel&gt;
   &lt;f:facet name="reload"&gt;
     <emphasis role="bold">&lt;tc:reload frequency="5000"/&gt;</emphasis>
@@ -1468,7 +1469,7 @@
     the static resources. The expiration period can be specified in seconds as
     an <literal>init-param</literal> for the servlet.</para>
-    <programlisting>&lt;servlet&gt;
+    <programlisting role="XML">&lt;servlet&gt;
@@ -1510,7 +1511,7 @@
     follow. With MyFaces focusing on fulfilling the JSF specification 1.2
     Tobago will aim for JSF 1.2 compatibility as well. Another goal is to
     attain a form of integration with other component sets like Tomahawk.
-    Currently it is not possible to add such controls to a Tobago application,
+    Currently adding such controls to a Tobago application works only limited,
     partly because there is no way to add the necessary layout and theming
     information for external controls.</para>

View raw message