cvs commit: jakarta-tapestry/framework/src/documentation/content/xdocs/tapestry/ComponentReference Submit.xml RenderBlock.xml TextArea.xml InsertText.xml

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

cvs commit: jakarta-tapestry/framework/src/documentation/content/xdocs/tapestry/ComponentReference Submit.xml RenderBlock.xml TextArea.xml InsertText.xml

hlship
hlship      2005/05/21 08:36:22

  Modified:    framework/src/java/org/apache/tapestry/html InsertText.jwc
                        InsertText.java InsertTextMode.java
               .        status.xml
               framework/src/test/org/apache/tapestry/form
                        BaseFormComponentTest.java TestImageSubmit.java
                        TestSubmit.java
               framework/src/java/org/apache/tapestry
                        TapestryStrings.properties
               src/documentation/content/xdocs links.ent
               framework/src/java/org/apache/tapestry/form TextArea.java
                        TextArea.jwc
               framework/src/java/org/apache/tapestry/valid
                        IValidationDelegate.java
               framework/src/test/org/apache/tapestry/components
                        BaseComponentTestCase.java
               framework/src/documentation/content/xdocs/tapestry/ComponentReference
                        Submit.xml RenderBlock.xml TextArea.xml
                        InsertText.xml
  Added:       framework/src/java/org/apache/tapestry/html
                        HTMLStrings.properties HTMLMessages.java
               framework/src/test/org/apache/tapestry/html
                        TestInsertText.java
               framework/src/test/org/apache/tapestry/form
                        TestTextArea.java
  Removed:     doc/src/common/images caution.png tip.png warning.png
                        note.png up.png home.png prev.png next.png
                        important.png
               doc/src/common docbook-setup.xml Readme.html
                        Tapestry.fop-xsl.template TapestryLinks.xml
                        Tapestry.css Tapestry.xsl.template .cvsignore
               doc/src/ComponentReference TextArea.html InsertText.html
               framework/src/test-data/context20 Home.html Three.html
                        Two.html
               framework/src/scripts TestTextArea.xml
               framework/src/test-data/context20/WEB-INF Home.page Two.page
               framework/src/test/org/apache/tapestry/junit/mock/c20
                        ModeStrings.properties Home.java Two.java
  Log:
  Add support for validation decoration of the TextArea component.
  Add raw parameter to the InsertText component.
 
  Revision  Changes    Path
  1.5       +10 -2     jakarta-tapestry/framework/src/java/org/apache/tapestry/html/InsertText.jwc
 
  Index: InsertText.jwc
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/html/InsertText.jwc,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InsertText.jwc 18 Apr 2005 17:06:41 -0000 1.4
  +++ InsertText.jwc 21 May 2005 15:36:21 -0000 1.5
  @@ -28,17 +28,25 @@
     markup to delimit lines.
     </description>
     
  -  <parameter name="value">
  +  <parameter name="value" default-binding="ognl" required="yes">
       <description>
      The text to insert.
       </description>
     </parameter>
   
  -  <parameter name="mode">
  +  <parameter name="mode" default-binding="ognl">
       <description>
       Determines which mode to use: breaks after each line, or wrap each line
       as a paragraph.  The default is breaks.
       </description>
     </parameter>
  +  
  +  <parameter name="raw" default-binding="ognl">
  +      <description>
  +          If false (the default), then the rendered text is filtered. If true,
  +          then the text is not filtered (appropriate when the value
  +          parameter contains markup).
  +      </description>
  +   </parameter>
   
   </component-specification>
 
 
 
  1.4       +24 -22    jakarta-tapestry/framework/src/java/org/apache/tapestry/html/InsertText.java
 
  Index: InsertText.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/html/InsertText.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InsertText.java 5 Jan 2005 23:17:22 -0000 1.3
  +++ InsertText.java 21 May 2005 15:36:21 -0000 1.4
  @@ -23,29 +23,27 @@
   import org.apache.tapestry.AbstractComponent;
   import org.apache.tapestry.IMarkupWriter;
   import org.apache.tapestry.IRequestCycle;
  -import org.apache.tapestry.Tapestry;
   
   /**
  - *  Inserts formatted text (possibly collected using a {@link org.apache.tapestry.form.TextArea}
  - *  component.
  + * Inserts formatted text (possibly collected using a {@link org.apache.tapestry.form.TextArea}
  + * component. [<a href="../../../../../ComponentReference/InsertText.html">Component Reference</a>]
  + * <p>
  + * To maintain the line breaks provided originally, this component will break the input into
  + * individual lines and insert additional HTML to make each line seperate.
  + * <p>
  + * This can be down more simply, using the &lt;pre&gt; HTML element, but that usually renders the
  + * text in a non-proportional font.
    *
  - *  [<a href="../../../../../ComponentReference/InsertText.html">Component Reference</a>]
  - *
  - *  <p>To maintain the line breaks provided originally, this component will
  - *  break the input into individual lines and insert additional
  - *  HTML to make each line seperate.
  - *
  - *  <p>This can be down more simply, using the &lt;pre&gt; HTML element, but
  - *  that usually renders the text in a non-proportional font.
  - *
    * @author Howard Lewis Ship
  - *
  - **/
  + */
   
   public abstract class InsertText extends AbstractComponent
   {
       protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
       {
  +        if (cycle.isRewinding())
  +            return;
  +
           String value = getValue();
   
           if (value == null)
  @@ -54,6 +52,7 @@
           StringReader reader = null;
           LineNumberReader lineReader = null;
           InsertTextMode mode = getMode();
  +        boolean raw = getRaw();
   
           try
           {
  @@ -72,7 +71,7 @@
                   if (line == null)
                       break;
   
  -                mode.writeLine(lineNumber, line, writer);
  +                mode.writeLine(lineNumber, line, writer, raw);
   
                   lineNumber++;
               }
  @@ -80,11 +79,8 @@
           }
           catch (IOException ex)
           {
  -            throw new ApplicationRuntimeException(
  -                Tapestry.getMessage("InsertText.conversion-error"),
  -                this,
  -                null,
  -                ex);
  +            throw new ApplicationRuntimeException(HTMLMessages.textConversionError(ex), this, null,
  +                    ex);
           }
           finally
           {
  @@ -108,15 +104,21 @@
           }
       }
   
  +    /** Parameter */
       public abstract InsertTextMode getMode();
   
       public abstract void setMode(InsertTextMode mode);
   
  +    /** Parameter */
  +
       public abstract String getValue();
  +    
  +    /** Parameter */
  +    
  +    public abstract boolean getRaw();
   
       /**
  -     * Sets the mode parameter property to its default,
  -     * {@link InsertTextMode#BREAK}.
  +     * Sets the mode parameter property to its default, {@link InsertTextMode#BREAK}.
        *
        * @since 3.0
        */
 
 
 
  1.4       +25 -27    jakarta-tapestry/framework/src/java/org/apache/tapestry/html/InsertTextMode.java
 
  Index: InsertTextMode.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/html/InsertTextMode.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InsertTextMode.java 5 Jan 2005 23:17:22 -0000 1.3
  +++ InsertTextMode.java 21 May 2005 15:36:21 -0000 1.4
  @@ -18,26 +18,22 @@
   import org.apache.tapestry.IMarkupWriter;
   
   /**
  - *  Defines a number of ways to format multi-line text for proper
  - *  renderring.
  - *
  - *  @author Howard Lewis Ship
  - *
  - **/
  + * Defines a number of ways to format multi-line text for proper renderring.
  + *
  + * @author Howard Lewis Ship
  + */
   
   public abstract class InsertTextMode extends Enum
   {
       /**
  -     *  Mode where each line (after the first) is preceded by a &lt;br&gt; tag.
  -     *
  -     **/
  +     * Mode where each line (after the first) is preceded by a &lt;br&gt; tag.
  +     */
   
       public static final InsertTextMode BREAK = new BreakMode();
   
       /**
  -     *  Mode where each line is wrapped with a &lt;p&gt; element.
  -     *
  -     **/
  +     * Mode where each line is wrapped with a &lt;p&gt; element.
  +     */
   
       public static final InsertTextMode PARAGRAPH = new ParagraphMode();
   
  @@ -47,17 +43,19 @@
       }
   
       /**
  -     *  Invoked by the {@link InsertText} component to write the next line.
  -     *
  -     *  @param lineNumber the line number of the line, starting with 0 for the first line.
  -     *  @param line the String for the current line.
  -     *  @param writer the {@link IMarkupWriter} to send output to.
  -     **/
  -
  -    public abstract void writeLine(
  -        int lineNumber,
  -        String line,
  -        IMarkupWriter writer);
  +     * Invoked by the {@link InsertText} component to write the next line.
  +     *
  +     * @param lineNumber
  +     *            the line number of the line, starting with 0 for the first line.
  +     * @param line
  +     *            the String for the current line.
  +     * @param writer
  +     *            the {@link IMarkupWriter} to send output to.
  +     * @param raw
  +     *            if true, then the output should be unfiltered
  +     */
  +
  +    public abstract void writeLine(int lineNumber, String line, IMarkupWriter writer, boolean raw);
   
       private static class BreakMode extends InsertTextMode
       {
  @@ -66,12 +64,12 @@
               super("BREAK");
           }
   
  -        public void writeLine(int lineNumber, String line, IMarkupWriter writer)
  +        public void writeLine(int lineNumber, String line, IMarkupWriter writer, boolean raw)
           {
               if (lineNumber > 0)
                   writer.beginEmpty("br");
   
  -            writer.print(line);
  +            writer.print(line, raw);
           }
       }
   
  @@ -82,11 +80,11 @@
               super("PARAGRAPH");
           }
   
  -        public void writeLine(int lineNumber, String line, IMarkupWriter writer)
  +        public void writeLine(int lineNumber, String line, IMarkupWriter writer, boolean raw)
           {
               writer.begin("p");
   
  -            writer.print(line);
  +            writer.print(line, raw);
   
               writer.end();
           }
 
 
 
  1.1                  jakarta-tapestry/framework/src/java/org/apache/tapestry/html/HTMLStrings.properties
 
  Index: HTMLStrings.properties
  ===================================================================
  # Copyright 2005 The Apache Software Foundation
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #     http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
 
  text-conversion-error=Error converting text to lines (for InsertText component): {0}
 
 
 
  1.1                  jakarta-tapestry/framework/src/java/org/apache/tapestry/html/HTMLMessages.java
 
  Index: HTMLMessages.java
  ===================================================================
  // Copyright 2005 The Apache Software Foundation
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
 
  package org.apache.tapestry.html;
 
  import org.apache.hivemind.impl.MessageFormatter;
 
  /**
   * @author Howard M. Lewis Ship
   * @since 4.0
   */
  class HTMLMessages
  {
      private static final MessageFormatter _formatter = new MessageFormatter(HTMLMessages.class,
              "HTMLStrings");
 
      static String textConversionError(Throwable cause)
      {
          return _formatter.format("text-conversion-error", cause);
      }
  }
 
 
 
  1.111     +2 -0      jakarta-tapestry/status.xml
 
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/status.xml,v
  retrieving revision 1.110
  retrieving revision 1.111
  diff -u -r1.110 -r1.111
  --- status.xml 20 May 2005 12:46:08 -0000 1.110
  +++ status.xml 21 May 2005 15:36:21 -0000 1.111
  @@ -57,6 +57,8 @@
          <action type="add" dev="HLS">Add getErrorRenderers() method to IValidationDelegate.</action>
          <action type="add" dev="HLS">Add purgeDeletedKeys() method to ListEditMap.</action>
          <action type="add" dev="HLS">Add checks for multiple specification elements "claiming" the same injected property. </action>
  +       <action type="add" dev="HLS">Add support for validation decoration to TextArea.</action>
  +       <action type="add" dev="HLS">Add raw parameter to InsertText.</action>
       </release>
       <release version="4.0-alpha-3" date="May 16 2005">
         <action type="add" dev="HLS">Add initial support for the validator: binding prefix.</action>
 
 
 
  1.1                  jakarta-tapestry/framework/src/test/org/apache/tapestry/html/TestInsertText.java
 
  Index: TestInsertText.java
  ===================================================================
  // Copyright 2005 The Apache Software Foundation
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
 
  package org.apache.tapestry.html;
 
  import java.io.IOException;
 
  import org.apache.hivemind.ApplicationRuntimeException;
  import org.apache.tapestry.IMarkupWriter;
  import org.apache.tapestry.IRequestCycle;
  import org.apache.tapestry.components.BaseComponentTestCase;
  import org.easymock.MockControl;
 
  /**
   * Tests for {@link org.apache.tapestry.html.InsertText}.
   *
   * @author Howard M. Lewis Ship
   * @since 4.0
   */
  public class TestInsertText extends BaseComponentTestCase
  {
      public void testRewinding()
      {
          IMarkupWriter writer = newWriter();
          IRequestCycle cycle = newCycle(true);
 
          replayControls();
 
          InsertText component = (InsertText) newInstance(InsertText.class);
 
          component.render(writer, cycle);
 
          verifyControls();
      }
 
      public void testRenderNull()
      {
          IMarkupWriter writer = newWriter();
          IRequestCycle cycle = newCycle(false);
 
          replayControls();
 
          InsertText component = (InsertText) newInstance(InsertText.class);
 
          component.render(writer, cycle);
 
          verifyControls();
      }
 
      public void testRenderBreaks()
      {
          IMarkupWriter writer = newWriter();
          IRequestCycle cycle = newCycle(false);
 
          writer.print("Now is the time", false);
          writer.beginEmpty("br");
          writer.print("for all good men", false);
          writer.beginEmpty("br");
          writer.print("to come to the aid of their Tapestry.", false);
 
          replayControls();
 
          InsertText component = (InsertText) newInstance(
                  InsertText.class,
                  "value",
                  "Now is the time\nfor all good men\nto come to the aid of their Tapestry.");
 
          component.finishLoad(cycle, null, null);
          component.render(writer, cycle);
 
          verifyControls();
      }
 
      public void testRenderParas()
      {
          IMarkupWriter writer = newWriter();
          IRequestCycle cycle = newCycle(false);
 
          writer.begin("p");
          writer.print("Now is the time", false);
          writer.end();
 
          writer.begin("p");
          writer.print("for all good men", false);
          writer.end();
 
          writer.begin("p");
          writer.print("to come to the aid of their Tapestry.", false);
          writer.end();
 
          replayControls();
 
          InsertText component = (InsertText) newInstance(InsertText.class, new Object[]
          { "mode", InsertTextMode.PARAGRAPH, "value",
                  "Now is the time\nfor all good men\nto come to the aid of their Tapestry." });
 
          component.render(writer, cycle);
 
          verifyControls();
      }
 
      public void testRenderRaw()
      {
          IMarkupWriter writer = newWriter();
          IRequestCycle cycle = newCycle(false);
 
          writer.print("output", true);
          writer.beginEmpty("br");
          writer.print("<b>raw</b>", true);
 
          replayControls();
 
          InsertText component = (InsertText) newInstance(InsertText.class, new Object[]
          { "value", "output\n<b>raw</b>", "raw", Boolean.TRUE });
 
          component.finishLoad(cycle, null, null);
          component.render(writer, cycle);
 
          verifyControls();
      }
  }
 
 
 
  1.2       +11 -14    jakarta-tapestry/framework/src/test/org/apache/tapestry/form/BaseFormComponentTest.java
 
  Index: BaseFormComponentTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/form/BaseFormComponentTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BaseFormComponentTest.java 9 May 2005 14:45:15 -0000 1.1
  +++ BaseFormComponentTest.java 21 May 2005 15:36:21 -0000 1.2
  @@ -14,13 +14,14 @@
   
   package org.apache.tapestry.form;
   
  -import org.apache.hivemind.test.HiveMindTestCase;
   import org.apache.tapestry.IActionListener;
   import org.apache.tapestry.IBinding;
  +import org.apache.tapestry.IComponent;
   import org.apache.tapestry.IForm;
   import org.apache.tapestry.IMarkupWriter;
   import org.apache.tapestry.IRequestCycle;
   import org.apache.tapestry.TapestryUtils;
  +import org.apache.tapestry.components.BaseComponentTestCase;
   import org.apache.tapestry.valid.IValidationDelegate;
   import org.easymock.MockControl;
   
  @@ -30,7 +31,7 @@
    * @author Howard M. Lewis Ship
    * @since 4.0
    */
  -public abstract class BaseFormComponentTest extends HiveMindTestCase
  +public abstract class BaseFormComponentTest extends BaseComponentTestCase
   {
   
       protected IValidationDelegate newDelegate()
  @@ -43,15 +44,16 @@
           return (IForm) newMock(IForm.class);
       }
   
  -    protected IRequestCycle newCycle()
  +    protected void trainGetForm(MockControl control, IRequestCycle cycle, IForm form)
       {
  -        return (IRequestCycle) newMock(IRequestCycle.class);
  +        cycle.getAttribute(TapestryUtils.FORM_ATTRIBUTE);
  +        control.setReturnValue(form);
       }
   
  -    protected void train(MockControl control, IRequestCycle cycle, IForm form)
  +    protected void trainGetDelegate(MockControl control, IForm form, IValidationDelegate delegate)
       {
  -        cycle.getAttribute(TapestryUtils.FORM_ATTRIBUTE);
  -        control.setReturnValue(form);
  +        form.getDelegate();
  +        control.setReturnValue(delegate);
       }
   
       protected void train(MockControl control, IRequestCycle cycle, String parameterName,
  @@ -62,9 +64,9 @@
       }
   
       protected void trainWasPrerendered(MockControl control, IForm form, IMarkupWriter writer,
  -            Submit submit, boolean wasPrerendered)
  +            IComponent component, boolean wasPrerendered)
       {
  -        form.wasPrerendered(writer, submit);
  +        form.wasPrerendered(writer, component);
           control.setReturnValue(wasPrerendered);
       }
   
  @@ -81,11 +83,6 @@
           control.setReturnValue(name);
       }
   
  -    protected IMarkupWriter newWriter()
  -    {
  -        return (IMarkupWriter) newMock(IMarkupWriter.class);
  -    }
  -
       protected IBinding newBinding()
       {
           return (IBinding) newMock(IBinding.class);
 
 
 
  1.2       +9 -9      jakarta-tapestry/framework/src/test/org/apache/tapestry/form/TestImageSubmit.java
 
  Index: TestImageSubmit.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/form/TestImageSubmit.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestImageSubmit.java 9 May 2005 14:45:15 -0000 1.1
  +++ TestImageSubmit.java 21 May 2005 15:36:21 -0000 1.2
  @@ -57,7 +57,7 @@
           IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
           IMarkupWriter writer = newWriter();
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -87,7 +87,7 @@
           ImageSubmit submit = (ImageSubmit) creator.newInstance(ImageSubmit.class, new Object[]
           { "image", image });
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -130,7 +130,7 @@
           ImageSubmit submit = (ImageSubmit) creator.newInstance(ImageSubmit.class, new Object[]
           { "disabledImage", image, "disabled", Boolean.TRUE });
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -174,7 +174,7 @@
           ImageSubmit submit = (ImageSubmit) creator.newInstance(ImageSubmit.class, new Object[]
           { "image", image, "disabled", Boolean.TRUE });
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -218,7 +218,7 @@
           ImageSubmit submit = (ImageSubmit) creator.newInstance(ImageSubmit.class, new Object[]
           { "image", image, "nameOverride", "barney" });
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -261,7 +261,7 @@
           IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
           IMarkupWriter writer = newWriter();
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -295,7 +295,7 @@
           IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
           IMarkupWriter writer = newWriter();
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -335,7 +335,7 @@
           IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
           IMarkupWriter writer = newWriter();
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -382,7 +382,7 @@
           IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
           IMarkupWriter writer = newWriter();
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
 
 
 
  1.4       +7 -7      jakarta-tapestry/framework/src/test/org/apache/tapestry/form/TestSubmit.java
 
  Index: TestSubmit.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/form/TestSubmit.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestSubmit.java 15 May 2005 22:56:37 -0000 1.3
  +++ TestSubmit.java 21 May 2005 15:36:21 -0000 1.4
  @@ -48,7 +48,7 @@
           IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
           IMarkupWriter writer = newWriter();
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -76,7 +76,7 @@
           IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
           IMarkupWriter writer = newWriter();
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -116,7 +116,7 @@
           IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
           IMarkupWriter writer = newWriter();
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -157,7 +157,7 @@
           IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
           IMarkupWriter writer = newWriter();
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -198,7 +198,7 @@
           IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
           IMarkupWriter writer = newWriter();
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -232,7 +232,7 @@
           IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
           IMarkupWriter writer = newWriter();
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
  @@ -272,7 +272,7 @@
           IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
           IMarkupWriter writer = newWriter();
   
  -        train(cyclec, cycle, form);
  +        trainGetForm(cyclec, cycle, form);
   
           form.getDelegate();
           formc.setReturnValue(delegate);
 
 
 
  1.1                  jakarta-tapestry/framework/src/test/org/apache/tapestry/form/TestTextArea.java
 
  Index: TestTextArea.java
  ===================================================================
  // Copyright 2005 The Apache Software Foundation
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
 
  package org.apache.tapestry.form;
 
  import org.apache.hivemind.util.PropertyUtils;
  import org.apache.tapestry.IBinding;
  import org.apache.tapestry.IForm;
  import org.apache.tapestry.IMarkupWriter;
  import org.apache.tapestry.IRequestCycle;
  import org.apache.tapestry.spec.ComponentSpecification;
  import org.apache.tapestry.valid.IValidationDelegate;
  import org.easymock.MockControl;
 
  /**
   * Tests for {@link org.apache.tapestry.form.TextArea}.
   *
   * @author Howard M. Lewis Ship
   * @since 4.0
   */
  public class TestTextArea extends BaseFormComponentTest
  {
      public void testWasPrerendered()
      {
          TextArea component = (TextArea) newInstance(TextArea.class);
 
          MockControl cyclec = newControl(IRequestCycle.class);
          IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
 
          MockControl formc = newControl(IForm.class);
          IForm form = (IForm) formc.getMock();
 
          IMarkupWriter writer = newWriter();
 
          IValidationDelegate delegate = newDelegate();
 
          trainGetForm(cyclec, cycle, form);
          trainGetDelegate(formc, form, delegate);
 
          delegate.setFormComponent(component);
 
          trainWasPrerendered(formc, form, writer, component, true);
 
          replayControls();
 
          component.render(writer, cycle);
 
          verifyControls();
      }
 
      public void testRewindNotForm()
      {
          TextArea component = (TextArea) newInstance(TextArea.class);
 
          MockControl cyclec = newControl(IRequestCycle.class);
          IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
 
          MockControl formc = newControl(IForm.class);
          IForm form = (IForm) formc.getMock();
 
          IMarkupWriter writer = newWriter();
 
          IValidationDelegate delegate = newDelegate();
 
          trainGetForm(cyclec, cycle, form);
          trainGetDelegate(formc, form, delegate);
 
          delegate.setFormComponent(component);
 
          trainWasPrerendered(formc, form, writer, component, false);
          trainIsRewinding(formc, form, false);
          trainGetElementId(formc, form, component, "barney");
          trainIsRewinding(cyclec, cycle, true);
 
          replayControls();
 
          component.render(writer, cycle);
 
          verifyControls();
      }
 
      public void testRewindingForm()
      {
          TextArea component = (TextArea) newInstance(TextArea.class);
 
          MockControl cyclec = newControl(IRequestCycle.class);
          IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
 
          MockControl formc = newControl(IForm.class);
          IForm form = (IForm) formc.getMock();
 
          IMarkupWriter writer = newWriter();
 
          IValidationDelegate delegate = newDelegate();
 
          trainGetForm(cyclec, cycle, form);
          trainGetDelegate(formc, form, delegate);
 
          delegate.setFormComponent(component);
 
          trainWasPrerendered(formc, form, writer, component, false);
          trainIsRewinding(formc, form, true);
          trainGetElementId(formc, form, component, "barney");
          train(cyclec, cycle, "barney", "submitted value");
 
          replayControls();
 
          component.render(writer, cycle);
 
          assertEquals("submitted value", component.getProperty("value"));
 
          verifyControls();
      }
 
      public void testRewindFormDisabled()
      {
          TextArea component = (TextArea) newInstance(TextArea.class, "disabled", Boolean.TRUE);
 
          MockControl cyclec = newControl(IRequestCycle.class);
          IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
 
          MockControl formc = newControl(IForm.class);
          IForm form = (IForm) formc.getMock();
 
          IMarkupWriter writer = newWriter();
 
          IValidationDelegate delegate = newDelegate();
 
          trainGetForm(cyclec, cycle, form);
          trainGetDelegate(formc, form, delegate);
 
          delegate.setFormComponent(component);
 
          trainWasPrerendered(formc, form, writer, component, false);
          trainIsRewinding(formc, form, true);
          trainGetElementId(formc, form, component, "barney");
 
          replayControls();
 
          component.render(writer, cycle);
 
          assertNull(component.getProperty("value"));
 
          verifyControls();
      }
 
      public void testRender()
      {
          TextArea component = (TextArea) newInstance(TextArea.class, new Object[]
          { "value", "text area value" });
 
          MockControl cyclec = newControl(IRequestCycle.class);
          IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
 
          MockControl formc = newControl(IForm.class);
          IForm form = (IForm) formc.getMock();
 
          IMarkupWriter writer = newWriter();
 
          IValidationDelegate delegate = newDelegate();
 
          trainGetForm(cyclec, cycle, form);
          trainGetDelegate(formc, form, delegate);
 
          delegate.setFormComponent(component);
 
          trainWasPrerendered(formc, form, writer, component, false);
          trainIsRewinding(formc, form, false);
          trainGetElementId(formc, form, component, "fred");
          trainIsRewinding(cyclec, cycle, false);
          trainGetDelegate(formc, form, delegate);
 
          delegate.writePrefix(writer, cycle, component, null);
 
          writer.begin("textarea");
          writer.attribute("name", "fred");
 
          delegate.writeAttributes(writer, cycle, component, null);
 
          writer.print("text area value");
 
          writer.end();
 
          delegate.writeSuffix(writer, cycle, component, null);
 
          replayControls();
 
          component.render(writer, cycle);
 
          verifyControls();
      }
 
      public void testRenderDisabled()
      {
          TextArea component = (TextArea) newInstance(TextArea.class, new Object[]
          { "value", "text area value", "disabled", Boolean.TRUE });
 
          MockControl cyclec = newControl(IRequestCycle.class);
          IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
 
          MockControl formc = newControl(IForm.class);
          IForm form = (IForm) formc.getMock();
 
          IMarkupWriter writer = newWriter();
 
          IValidationDelegate delegate = newDelegate();
 
          trainGetForm(cyclec, cycle, form);
          trainGetDelegate(formc, form, delegate);
 
          delegate.setFormComponent(component);
 
          trainWasPrerendered(formc, form, writer, component, false);
          trainIsRewinding(formc, form, false);
          trainGetElementId(formc, form, component, "fred");
          trainIsRewinding(cyclec, cycle, false);
          trainGetDelegate(formc, form, delegate);
 
          delegate.writePrefix(writer, cycle, component, null);
 
          writer.begin("textarea");
          writer.attribute("name", "fred");
          writer.attribute("disabled", "disabled");
 
          delegate.writeAttributes(writer, cycle, component, null);
 
          writer.print("text area value");
 
          writer.end();
 
          delegate.writeSuffix(writer, cycle, component, null);
 
          replayControls();
 
          component.render(writer, cycle);
 
          verifyControls();
      }
 
      public void testRenderWithInformalParameters()
      {
          IBinding binding = newBinding("informal-value");
 
          TextArea component = (TextArea) newInstance(TextArea.class, new Object[]
          { "value", "text area value", "specification", new ComponentSpecification() });
 
          component.setBinding("informal", binding);
 
          MockControl cyclec = newControl(IRequestCycle.class);
          IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
 
          MockControl formc = newControl(IForm.class);
          IForm form = (IForm) formc.getMock();
 
          IMarkupWriter writer = newWriter();
 
          IValidationDelegate delegate = newDelegate();
 
          trainGetForm(cyclec, cycle, form);
          trainGetDelegate(formc, form, delegate);
 
          delegate.setFormComponent(component);
 
          trainWasPrerendered(formc, form, writer, component, false);
          trainIsRewinding(formc, form, false);
          trainGetElementId(formc, form, component, "fred");
          trainIsRewinding(cyclec, cycle, false);
          trainGetDelegate(formc, form, delegate);
 
          delegate.writePrefix(writer, cycle, component, null);
 
          writer.begin("textarea");
          writer.attribute("name", "fred");
          writer.attribute("informal", "informal-value");
 
          delegate.writeAttributes(writer, cycle, component, null);
 
          writer.print("text area value");
 
          writer.end();
 
          delegate.writeSuffix(writer, cycle, component, null);
 
          replayControls();
 
          component.render(writer, cycle);
 
          verifyControls();
      }
 
      public void testRenderNullValue()
      {
          TextArea component = (TextArea) newInstance(TextArea.class);
 
          MockControl cyclec = newControl(IRequestCycle.class);
          IRequestCycle cycle = (IRequestCycle) cyclec.getMock();
 
          MockControl formc = newControl(IForm.class);
          IForm form = (IForm) formc.getMock();
 
          IMarkupWriter writer = newWriter();
 
          IValidationDelegate delegate = newDelegate();
 
          trainGetForm(cyclec, cycle, form);
          trainGetDelegate(formc, form, delegate);
 
          delegate.setFormComponent(component);
 
          trainWasPrerendered(formc, form, writer, component, false);
          trainIsRewinding(formc, form, false);
          trainGetElementId(formc, form, component, "fred");
          trainIsRewinding(cyclec, cycle, false);
          trainGetDelegate(formc, form, delegate);
 
          delegate.writePrefix(writer, cycle, component, null);
 
          writer.begin("textarea");
          writer.attribute("name", "fred");
 
          delegate.writeAttributes(writer, cycle, component, null);
 
          writer.end();
 
          delegate.writeSuffix(writer, cycle, component, null);
 
          replayControls();
 
          component.render(writer, cycle);
 
          verifyControls();
      }
  }
 
 
 
  1.23      +0 -2      jakarta-tapestry/framework/src/java/org/apache/tapestry/TapestryStrings.properties
 
  Index: TapestryStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/TapestryStrings.properties,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- TapestryStrings.properties 20 May 2005 12:46:08 -0000 1.22
  +++ TapestryStrings.properties 21 May 2005 15:36:21 -0000 1.23
  @@ -159,8 +159,6 @@
   Body.may-not-nest=Body components may not be nested.
   Body.include-classpath-script-only=Unable to include external script {0}: only classpath resources are supported.
   
  -InsertText.conversion-error=Error converting text to lines (for InsertText component).
  -
   Rollover.must-be-contained-by-body=Rollover components must be contained within a Body component.
   Rollover.must-be-contained-by-link=Rollover components must be contained within an ILinkComponent.
   
 
 
 
  1.13      +2 -0      jakarta-tapestry/src/documentation/content/xdocs/links.ent
 
  Index: links.ent
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/src/documentation/content/xdocs/links.ent,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- links.ent 16 May 2005 12:06:13 -0000 1.12
  +++ links.ent 21 May 2005 15:36:22 -0000 1.13
  @@ -126,12 +126,14 @@
   <!ENTITY DirectLink '<link href="site:DirectLink">DirectLink</link>'>
   <!ENTITY ExceptionDisplay '<link href="site:ExceptionDisplay">ExceptionDisplay</link>'>
   <!ENTITY ExternalLink '<link href="site:ExternalLink">ExternalLink</link>'>
  +<!ENTITY FieldLabel '<link href="site:FieldLabel">FieldLabel</link>'>
   <!ENTITY Foreach '<link href="site:Foreach">Foreach</link>'>
   <!ENTITY Form '<link href="site:Form">Form</link>'>
   <!ENTITY Frame '<link href="site:Frame">Frame</link>'>
   <!ENTITY GenericLink '<link href="site:GenericLink">GenericLink</link>'>
   <!ENTITY Hidden '<link href="site:Hidden">Hidden</link>'>
   <!ENTITY ListEdit '<link href="site:ListEdit">ListEdit</link>'>
  +<!ENTITY LinkSubmit '<link href="site:LinkSubmit">LinkSubmit</link>'>
   <!ENTITY Image '<link href="site:Image">Image</link>'>
   <!ENTITY ImageSubmit '<link href="site:ImageSubmit">ImageSubmit</link>'>
   <!ENTITY Insert '<link href="site:Insert">Insert</link>'>
 
 
 
  1.6       +8 -0      jakarta-tapestry/framework/src/java/org/apache/tapestry/form/TextArea.java
 
  Index: TextArea.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/form/TextArea.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TextArea.java 3 May 2005 17:41:27 -0000 1.5
  +++ TextArea.java 21 May 2005 15:36:22 -0000 1.6
  @@ -17,6 +17,7 @@
   import org.apache.tapestry.IForm;
   import org.apache.tapestry.IMarkupWriter;
   import org.apache.tapestry.IRequestCycle;
  +import org.apache.tapestry.valid.IValidationDelegate;
   
   /**
    * Implements a component that manages an HTML &lt;textarea&gt; form element. [ <a
  @@ -60,6 +61,10 @@
           if (cycle.isRewinding())
               return;
   
  +        IValidationDelegate delegate = form.getDelegate();
  +
  +        delegate.writePrefix(writer, cycle, this, null);
  +
           writer.begin("textarea");
   
           writer.attribute("name", name);
  @@ -69,6 +74,8 @@
   
           renderInformalParameters(writer, cycle);
   
  +        delegate.writeAttributes(writer, cycle, this, null);
  +
           String value = getValue();
   
           if (value != null)
  @@ -76,6 +83,7 @@
   
           writer.end();
   
  +        delegate.writeSuffix(writer, cycle, this, null);
       }
   
       public abstract boolean isDisabled();
 
 
 
  1.5       +9 -2      jakarta-tapestry/framework/src/java/org/apache/tapestry/form/TextArea.jwc
 
  Index: TextArea.jwc
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/form/TextArea.jwc,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TextArea.jwc 18 Apr 2005 17:06:41 -0000 1.4
  +++ TextArea.jwc 21 May 2005 15:36:22 -0000 1.5
  @@ -25,9 +25,16 @@
     A multi-line text area.
     </description>
     
  -  <parameter name="value" required="yes"/>
  +  <parameter name="value" default-binding="ognl" required="yes"/>
     
  -  <parameter name="disabled"/>
  +  <parameter name="disabled" default-binding="ognl">
  +      If true, then the disabled attribute will be written on render, and the
  +      TextArea will not update its value parameter when the form is submitted.
  +  </parameter>
  +  
  +  <parameter name="displayName" default-binding="literal">
  +      The name of the field, which may be used by a FieldLabel.
  +  </parameter>
     
     <reserved-parameter name="name"/>
     
 
 
 
  1.7       +37 -9     jakarta-tapestry/framework/src/java/org/apache/tapestry/valid/IValidationDelegate.java
 
  Index: IValidationDelegate.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/valid/IValidationDelegate.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- IValidationDelegate.java 20 May 2005 12:46:09 -0000 1.6
  +++ IValidationDelegate.java 21 May 2005 15:36:22 -0000 1.7
  @@ -80,8 +80,7 @@
   {
       /**
        * Invoked before other methods to configure the delegate for the given form component. Sets the
  -     * current field based on the {@link IFormComponent#getName() name}of the form component (which
  -     * is almost always a {@link ValidField}).
  +     * current field based on the {@link IFormComponent#getName() name} of the form component.
        * <p>
        * The caller should invoke this with a parameter of null to record unassociated global errors
        * (errors not associated with any particular field).
  @@ -92,8 +91,8 @@
       public void setFormComponent(IFormComponent component);
   
       /**
  -     * Returns true if the current component is in error (that is, had bad input submitted by the
  -     * end user).
  +     * Returns true if the current field is in error (that is, had bad input submitted by the end
  +     * user).
        *
        * @since 1.0.8
        */
  @@ -109,7 +108,7 @@
       public String getFieldInputValue();
   
       /**
  -     * Returns a {@link List}of {@link IFieldTracking}, in default order (the order in which
  +     * Returns a {@link List} of {@link IFieldTracking}, in default order (the order in which
        * fields are renderred). A caller should not change the values (the List is immutable). May
        * return null if no fields are in error.
        *
  @@ -184,6 +183,16 @@
       /**
        * Invoked before the field is rendered. If the field is in error, the delegate may decorate the
        * field in some way (to highlight its error state).
  +     *
  +     * @param writer
  +     *            the writer to which output should be sent
  +     * @param cycle
  +     *            the active request cycle
  +     * @param component
  +     *            the component being decorated
  +     * @param validator
  +     *            the validator for the component, or null if the component does have (or doesn't
  +     *            support) a validator
        */
   
       public void writePrefix(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component,
  @@ -192,8 +201,17 @@
       /**
        * Invoked just before the &lt;input&gt; element is closed. The delegate can write additional
        * attributes. This is often used to set the CSS class of the field so that it can be displayed
  -     * differently, if in error (or required).
  +     * differently, if in error (or required). *
        *
  +     * @param writer
  +     *            the writer to which output should be sent
  +     * @param cycle
  +     *            the active request cycle
  +     * @param component
  +     *            the component being decorated
  +     * @param validator
  +     *            the validator for the component, or null if the component does have (or doesn't
  +     *            support) a validator
        * @since 1.0.5
        */
   
  @@ -202,20 +220,30 @@
   
       /**
        * Invoked after the form component is rendered, so that the delegate may decorate the form
  -     * component (if it is in error).
  +     * component (if it is in error). *
  +     *
  +     * @param writer
  +     *            the writer to which output should be sent
  +     * @param cycle
  +     *            the active request cycle
  +     * @param component
  +     *            the component being decorated
  +     * @param validator
  +     *            the validator for the component, or null if the component does have (or doesn't
  +     *            support) a validator
        */
   
       public void writeSuffix(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component,
               IValidator validator);
   
       /**
  -     * Invoked by a {@link FieldLabel}just before writing the name of the form component.
  +     * Invoked by a {@link FieldLabel} just before writing the name of the form component.
        */
   
       public void writeLabelPrefix(IFormComponent component, IMarkupWriter writer, IRequestCycle cycle);
   
       /**
  -     * Invoked by a {@link FieldLabel}just after writing the name of the form component.
  +     * Invoked by a {@link FieldLabel} just after writing the name of the form component.
        */
   
       public void writeLabelSuffix(IFormComponent component, IMarkupWriter writer, IRequestCycle cycle);
 
 
 
  1.6       +13 -2     jakarta-tapestry/framework/src/test/org/apache/tapestry/components/BaseComponentTestCase.java
 
  Index: BaseComponentTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/components/BaseComponentTestCase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BaseComponentTestCase.java 20 May 2005 12:46:08 -0000 1.5
  +++ BaseComponentTestCase.java 21 May 2005 15:36:22 -0000 1.6
  @@ -48,6 +48,12 @@
           return newInstance(componentClass, null);
       }
   
  +    protected Object newInstance(Class componentClass, String propertyName, Object propertyValue)
  +    {
  +        return getCreator().newInstance(componentClass, new Object[]
  +        { propertyName, propertyValue });
  +    }
  +
       protected Object newInstance(Class componentClass, Object[] properties)
       {
           return getCreator().newInstance(componentClass, properties);
  @@ -63,12 +69,17 @@
           MockControl control = newControl(IRequestCycle.class);
           IRequestCycle cycle = (IRequestCycle) control.getMock();
   
  -        cycle.isRewinding();
  -        control.setReturnValue(rewinding);
  +        trainIsRewinding(control, cycle, rewinding);
   
           return cycle;
       }
   
  +    protected void trainIsRewinding(MockControl control, IRequestCycle cycle, boolean rewinding)
  +    {
  +        cycle.isRewinding();
  +        control.setReturnValue(rewinding);
  +    }
  +
       protected IRequestCycle newCycle(String pageName, IPage page)
       {
           MockControl control = newControl(IRequestCycle.class);
 
 
 
  1.6       +1 -1      jakarta-tapestry/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Submit.xml
 
  Index: Submit.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Submit.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Submit.xml 20 May 2005 12:46:07 -0000 1.5
  +++ Submit.xml 21 May 2005 15:36:22 -0000 1.6
  @@ -185,7 +185,7 @@
   </p>
   
   <p>
  -  Reserved parameters: <em>name, type</em>
  +  Reserved parameters: name, type
   </p>
   
   <warning>
 
 
 
  1.4       +1 -1      jakarta-tapestry/framework/src/documentation/content/xdocs/tapestry/ComponentReference/RenderBlock.xml
 
  Index: RenderBlock.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/documentation/content/xdocs/tapestry/ComponentReference/RenderBlock.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RenderBlock.xml 20 May 2005 12:46:07 -0000 1.3
  +++ RenderBlock.xml 21 May 2005 15:36:22 -0000 1.4
  @@ -99,7 +99,7 @@
     
   </p>
   
  -<figure src="&projectroot;/images/tapestry/ComponentReference/RenderBlock.png"/>
  +<figure src="&projectroot;/images/tapestry/ComponentReference/RenderBlock.png" alt="RenderBlock Screen Shot"/>
       
   <p>
   First we'll show a page that makes use of the TabPanel component.
 
 
 
  1.3       +45 -9     jakarta-tapestry/framework/src/documentation/content/xdocs/tapestry/ComponentReference/TextArea.xml
 
  Index: TextArea.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/documentation/content/xdocs/tapestry/ComponentReference/TextArea.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TextArea.xml 6 Jan 2005 02:17:15 -0000 1.2
  +++ TextArea.xml 21 May 2005 15:36:22 -0000 1.3
  @@ -28,11 +28,11 @@
     
     <body>
   
  -<p> <strong>THIS PAGE UNDER CONSTRUCTION</strong>
  +<p> A form element control that renders an HTML &lt;textarea&gt;, a multi-line text input.
   </p>
   
   <p>
  -  <strong>See also:</strong>
  +  <strong>See also: <link href="&apiroot;/form/TextArea.html">org.apache.tapestry.form.TextArea</link>, &InsertText;, &TextField;</strong>
   </p>
   
   <section>
  @@ -45,28 +45,64 @@
     <th>Direction</th>
       <th>Required</th>
       <th>Default</th>
  +    <th>Default Binding</th>
       <th>Description</th>
     </tr>
   
  +  <tr>
  +    <td>value</td>
  +    <td>string</td>
  +    <td>in / out</td>
  +    <td>yes</td>
  +    <td>&nbsp;</td>
  +    <td>ognl</td>
  +    <td>The value to read and update (unless the disabled parameters is true).</td>
  +  </tr>
  +  
  +  <tr>
  +    <td>disabled</td>
  +    <td>boolean</td>
  +    <td>in</td>
  +    <td>no</td>
  +    <td>false</td>
  +    <td>ognl</td>
  +    <td>
  +      If true, then the &lt;textarea&gt; will be written with a disabled attribute (preventing user interaction
  +      in the client web browser).  In addition, when the form is submitted, the component will not update
  +      its value parameter.
  +    </td>
  +  </tr>
  +  
  +  <tr>
  +    <td>displayName</td>
  +    <td>string</td>
  +    <td>in</td>
  +    <td>no</td>
  +    <td>&nbsp;</td>
  +    <td>literal</td>
  +    <td>
  +      A name for the field, which may be used by the &FieldLabel; component connected to the TextArea.
  +    </td>
  +  </tr>
  +
    </table>
     
   <p>
  -  Body: <strong>removed / allowed</strong>
  +  Body: <strong>removed</strong>
   </p>  
   
   <p>
  -  Informal parameters: <strong>allowed  / forbidden</strong>
  +  Informal parameters: <strong>allowed</strong>
   </p>
   
   <p>
  -  Reserved parameters: <em>none</em>
  +  Reserved parameters: name
   </p>
   
  -</section>
  -
  -<section>
  -  <title>Examples</title>
  +<p> TextArea components may not have a validator, but they will be decorated by a &IValidationDelegate; if in error.  Since there is
  +  no validator, such errors would be set within a listener method. </p>
   
   </section>
  +
   </body>
   </document>
  \ No newline at end of file
 
 
 
  1.3       +48 -7     jakarta-tapestry/framework/src/documentation/content/xdocs/tapestry/ComponentReference/InsertText.xml
 
  Index: InsertText.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/documentation/content/xdocs/tapestry/ComponentReference/InsertText.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InsertText.xml 6 Jan 2005 02:17:15 -0000 1.2
  +++ InsertText.xml 21 May 2005 15:36:22 -0000 1.3
  @@ -28,11 +28,14 @@
     
     <body>
   
  -<p> <strong>THIS PAGE UNDER CONSTRUCTION</strong>
  +<p> Inserts multi-line text, breaking it into individual lines according to a mode. Commonly used to properly display the
  +  data provided by a user via the &TextArea; component.
   </p>
   
   <p>
  -  <strong>See also:</strong>
  +  <strong>See also: <link href="&apiroot;/html/InsertText.html">org.apache.tapestry.html.InsertText</link>,
  +    <link href="&apiroot;/html/InsertTextMode.html">org.apache.tapestry.html.InsertTextMode</link>,
  +    &TextArea;</strong>
   </p>
   
   <section>
  @@ -45,28 +48,66 @@
     <th>Direction</th>
       <th>Required</th>
       <th>Default</th>
  +    <th>Default Binding</th>
       <th>Description</th>
     </tr>
   
  +  <tr>
  +    <td>value</td>
  +    <td>string</td>
  +    <td>in</td>
  +    <td>yes</td>
  +    <td>&nbsp;</td>
  +    <td>ognl</td>
  +    <td>The multi-line string to render.</td>
  +  </tr>
  +  
  +  <tr>
  +    <td>mode</td>
  +    <td><link href="&apiroot;/html/InsertTextMode.html">InsertTextMode</link></td>
  +    <td>in</td>
  +    <td>no</td>
  +    <td>BREAK</td>
  +    <td>ognl</td>
  +    <td>Controls how each line is rendered.</td>
  +  </tr>
  +  
  +  <tr>
  +    <td>raw</td>
  +    <td>boolean</td>
  +    <td>in</td>
  +    <td>no</td>
  +    <td>false</td>
  +    <td>ognl</td>
  +    <td>If true, then output is not filtered for HTML entities.  Used when the value parameter contains markup that should
  +      be rendered as-is.</td>
  +  </tr>
  +  
    </table>
     
   <p>
  -  Body: <strong>removed / allowed</strong>
  +  Body: <strong>removed</strong>
   </p>  
   
   <p>
  -  Informal parameters: <strong>allowed  / forbidden</strong>
  +  Informal parameters: <strong>forbidden</strong>
   </p>
   
   <p>
     Reserved parameters: <em>none</em>
   </p>
   
  +<p>
  +  The value parameter is split into multiple lines, and each line is printed.
  +  The default <em>mode</em> renders a &lt;br/&gt; tag between lines (that is, before each line after the first line output).
  +  The alternate mode renders &lt;p&gt; and &lt;/p&gt; tags around each line.
  +</p>
   </section>
   
  -<section>
  -  <title>Examples</title>
  +<p>
  +The OGNL expression <code>@org.apache.tapestry.html.InsertTextMode@PARAGRAPH</code> can be used to specify paragraph rendering mode.
  +</p>
  +
   
  -</section>
   </body>
   </document>
  \ No newline at end of file
 
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]