2 Replies Latest reply on Jun 27, 2006 1:23 PM by Marcin Niebudek

    I got a mind boggler for all of you......What do you do in t

    Daniel Hinojosa Master

      Lets say I have the following:

      Person Relationship Person
      ----------- ------------- ------------
      name destination ---> relation
      relation <---> source name
      type


      So the idea for this is so that I can have:

      Person a = new Person();
      a.setName("John Adams");

      Person b = new Person();
      b.setName("John Quincy Adams");

      Relationship r = new Relationship();
      r.setSource(a);
      r.setDestination(b);
      r.setType("Father");

      So that's the idea, now in a web based mindset, in order to work with this I need a finder so I can search for a record of the person, once I make my selection person will be outjected as "person".

      @Name(value="findPersonByName")
      public class FindPersonByName {
      @DataModelSelection
      private Person person;

      @DataModel
      private List persons();

      }

      So as I am editing, I have a drop down lookup, to look for people to relate to my active person ("person") that I am editing. That means I want to use another object of findPersonByName but this time outject to lookupPerson instead of person. The problem is I don't want to violate the DRY principal on this and create another class. Is there is a solution to this?