Paul Mossman wrote: > Hi all, > > For XX-6875, I am trying to access the full list of available options > for a multi-enum setting from a Phone profile Velocity template. > > The challenge is with the type of Setting object being handed to > Velocity. For the multi-enum setting in question (Polycom > "voice/codecPref/OTHERS"), the object is neither a MultiEnumSetting nor > even an EnumSetting instance. It is a ConditionalSettingImpl instance. > > The full list of available options for an EnumSetting is stored in its > m_enums member. In order to access this content from Velocity, I'm > pretty sure it will need to be supplied with an EnumSetting instance. > > How can I supply Velocity an EnumSetting-typed object representing the > Polycom "voice/codecPref/OTHERS" multi-enum setting? >
ConditionalSetting is just an adapter. You still should be able to access its type. setting.type.enums Please balance what you want to do between Velocity and Java: having too much code in VTL is usually bad sign. If you need a non-trivial preprocessing do it in Java, write a separate unit test, and inject a value or a list of values in Velocity context. D. _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev sipXecs IP PBX -- http://www.sipfoundry.org/
