1 Reply Latest reply on Oct 11, 2007 5:11 PM by aloubyansky

    Issue with DescriptionGroup emement order and older descript

    starksm64

      The org.jboss.test.metadata.web.WebApp23UnitTestCase.testVersion is failing in the jboss-metadata project due to how the javaee description group is a seqence of description, display-names, icons:

      @JBossXmlModelGroup(name="descriptionGroup", propOrder={"descriptions", "displayNames", "icons"})
      public class DescriptionGroupMetaData implements Serializable
      


      The issue is that when a web.xml that conforms to a web-app_2_3.dtd, which has a different order for these:
      <!ELEMENT web-app (icon?, display-name?, description?, ...>
      


      3 different description groups end up being created, with each one only having a single property set. What is the best way to a override this behavior in the org.jboss.metadata.web.spec.Web23MetaData?

      Note that this is a problem for a 2.5 web.xml as well since the WebAppMetaData base class only declares a single valued DescriptionGroupMetaData property. Only the last set of in order elements shows up on the

      One way to fix this would be to make this a List of DescriptionGroupMetaData, and have the simple getIcon()/getDescription()/getDisplayName() accessors look over all DescriptionGroupMetaData for the first non-null result.

      To keep a single DescriptionGroupMetaData, it needs to be declared as a sequence of choices of the icon, display-name, description elements.