tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dso...@apache.org
Subject cvs commit: jakarta-tapestry/doc/src/ComponentReference RenderBlock.html RenderBody.html
Date Wed, 04 Jun 2003 00:57:58 GMT
dsolis      2003/06/03 17:57:58

  Modified:    doc/src/ComponentReference RenderBlock.html RenderBody.html
  Added:       doc/src/ComponentReference/images poweredbyTapestry.gif
  Log:
  Add RenderBody and improve RenderBlock example
  
  Revision  Changes    Path
  1.1                  jakarta-tapestry/doc/src/ComponentReference/images/poweredbyTapestry.gif
  
  	<<Binary file>>
  
  
  1.6       +19 -63    jakarta-tapestry/doc/src/ComponentReference/RenderBlock.html
  
  Index: RenderBlock.html
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/doc/src/ComponentReference/RenderBlock.html,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RenderBlock.html	1 Jun 2003 05:05:16 -0000	1.5
  +++ RenderBlock.html	4 Jun 2003 00:57:57 -0000	1.6
  @@ -113,7 +113,7 @@
   	        <p> This example shows a page with a custom TabPanel component. When 
                 a user selects a tab, TabPanel switches content. Each tab content 
                 is defined by a Block.</p>
  -			<table border="0" width="50%" cellspacing="0" cellpadding="0">
  +			<table class="examples" border="0" width="350" cellspacing="0" cellpadding="0">
   <tr>
     <td width="10">&nbsp;</td>
     <td>
  @@ -162,10 +162,13 @@
               TabPanel.html
               <pre>&lt;table border=&quot;0&quot; width=&quot;50%&quot;
cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;<br>    &lt;tr&gt;<br>
       &lt;td width=&quot;10&quot;&gt;&amp;nbsp;&lt;/td&gt;<br>
       &lt;td&gt;<br>            &lt;table border=&quot;0&quot;
cellspacing=&quot;0&quot; cellpadding=&quot;5&quot;&gt;<br>    
           &lt;tr&gt;<br>                    &lt;span jwcid=&quot;foreach@Foreach&quot;
source=&quot;ognl:blockNames&quot; value=&quot;ognl:currentBlock&quot;&gt;<br>
                       &lt;td jwcid=&quot;@Any&quot; element=&quot;td&quot;
bgcolor=&quot;ognl:tabCellColor&quot;&gt;<br>                          
 &lt;a jwcid=&quot;link&quot;&gt;<br>                              
 &lt;span jwcid=&quot;@Insert&quot; value=&quot;ognl:components.foreach.value&quot;&gt;Tab
Title&lt;/span&gt;<br>                            &lt;/a&gt;<br>
                       &lt;/td&gt;<br>                        &lt;td width=&quot;1&quot;&gt;&lt;/td&gt;<br>
                   &lt;/span&gt;<br>                &lt;/tr&gt;<br>
           &lt;/table&gt;<br>        &lt;/td&gt;<br>        &lt;td
width=&quot;10&quot;&gt;&amp;nbsp;&lt;/td&gt;<br>    &lt;/tr&gt;<br>
   &lt;tr&gt;<br>        &lt;td jwcid=&quot;@Any&quot; element=&quot;td&quot;
height=&quot;5&quot; bgcolor=&quot;ognl:borderColor&quot; colspan=&quot;3&quot;&gt;&amp;nbsp;&lt;/td&gt;<br>
   &lt;/tr&gt;<br>    &lt;tr&gt;<br>        &lt;td jwcid=&quot;@Any&quot;
element=&quot;td&quot; width=&quot;10&quot; bgcolor=&quot;ognl:borderColor&quot;&gt;&amp;nbsp;&lt;/td&gt;<br>
       &lt;td align=&quot;center&quot;&gt;<br>            &lt;span
jwcid=&quot;@<a href="RenderBlock.html">RenderBlock</a>&quot; block='ognl:block'&gt;Page
content goes here&lt;/span&gt;<br>        &lt;/td&gt;<br>    
   &lt;td jwcid=&quot;@Any&quot; element=&quot;td&quot; width=&quot;10&quot;
bgcolor=&quot;ognl:borderColor&quot;&gt;&amp;nbsp;&lt;/td&gt;<br>
   &lt;/tr&gt;<br>    &lt;tr&gt;<br>        &lt;td jwcid=&quot;@Any&quot;
element=&quot;td&quot; height=&quot;5&quot; bgcolor=&quot;ognl:borderColor&quot;
colspan=&quot;3&quot;&gt;&amp;nbsp;&lt;/td&gt;<br>    &lt;/tr&gt;<br>&lt;/table&gt;<br>
   </pre>
  -<br>TabPanel.jwc 
  -            <pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;!DOCTYPE
component-specification<br>    PUBLIC &quot;-//Apache Software Foundation//Tapestry
Specification 3.0//EN&quot;<br>    &quot;http://jakarta.apache.org/tapestry/dtd/Tapestry_1_4.dtd&quot;&gt;<br><br>&lt;component-specification
class=&quot;spoc.components.TabPanel&quot; allow-body=&quot;no&quot; allow-informal-parameters=&quot;no&quot;&gt;<br>
   &lt;parameter name=&quot;blockNames&quot; direction=&quot;in&quot;
type=&quot;java.util.List&quot; required=&quot;yes&quot;/&gt;<br>
   &lt;parameter name=&quot;selectColor&quot; direction=&quot;in&quot;
type=&quot;java.lang.String&quot; required=&quot;no&quot;/&gt;<br>
   &lt;parameter name=&quot;unSelectColor&quot; direction=&quot;in&quot;
type=&quot;java.lang.String&quot; required=&quot;no&quot;/&gt;<br>
   &lt;parameter name=&quot;borderColor&quot; direction=&quot;in&quot;
type=&quot;java.lang.String&quot; required=&quot;no&quot;/&gt;<br><br>
   &lt;component id=&quot;link&quot; type=&quot;DirectLink&quot;&gt;<br>
       &lt;binding name=&quot;listener&quot; expression=&quot;listeners.selectBlock&quot;/&gt;<br>
       &lt;binding name=&quot;parameters&quot; expression=&quot;components.foreach.value&quot;/&gt;<br>
       &lt;binding name=&quot;disabled&quot; expression=&quot;currentBlock
== selectedBlock&quot;/&gt;<br>        &lt;binding name=&quot;stateful&quot;
expression=&quot;false&quot;/&gt;<br>    &lt;/component&gt;<br><br>
   &lt;property-specification name=&quot;selectedBlock&quot; type=&quot;java.lang.String&quot;/&gt;<br>
   &lt;property-specification name=&quot;currentBlock&quot; type=&quot;java.lang.String&quot;/&gt;<br>&lt;/component-specification&gt;<br>
  +<br>
  +            TabPanel.jwc 
  +            <pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;!DOCTYPE
component-specification<br>    PUBLIC &quot;-//Apache Software Foundation//Tapestry
Specification 3.0//EN&quot;<br>    &quot;http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd&quot;&gt;<br><br>&lt;component-specification
class=&quot;spoc.components.TabPanel&quot; allow-body=&quot;no&quot; allow-informal-parameters=&quot;no&quot;&gt;<br>
   &lt;property-specification name=&quot;selectedBlock&quot; type=&quot;java.lang.String&quot;/&gt;<br>
   &lt;property-specification name=&quot;currentBlock&quot; type=&quot;java.lang.String&quot;/&gt;<br>
  +    &lt;parameter name=&quot;blockNames&quot; direction=&quot;in&quot;
type=&quot;java.util.List&quot; required=&quot;yes&quot;/&gt;<br>
   &lt;parameter name=&quot;borderColor&quot; direction=&quot;in&quot;
type=&quot;java.lang.String&quot; required=&quot;yes&quot;/&gt;<br>
   &lt;parameter name=&quot;selectColor&quot; direction=&quot;in&quot;
type=&quot;java.lang.String&quot; required=&quot;no&quot;/&gt;<br>
   &lt;parameter name=&quot;unSelectColor&quot; direction=&quot;in&quot;
type=&quot;java.lang.String&quot; required=&quot;no&quot;/&gt;<br><br>
   &lt;component id=&quot;link&quot; type=&quot;DirectLink&quot;&gt;<br>
       &lt;binding name=&quot;listener&quot; expression=&quot;listeners.selectBlock&quot;/&gt;<br>
       &lt;binding name=&quot;parameters&quot; expression=&quot;components.foreach.value&quot;/&gt;<br>
       &lt;binding name=&quot;disabled&quot; expression=&quot;currentBlock
== selectedBlock&quot;/&gt;<br>        &lt;binding name=&quot;stateful&quot;
expression=&quot;false&quot;/&gt;<br>    &lt;/component&gt;<br><br>&lt;/component-specification&gt;<br>
   </pre>
  -<br>TabPanel.java
  +            <br>
  +            TabPanel.java 
               <pre>package com.dsconsulting.tapestry.components;
   
   import org.apache.tapestry.BaseComponent;
  @@ -177,65 +180,18 @@
   
   public abstract class TabPanel extends BaseComponent {
   
  -    public static final String SELECT_COLOR = "#7D000D";
  -    public static final String UNSELECT_COLOR = "#C0C0C0";
  -
  -    private String _borderColor = SELECT_COLOR;
  -    private List _blockNames;
  -
  -    public List getBlockNames() {
  -        return _blockNames;
  -    }
  -
  -    public void setBlockNames(List value) {
  -        _blockNames = value;
  -        if (getSelectedBlock() == null) {
  -            String defaultComponent = getDefaultBlock();
  -            setSelectedBlock(defaultComponent);
  -            setCurrentBlock(defaultComponent);
  -        }
  -    }
  -
  -    public String getTabCellColor() {
  -        String selectColor = getSelectColor();
  -        String unSelectColor = getUnSelectColor();
  -        return getCurrentBlock().equals(getSelectedBlock()) ?
  -                selectColor != null ? selectColor : SELECT_COLOR :
  -                unSelectColor != null ? unSelectColor : UNSELECT_COLOR;
  -    }
  -
  -    public String getBorderColor() {
  -        return _borderColor;
  -    }
  -
  -    public void setBorderColor(String value) {
  -        _borderColor = value;
  -    }
  -
  -     public void selectBlock(IRequestCycle cycle) {
  -        String block = (String) cycle.getServiceParameters()[0];
  -        setSelectedBlock(block);
  -        fireObservedChange("selectedBlock", block);
  -    }
  -
  -    public Block getBlock() {
  -        return (Block) getPage().getComponent(getSelectedBlock());
  -    }
  -
  -    public String getDefaultBlock() {
  -        List tabComponents = getBlockNames();
  -        return  tabComponents != null ? (String)tabComponents.get(0) : null;
  -    }
  -
  -    public abstract String getSelectColor();
  -    public abstract String getUnSelectColor();
  -
  -    public abstract String getSelectedBlock();
  -    public abstract void setSelectedBlock(String value);
  -
  -    public abstract String getCurrentBlock();
  -    public abstract void setCurrentBlock(String value);
   
  +    public static final String DEFAULT_SELECT_COLOR = &quot;#7D000D&quot;;<br>
   public static final String DEFAULT_UNSELECT_COLOR = &quot;#C0C0C0&quot;;<br>
  +    private List _blockNames;<br>
  +    public List getBlockNames() {<br>        return _blockNames;<br>    }<br>
  +    public void setBlockNames(List value) {<br>        _blockNames = value;<br>
       if (getSelectedBlock() == null) {<br>            String defaultComponent = getDefaultBlock();<br>
           setSelectedBlock(defaultComponent);<br>            setCurrentBlock(defaultComponent);<br>
       }<br>    }<br>
  +    public String getTabCellColor() {<br>        String selectColor = getSelectColor();<br>
       String unSelectColor = getUnSelectColor();<br>        return getCurrentBlock().equals(getSelectedBlock())
?<br>                selectColor != null ? selectColor : DEFAULT_SELECT_COLOR :<br>
               unSelectColor != null ? unSelectColor : DEFAULT_UNSELECT_COLOR;<br> 
  }<br>
  +    public void selectBlock(IRequestCycle cycle) {<br>        String block = (String)
cycle.getServiceParameters()[0];<br>        setSelectedBlock(block);<br>     
  fireObservedChange(&quot;selectedBlock&quot;, block);<br>    }<br>
  +    public Block getBlock() {<br>        return (Block) getPage().getComponent(getSelectedBlock());<br>
   }<br>
  +    public String getDefaultBlock() {<br>        List tabComponents = getBlockNames();<br>
       return  tabComponents != null ? (String)tabComponents.get(0) : null;<br>    }<br>
  +    public abstract String getSelectColor();<br>    public abstract String getUnSelectColor();<br>
  +    public abstract String getSelectedBlock();<br>    public abstract void setSelectedBlock(String
value);<br>
  +    public abstract String getCurrentBlock();<br>    public abstract void setCurrentBlock(String
value);<br>
   }
   </pre>
             </td>
  
  
  
  1.5       +59 -7     jakarta-tapestry/doc/src/ComponentReference/RenderBody.html
  
  Index: RenderBody.html
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/doc/src/ComponentReference/RenderBody.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RenderBody.html	2 Apr 2003 01:37:59 -0000	1.4
  +++ RenderBody.html	4 Jun 2003 00:57:57 -0000	1.5
  @@ -102,13 +102,65 @@
   <tr>
    <td colspan="2">
     <b>Examples</b>
  -	<p>
  -  This example is under construction. See the 
  -            Tutorial Border for an example usage of this component.</p>
  +	        <p> This example shows an implementation of the classical Border component,

  +              an application specific component. It is a common practice to use 
  +              a Border component to provide common layout to almost all of application

  +              pages. </p>
                
  -     
  -
  - </td></tr></table>
  +	        <table width="200" class="examples" cellspacing="0" border="0" align="center">
  +              <tr>
  +				<td valign="top" style="text-align:justify;">
  +<H1 align=center><FONT color=#ff3333>Agnosis</FONT></H1>
  +<TABLE align=center border=0>
  +	<TR>
  +		<TD>
  +			<P>
  +				<B>A</B>GNOSIS feliz
  +				<BR/>
  +				<B>G</B>racias al ciego destino
  +				<BR/>
  +				<B>N</B>ada es constante
  +				<BR/>
  +				<B>O</B>lvidados por el Hado
  +				<BR/>
  +				<B>S</B>i Él existe
  +				<BR/>
  +				<B>I</B>ncomprensible y eterno
  +				<BR/>
  +				<B>S</B>ilencio 
  +			</P>
  +		</TD>
  +	</TR>
  +</TABLE>
  +<br/>
  +	</td>
  +			</tr>
  +			<tr>
  +				<td valign="bottom">
  +					<table width="100%" cellspacing="0" border="0">
  +						<tr>
  +							<td align="center">
  +								<a href="http://jakarta.apache.org/tapestry"><img src="images/poweredbyTapestry.gif"
width="79" height="33" border="0" alt="Tapestry"></a>
  +								<br/>
  +								<br/>
  +							</td>
  +						</tr>
  +					</table>
  +				</td>
  +			</tr>
  +		</table>
  +        <br>
  +            <pre>&lt;span jwcid=&quot;@Border&quot;&gt;<br>&lt;H1
align=center&gt;&lt;FONT color=#ff3333&gt;Agnosis&lt;/FONT&gt;&lt;/H1&gt;<br>&lt;TABLE
align=center border=0&gt;<br>   &lt;TR&gt;<br>      &lt;TD&gt;<br>
        &lt;P&gt;<br>            &lt;B&gt;A&lt;/B&gt;GNOSIS
feliz<br>            &lt;BR/&gt;<br>            &lt;B&gt;G&lt;/B&gt;racias
al ciego destino<br>            &lt;BR/&gt;<br>            &lt;B&gt;N&lt;/B&gt;ada
es constante<br>            &lt;BR/&gt;<br>            &lt;B&gt;O&lt;/B&gt;lvidados
por el Hado<br>            &lt;BR/&gt;<br>            &lt;B&gt;S&lt;/B&gt;i
&Eacute;l existe<br>            &lt;BR/&gt;<br>            &lt;B&gt;I&lt;/B&gt;ncomprensible
y eterno<br>            &lt;BR/&gt;<br>            &lt;B&gt;S&lt;/B&gt;ilencio
<br>         &lt;/P&gt;<br>      &lt;/TD&gt;<br>   &lt;/TR&gt;<br>&lt;/TABLE&gt;<br>&lt;br/&gt;<br>&lt;/span&gt;</pre>
  +            <br>
  +            Border.html 
  +            <pre>&lt;html jwcid=&quot;@Shell&quot; title=&quot;RenderBody
Example&quot;&gt;<br>   &lt;body jwcid=&quot;@Body&quot;&gt;<br>
     &lt;table width=&quot;100%&quot; cellspacing=&quot;0&quot; border=&quot;0&quot;&gt;<br>
        &lt;tr&gt;<br>           &lt;td valign=&quot;top&quot; style=&quot;text-align:justify;&quot;&gt;<br>
             &lt;span jwcid=&quot;@<a href="RenderBody.html">RenderBody</a>&quot;&gt;Page
content goes here.&lt;/span&gt;<br>           &lt;/td&gt;<br>
       &lt;/tr&gt;<br>        &lt;tr&gt;<br>           &lt;td
valign=&quot;bottom&quot;&gt;<br>              &lt;table width=&quot;100%&quot;
cellspacing=&quot;0&quot; border=&quot;0&quot;&gt;<br>         
       &lt;tr&gt;<br>                    &lt;td align=&quot;center&quot;&gt;<br>
                      &lt;a href=&quot;http://jakarta.apache.org/tapestry&quot;&gt;&lt;img
src=&quot;images/poweredbyTapestry.gif&quot; width=&quot;79&quot; height=&quot;33&quot;
border=&quot;0&quot; alt=&quot;Tapestry&quot;&gt;&lt;/a&gt;<br>
                      &lt;br/&gt;<br>                       &lt;br/&gt;<br>
                   &lt;/td&gt;<br>                 &lt;/tr&gt;<br>
             &lt;/table&gt;<br>           &lt;/td&gt;<br>    
   &lt;/tr&gt;<br>     &lt;/table&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;</pre>
  +            <br>
  +            Border.jwc 
  +            <pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;!DOCTYPE
component-specification<br>    PUBLIC &quot;-//Apache Software Foundation//Tapestry
Specification 3.0//EN&quot;<br>    &quot;http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd&quot;&gt;<br>
  +&lt;component-specification allow-body=&quot;yes&quot; allow-informal-parameters=&quot;no&quot;&gt;<br>&lt;/component-specification&gt;<br>
  +</pre>
  +          </td>
  +        </tr></table>
   </td></tr>
   <tr>
    <td colspan="3"><hr></td>  
  
  
  

Mime
View raw message