- Revision
- 919
- Author
- paul
- Date
- 2009-02-17 15:14:27 -0600 (Tue, 17 Feb 2009)
Log Message
update words
Modified Paths
Diff
Modified: trunk/waffle-distribution/src/site/content/ruby/from-java-to-ruby.html (918 => 919)
--- trunk/waffle-distribution/src/site/content/ruby/from-java-to-ruby.html 2009-02-17 20:40:11 UTC (rev 918) +++ trunk/waffle-distribution/src/site/content/ruby/from-java-to-ruby.html 2009-02-17 21:14:27 UTC (rev 919) @@ -10,15 +10,12 @@ Here we examine Ruby-based controllers, and the invoking of Java functionality from them. Consider: <br /> <textarea class="java:nogutter:nocontrols" name="code"> -public class MyRegistrar extends RubyScriptedRegistrar { - public MyRegistrar(Registrar delegate) { - super(delegate); - } +public class MyComposer extends RubyWaffleWebappComposer { @Override - public void application() { - register("person_dao", PersonDAOImpl.class); - registerScript("person", "PersonController"); + public void composeApplication(MutablePicoContainer pico, ServletContext context) { + pico.addComponent("person_dao", PersonDAOImpl.class); + pico.addAdapter(RubyScriptComponentAdapter("person", "PersonController")); } }</textarea> A DAO, PersonDAOImpl, is registered under the name "person_dao" and we have one Ruby based controller available. Now its
To unsubscribe from this list please visit:
