Dashboard > GreenPepper Examples > Home > Object-Graph Navigation Language (OGNL)
  GreenPepper Examples Log In View a printable version of the current page.  
  Object-Graph Navigation Language (OGNL)
Added by Louis Thibault, last edited by Louis Thibault on Jan 22, 2007  (view change)
Labels: 
(None)

 GreenPepperAnonymous access is denied. You must log in to use GreenPepper.

GreenPepper supports OGNL expressions. Here are some examples, using the Calculator system:

Begin Info
< , <= , > , >= , and , or GreenPepper supports these simple mathematical expressions. Use the question mark to specify the position of the value returned by the system. For example, if the expected value should be greater than 15, you will write "? > 15" in the cell.
+ , - , / , * GreenPepper performs simple operations as a resulting expression. To specify you want to evaluate those operations prior to the comparison, insert an equal sign at the beginning of the operation (ex: =4+1-3).
End Info
Import
com.greenpepper.samples.application.calculator
rule for calculator
x y sum? product? quotient?
6 2 8 12 3
7 0 7 0 error
40 50 90 ? > 100  
4 -5 ? <= 0 -20 ? <= 0
3 3 ? < 1 or ? > 4 ? >= 9 and ? < 12 "1"
4 2 =4+2-0 =2*4 =4/2

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.4.3 Build:#705 Mar 21, 2007) - Bug/feature request - Contact Administrators