Results 1 to 3 of 3

Thread: Dynamic fields on JSP / in java bean

  1. #1

    Default Dynamic fields on JSP / in java bean

    Hi there

    I am not sure exactly what sub-group this question best fits under...

    Is there a "recommended" way of implementing dynamic fields?

    It is very easy to map, via xml configuration, fields on a JSP to instance variables (getter/setter methods) in a Java bean. But what if I want "dynamic" fields on my JSP - that is, the user can add a new text field or something, which can be submitted in the form to my controller. How could this dynamic field be mapped to my java bean?

    Thanks,
    Peter

  2. #2
    Join Date
    Aug 2004
    Location
    Toulouse, France
    Posts
    148

    Default

    Since the bean can not be augmented on the fly with property (excepted with aop), I would suggest to use a Map for those fields (eventually nested if you want complex fields) or eventually to use the BeanWrapper facility to work with a bean in a similar way than a simple map.

    HTH

    Olivier

  3. #3
    Join Date
    Mar 2007
    Posts
    22

    Default Did you get a way around with this ?

    Hi,
    I am facing the same problem now. Did you get any workaround with this ?


    thanks

Similar Threads

  1. Order of Bean definitions matters?
    By cfuser in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:29 AM
  2. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. could not satisfy dependencies
    By springuser in forum Container
    Replies: 4
    Last Post: Apr 26th, 2005, 01:15 PM
  5. Replies: 1
    Last Post: Apr 25th, 2005, 07:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •