<?xml version="1.0"?>
<rss version="2.0">
<channel>
  <title>Spikes Of Nothingness - component tag</title>
  <link>http://weblog.flop.ca/tags/component/</link>
  <description>Florin T.PATRASCU&#039;s blog</description>
  <language>en</language>
  <copyright>Florin T.PATRASCU</copyright>
  <lastBuildDate>Sat, 12 May 2012 02:12:08 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  
  <item>
    <title>StringTemplate Renderer for JPublish, a Component this time ;)  </title>
    <link>http://weblog.flop.ca/2007/09/01/1188678524233.html</link>
    
      
        <description>
          &lt;p&gt;  &lt;/p&gt;
Hi there,&lt;br /&gt;
&lt;br /&gt;
For those of you maintaining JPublish sites developed with Velocity or FreeMarker, using the newly added StringTemplate renderer is not an easy option, especially if those sites are in production. So what can you do if you want to use ST? &lt;br /&gt;
&lt;br /&gt;
Don&#039;t worry, you can render StringTemplate syntax in Velocity/FreeMarker driven pages by using the StringTemplate component that I just added to the JPublish component family.&lt;br /&gt;
&lt;br /&gt;
Using it is very simple. &lt;br /&gt;
&lt;br /&gt;
Build the ST Component from &lt;a href=&#034;http://jpublish.googlecode.com/svn/trunk/components/jpStringTemplate/&#034;&gt;SVN&lt;/a&gt;&amp;nbsp; and load it in jpublish.xml:&lt;br /&gt;
&lt;blockquote&gt;&amp;lt;component-manager&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;components&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;component id=&amp;quot;JPST&amp;quot; classname=&amp;quot;ca.flop.jpublish.components.JPSTComponent&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;stringtemplate-groups&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;group name=&amp;quot;default&amp;quot; relative-root-dir=&amp;quot;/st_content&amp;quot; refresh-interval=&amp;quot;15&amp;quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lexer=&amp;quot;org.antlr.stringtemplate.language.DefaultTemplateLexer&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;group name=&amp;quot;menus&amp;quot; relative-root-dir=&amp;quot;/st_menus&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/stringtemplate-groups&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/component&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/components&amp;gt;&lt;br /&gt;
&amp;lt;/component-manager&amp;gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
and then use the ST component wherever ST is required, for example in a Velocity page:&lt;br /&gt;
&lt;strong&gt;&lt;font color=&#034;#333399&#034;&gt; $components.JPST.renderPath(&amp;quot;menus:main_menu&amp;quot;)&lt;/font&gt;&lt;/strong&gt;, the contents of the &lt;strong&gt;main_menu.st&lt;/strong&gt; file will be immediately rendered in-line.&lt;br /&gt;
&lt;br /&gt;
I will add more details in the &lt;a href=&#034;http://code.google.com/p/jpublish/wiki/JPublishUserGuide&#034;&gt;JPublish Wiki&lt;/a&gt;, meanwhile you can find the code and a &lt;a href=&#034;http://jpublish.googlecode.com/svn/trunk/components/jpStringTemplate/web/&#034;&gt;demo web application&lt;/a&gt; in our SVN.&lt;br /&gt;
&lt;br /&gt;
Have fun!&lt;br /&gt;
-florin
        </description>
      
      
    
    
    
    <category>Java</category>
    
    <comments>http://weblog.flop.ca/2007/09/01/1188678524233.html#comments</comments>
    <guid isPermaLink="true">http://weblog.flop.ca/2007/09/01/1188678524233.html</guid>
    <pubDate>Sat, 01 Sep 2007 20:28:44 GMT</pubDate>
  </item>
  
  <item>
    <title>Wiki syntax -Textile- available now in JPublish</title>
    <link>http://weblog.flop.ca/2007/05/20/1179691399799.html</link>
    
      
        <description>
          &lt;p&gt;  &lt;/p&gt;
In my recent blog &lt;a href=&#034;http://weblog.flop.ca/2007/05/19/1179627243661.html&#034;&gt;entry&lt;/a&gt; I was contemplating adding Wiki support to &lt;a href=&#034;http://code.google.com/p/jpublish/&#034;&gt;JPublish&lt;/a&gt;. &lt;strong&gt;It is available now :)&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
I decided to add &lt;a href=&#034;http://swik.net/Textile&#034;&gt;Textile&lt;/a&gt; support through &lt;a href=&#034;http://philwilson.org/projects/jtextile/&#034;&gt;JTextile&lt;/a&gt;. This is possible now very easy due to the improved support of the new JPublish Component API which I plan to improve even more. RADEOX implementation will follow.&lt;br /&gt;
&lt;br /&gt;
I can say that I am already addicted to this new feature, especially that you can create your pages with smart editors, such as: &lt;a href=&#034;http://macromates.com/&#034;&gt;TextMate&lt;/a&gt;, who already understands the Textile syntax and the bundle supplied with TextMate is very valuable.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s see how easy is to use the Textile support in JPublish.&lt;br /&gt;
&lt;br /&gt;
1. download and build our latest JPublish version from our new SVN repository.&lt;br /&gt;
2. if you want to go straight to the demo app, check the folder &lt;strong&gt;components/jptextile&lt;/strong&gt; from your JPublish folder and build the jptextile web application (ant &lt;strong&gt;dist&lt;/strong&gt;), deploy the distribution into your preferred Servlet container and start playing with Textile, skip the rest.&lt;br /&gt;
3. in your jpublish.xml configuration file from an existing application, add the following:&lt;br /&gt;
&lt;br /&gt;
&lt;font color=&#034;#333399&#034;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;component-manager&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;components&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;component id=&amp;quot;jpTextile&amp;quot; classname=&amp;quot;ca.flop.jpublish.wiki.JPTextileComponent&amp;quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;repository name=&amp;quot;fs_repository&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/component&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/components&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/component-manager&amp;gt;&lt;br /&gt;
&lt;/font&gt;&lt;br /&gt;
4. use Textile syntax in any page you need, through this simple component support:&amp;nbsp; &lt;strong&gt;&lt;span style=&#034;background-color: rgb(204, 255, 204);&#034;&gt;$components.jpTextile.renderText(&amp;quot;h1. Hi!&amp;quot;)&lt;/span&gt;&lt;/strong&gt;, if you want to transform a string containing Textile sytax, or include and transform an external file containing a larger text:&lt;span style=&#034;background-color: rgb(255, 255, 153);&#034;&gt; &lt;strong&gt;$components.jpTextile.renderPath(&amp;quot;text.textile&amp;quot;)&lt;/strong&gt; &lt;/span&gt;, where the &amp;quot;t&lt;strong&gt;ext.textile&lt;/strong&gt;&amp;quot; is a text file from your JPublish repository you mentioned in the jpublish.xml file; &lt;font color=&#034;#333399&#034;&gt;fs_repository&lt;/font&gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
I hope you&#039;ll find this support handy, and if yes, please send us your feedback to our &lt;a href=&#034;http://groups.google.com/group/jpublish-user?hl=en&#034;&gt;user-group list&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
-florin
        </description>
      
      
    
    
    
    <category>Java</category>
    
    <comments>http://weblog.flop.ca/2007/05/20/1179691399799.html#comments</comments>
    <guid isPermaLink="true">http://weblog.flop.ca/2007/05/20/1179691399799.html</guid>
    <pubDate>Sun, 20 May 2007 20:03:19 GMT</pubDate>
  </item>
  
  </channel>
</rss>

