2 Replies Latest reply on May 30, 2007 8:52 AM by Hannes Schulz

    problem with datamodel and a4j:commandLink

    Hannes Schulz Newbie


      i have the following problem width seam and a4j:
      on one page the user can enter some parameters in a form and submit them by a a4j:commandButton. An @Entity is created and added to a List. This list is in return outjected (as @Datamodel or via getList(), i tried both), and a dataTable is reRendered.

      everything works so far.

      I added a a4j:commandLink in each row which executes a delete action. deleting works fine as long as the list contains more than one object.

      the EL to delete the object looks like that:


      But whenever the list contains only one object and it gets deleted, i get the following exception:

      No ClassLoaders found for: de.axima.gmp.entity.EffectiveArea
      java.lang.ClassNotFoundException: No ClassLoaders found for: de.axima.gmp.entity.EffectiveArea
       at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

      for testing i changed the method and passed no paramter and simply deleted the object with index 0 out of the list:

      i can delete all objects without errors.

      Can someone give me a hint what the problem is or is it simply not supported to pass parameters in a a4j actionListener?

      if thats the case it would be great if somone could explain me in short how to realize it in a different way.

      thanks a lot and regards,

        • 1. Re: problem with datamodel and a4j:commandLink
          Alexander Smirnov Master

          This is classloading problem, due to different modules in enterprise application.
          You have EffectiveArea class in ejb jar, and it content not availible in a web application. At rendering time, Seam ( as usual, seam.jar is placed at EAR level, and have access to all modules ) parse EL expression and store type of parameter into ActionExpression instance. At a RESTORE_VIEW phase, web content can't load this class for de-serialisation of a component attribute.
          You can store row number as a parameter for a link, or use any simple class ( String, Integer etc ) for a expression parameter, like :


          • 2. Re: problem with datamodel and a4j:commandLink
            Hannes Schulz Newbie

            ok thanks for your reply.

            i understand your point. but it is strange since it works except in the case there' s only one instance in the List. So the ClassLoading Exception is only thrown in this case.