Results 1 to 5 of 5

Thread: Bind properties in List

  1. #1
    Join Date
    Aug 2004
    Location
    Switzerland
    Posts
    32

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Switzerland
    Posts
    32

    Default

    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

  3. #3
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    Hmm.. I am opening up a JIRA issue for this, and should start work on it after 1/13. Thanks for the report Claudio.
    Keith Donald
    Core Spring Development Team

  4. #4
    Join Date
    Jan 2005
    Posts
    6

    Default

    Is there a workaround for this problem?

  5. #5
    Join Date
    Aug 2004
    Location
    Switzerland
    Posts
    32

    Default

    Hi,

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

    Seems to work.

    siu
    Claudio

Similar Threads

  1. FlowExecutionStorage in a DB
    By cacho in forum Web Flow
    Replies: 7
    Last Post: Oct 19th, 2009, 03:36 PM
  2. Odd behaviour when injecting TransactionTemplate
    By damon311 in forum Container
    Replies: 3
    Last Post: Jul 23rd, 2005, 11:21 AM
  3. bind problems: list, select
    By pir8ped in forum Web
    Replies: 2
    Last Post: Jun 28th, 2005, 12:51 AM
  4. how do I bind a list of BigDecimal objects
    By trekmbikes in forum Web
    Replies: 0
    Last Post: Jun 11th, 2005, 08:05 PM
  5. Replies: 1
    Last Post: Mar 9th, 2005, 03:52 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
  •