0 Replies Latest reply on Apr 3, 2008 2:31 PM by Lee Theobald

    Backing Forms To Multiple Home Objects

    Lee Theobald Newbie

      Hi,


      I'm trying to create an input form for a part of my application.  I have three classes:



      • Field.  An abstract class containing shared elements for the below two classes.

      • DataField. Extends Field

      • TypeField. Extends Field



      Now what I want on my input form is input boxes for the various shared elements.  I'd then like radio buttons where you can select if the field is a DataField or a TypeField.  That would then show the appropriate additional fields for DataField or TypeField.


      Now that's easy enough to do.  But where I'm confused is what to bind them too.  Previously I'd have using something like:


      #{entityHome.instance.field



      But I can't see this working this time as what would EntityHome extend?  Whatever it extends, my instance would not have all the fields it requires.


      So far I've considered creating a wrapper that contains variables for all fields in Field, DataField and TypeField.  Then on persisting, I can calculate the right object type to persist as.  Is this the right way to go or am I missing something?  My JSF and Seam fundamentals do have a few gaps in them so sorry if this is something quite basic.


      Lee,