javacastingmvel

Casting string to integer in mvel


How to cast string to integer in MVEL

Props['MyInteger'] = java.lang.Integer.ParseInt('//xpath to some string')

Other java typing works in my code. for example

Props['MyArrayList'] = new java.util.ArrayList()


Solution

  • Solved: 'Props['MyInteger'] = (int)('//xpath to some string')'