Author: buildbot Date: Tue Jun 25 09:18:47 2013 New Revision: 867353 Log: Production update by buildbot for camel
Modified: websites/production/camel/content/book-in-one-page.html websites/production/camel/content/book-languages-appendix.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2120-release.html websites/production/camel/content/simple.html Modified: websites/production/camel/content/book-in-one-page.html ============================================================================== --- websites/production/camel/content/book-in-one-page.html (original) +++ websites/production/camel/content/book-in-one-page.html Tue Jun 25 09:18:47 2013 @@ -10079,6 +10079,9 @@ From <b>Camel 2.9</b> onwards you can ne <h3><a shape="rect" name="BookInOnePage-OGNLexpressionsupport"></a>OGNL expression support</h3> <p><b>Available as of Camel 2.3</b></p> +<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Camel's OGNL support is for invoking methods only. You cannot access fields.<br clear="none"> +From <b>Camel 2.11.1</b> onwards we added special support for accessing the length field of Java arrays.</td></tr></table></div> + <p>The <a shape="rect" href="simple.html" title="Simple">Simple</a> and <a shape="rect" href="bean.html" title="Bean">Bean</a> language now supports a Camel OGNL notation for invoking beans in a chain like fashion.<br clear="none"> Suppose the Message IN body contains a POJO which has a <tt>getAddress()</tt> method.</p> @@ -10168,6 +10171,23 @@ simple("${body.address.lines[last-2]}") ]]></script> </div></div> +<p>And you can call the size method on the list with</p> +<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ +simple("${body.address.lines.size}") +]]></script> +</div></div> + +<p>From <b>Camel 2.11.1</b> onwards we added support for the length field for Java arrays as well, eg:</p> +<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ +String[] lines = new String[]{"foo", "bar", "cat"}; +exchange.getIn().setBody(lines); + +simple("There are ${body.length} lines") +]]></script> +</div></div> + <p>And yes you can combine this with the operator support as shown below:</p> <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent"> <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[