Hi,
 
I am having a small challenge with the generated Enums from Xmlbeans.
 
There is currently no way on the generated Enum to get the list of
supported string values, nor on the Enums inner public table. 
 
Now it is possible to iterate using a while loop using an int counter
until I get a null, except I am using Velocity to do the loop and there
is no for or while loops just foreach. In order to use foreach I would
need a Collection from the Enum. 
 
The reason for this is to be able to create a drop down list in HTML
with it populated with the supported Enum string values.
 
Anyone have any idea other than:-
 

1.      Modifying Velocity's VTL to support a for loop. 
2.      Modifying my Xmlbeans source to return a Collection. 
3.      Preprocessing in the JAVA before passing to the template engine.

I would however, ask that in the longer term that it is possible to
expose a Collection of the enum strings via the Enum classes public
interface.
 
Many Thanks
 
Don

Reply via email to