• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Nesting question

Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I'm having a problem checking for a null nested property. Here's my situation:

<nested:nest property="newOldRate">
<nested:write property="formattedRate"/>
<nested:nest property="type">
<nested:write property="description"/>

Now, it is possible for the "type" property to be null. This results in an IllegalArgumentException when trying to access this property. I'd like to check to see if the "type" property is null, and handle it appropriately. I've attempted to use <nested:empty> to check the property for null and print a debug statement. The only place in my test that i access the property is in <nested:empty> , and i still get the IllegalArgumentException. Could someone provide an example of how to handle a null nested property?

Thanks in advance.

    Bookmark Topic Watch Topic
  • New Topic