Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for 
change notification.

The "Tapestry5HowToGetAnHTMLStringFromARenderCommandParameter" page has been 
changed by uklance:
http://wiki.apache.org/tapestry/Tapestry5HowToGetAnHTMLStringFromARenderCommandParameter?action=diff&rev1=4&rev2=5

  Sometimes, you may want to specify a component parameter in tapestry's markup 
language (TML) and instead of rendering the HTML directly to the response 
output stream, you may wish to use it for some other purpose (eg use it in a 
javascript).
  
+ === Example 1 ===
  The code below demonstrates a component that does the following:
   * Accepts a count parameter and a 
[[http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/runtime/RenderCommand.html|RenderCommand]]
 parameter
   * Adds a wrapper div to the markup writer
@@ -83, +84 @@

  alert('<div>foo 0 bar</div><div>foo 1 bar</div><div>foo 2 bar</div><div>foo 3 
bar</div><div>foo 4 bar</div>');
  }}}
  
+ === Example 2 ===
  Here is a slightly different example which uses the component's body block 
instead of a render command parameter. Note that tapestry's 
[[http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/ioc/services/TypeCoercer.html|TypeCoercer]]
 can coerce between 
[[http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/Block.html|Block]]
 and 
[[http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/runtime/RenderCommand.html|RenderCommand]]
  
  Page.tml

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

Reply via email to