Announcement Announcement Module
Collapse
No announcement yet.
dynamic form and to command binding Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • dynamic form and to command binding

    hi
    i'm working on an invoice adding form. invoice has a number of items which i don't know at form rendering time. user has "add" button which dynamically (through javascript without communication with server) add some fields representing new item to the form. my question is how I bind this dynamic form to command object. do i have to write my own property editor or is there a better/simplier solutions? any suggestions?
    thanks
    tomek

  • #2
    If you have a map on your form you can bind straight to that.

    Not sure of the syntax, maybe something like:

    Code:
    <input type="property&#91;nameA&#93;" value="whatever"/>
    <input type="property&#91;nameB&#93;" value="whatever"/>
    then you would do in your javacode:

    Code:
      String nameA = form.getProperty&#40;&#41;.get&#40;"nameA"&#41;;
      assertEquals&#40;"nameA", "whatever", nameA&#41;;

    Comment

    Working...
    X