Attribute value from Choice List



In many instances we have come up across a common issue where we need to get the actual attribute from a drop down but we used to get the index value. As a workaround we wrote backing bean methods to get the attribute value from View Object.
So now just keep that workaround aside and try with this new approach.
An expression like #{bindings.JobId.inputValue} would return the internal list index number when JobId was a list binding(LOV of choice list type). To get the actual JobId attribute value, you needed to use #{bindings.JobId.attributeValue} .The #{bindings.JobId.attributeValue} expression will return the attribute value corresponding with the selected index in the choice list.

No comments:

Post a Comment