5 Replies Latest reply on Jan 30, 2007 9:14 AM by alesj

    property of type org.w3c.dom.Element

    kagey

      Hey All,

      When i have a bean that has a property/attribute of type Element, if i include the raw xml under the < property...> ... < /property> tags the mc thinks my Element xml is part of the bean-deployer_1_0.xsd and errors out

      Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {urn:jboss:bean-deployer:2.0}config not found as a child of {urn:jboss:bean-deployer:2.0}property
      
      [If the property element looked something like this:]
      <property name="fakeProp">
       <config>
       ...
       </config>
      </property>
      


      Any ideas of how i can specify an Element for a property?

      Thanks

        • 1. Re: property of type org.w3c.dom.Element
          alesj

          What about if you try?

          <property name="fakeProp">
           <value>
           <config>
           ...
           </config>
           <value>
          </property>


          • 2. Re: property of type org.w3c.dom.Element
            kagey

            Caused by: org.jboss.xb.binding.JBossXBRuntimeException:
            {urn:jboss:bean-deployer:2.0}plainValueType type of element
            {urn:jboss:bean-deployer:2.0}value should be complex and contain
            {urn:jboss:bean-deployer:2.0}config as a child element.

            • 3. Re: property of type org.w3c.dom.Element
              alesj

              What if you have one supplying bean that would register PropertyEditor before (via PropertyEditorManager).

              And currently you use [config], and write PE accordingly to this.

              Just an idea .... (or small tmp hack :-)

              • 4. Re: property of type org.w3c.dom.Element
                alesj

                What about if you try something like this:

                 <parameter><![CDATA[
                 <aop>
                 <aspect name="mainDeployer" class="org.jboss.profileservice.aop.MainDeployerAspect"/>
                 <bind pointcut="execution(* $instanceof{org.jboss.deployers.spi.deployment.MainDeployer}->process(..))">
                 <advice name="process" aspect="mainDeployer"/>
                 </bind>
                 <aspect name="persist" class="org.jboss.profileservice.aop.PersistAspect"/>
                 <bind pointcut="execution(* $instanceof{org.jboss.managed.api.ManagedProperty}->setValue(..))">
                 <advice name="setValue" aspect="persist"/>
                 </bind>
                 </aop>]]>
                 </parameter>
                


                with '<![CDATA['.

                • 5. Re: property of type org.w3c.dom.Element
                  alesj

                  This is working.

                  I added tests to confirm it:
                  - org.jboss.test.kernel.config.test.ElementTestCase
                  - org.jboss.test.kernel.config.test.ElementXMLTestCase