Announcement Announcement Module
Collapse
No announcement yet.
Dynamic fields on JSP / in java bean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      Did you get a way around with this ?

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


      thanks

      Comment

      Working...
      X