Announcement Announcement Module
Collapse
No announcement yet.
Bind properties in List Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bind properties in List

    Hi All,

    about 3 or 4 month ago i had written a little Testclass for binding properies in Lists.

    A little example:
    Code:
    class Product {
      List descriptions;
      ...
    }
    
    class ProductsDescription {
      int languageId
      String description;
      ....
    }

    Now in my Testclass i bound the property description in a Form like this:


    Code:
    class MyForm extends AbstractForm {
      public JComponent createFormControl() {
        TableFormBuilder formBuilder = new TableFormBuilder(getFormModel());
        formBuilder.add("descriptions[0].description");
      }
    }

    Now, i have tried this code with the newest spring rich version and it don't works anymore!?

    I there another way to bind such scenario?
    Thanks!

    Claudio

  • #2
    Hi all,

    i went a little deeper in the code an saw that the class org.springframework.binding.support.DefaultBeanMet adata
    seems to have this ability.

    Code:
        /**
         * Determine the first respectively last nested property separator in the
         * given property path, ignoring dots in keys (like "map[my.key]").
         * @param propertyPath the property path to check
         * @param last whether to return the last separator rather than the first
         * @return the index of the nested property separator, or -1 if none
         */
        private int getNestedPropertySeparatorIndex(String propertyPath, boolean last) {
    ...
    But i still can't figure out how to use this within the SwingFormModel class? Anyone?

    Thanks!

    Claudio

    Comment


    • #3
      Hmm.. I am opening up a JIRA issue for this, and should start work on it after 1/13. Thanks for the report Claudio.

      Comment


      • #4
        Is there a workaround for this problem?

        Comment


        • #5
          Hi,

          i applied the patches from JIRA:
          http://opensource.atlassian.com/proj.../browse/RCP-68

          Seems to work.

          siu
          Claudio

          Comment

          Working...
          X