Dashboard > WebWork > ... > Upgrading from 1.4 > JSP Expression Language Comparison with WebWork 1.x
  WebWork Log In View a printable version of the current page.  
  JSP Expression Language Comparison with WebWork 1.x
Added by Jason Carreira, last edited by Patrick Lightbody on Apr 12, 2005  (view change)
Labels: 
(None)

Situation Previous (WW-1.4) Current (WW-2.1)
Referring to an object in the PageContext scope @itemIdOrName #attr['itemIdOrName']
Referring to an object in the Request scope itemIdOrName Same, but use #request['itemIdOrName'] if nested in an iteration.
Referring to an object in the Session scope @itemIdOrName #session['itemIdOrName']
Referring to an object in the Application scope @itemIdOrName #application['itemIdOrName']
Property Setters foo/bar translates to getFoo().setBar() foo.bar translates to getFoo().setBar()
Property Getters foo/bar translates to getFoo().getBar() foo.bar translates to getFoo().getBar()
Boolean/boolean Property Getters foo/bar translates to getFoo().getBar() if bar is java.lang.Boolean, if primitive bar translates to getFoo().isBar() Same, except uses dot notation instead of a slash (i.e. foo.bar)
Collections as Properties N/A Collections (including arrays) are similar to other objects, except they allow indexing: foo.bar[indexOrKeyName] translates to getFoo().getBar().get(indexOrKeyName)
curly braces - {}, evaluates contents of braces first, and use the result as the property to then evaluate. <webwork:property value="{'name'}"/> translates to getName() on the curent object. No longer used.
Reference a static variable @com.fully.qualified.class.name.TheActualClass@STATIC_ATTRIBUTE_NAME Still in use.

Originally written by Jay Bose and sent to the mailing list

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.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators