it seems when you build a model driven LOV and disply it on an output page you can use the following EL expression:
#{!empty bindings.DepartmentId.selectedValue? bindings.DepartmentId.selectedValue.attributeValues[1]:'no choice selected'}
to display any of the attributes of the view rows used to create the LOV.
please pay attention to the use of <<empty bindings.DepartmentId.selectedValue>> , this is used since if no choice is made(empty list item is the currently selected item) then <<bindings.DepartmentId.selectedValue>> will return an empty string, so if you don't have this test , then you might get an exception complaining that the String class does not have a property named attributeValues.
the above expression gets the second attribute of the view row used to define the model driven LOV on the departmentId attribute.
I cannot think of any use for such functionality right now, but hopefully it can be of use to anyone of the reader of this blog.
No comments:
Post a Comment