Announcement Announcement Module
Collapse
No announcement yet.
TableFormBuilder bind a component 2 times. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • TableFormBuilder bind a component 2 times.

    Code:
        public JComponent[] addTextArea(String propertyName, String attributes) {
            return addBinding(getBinding(propertyName, getTextArea(propertyName)), attributes, getLabelAttributes()
                    + " valign=top");
        }
    in AbstractFormBuilder:
    Code:
        protected JComponent getTextArea(String propertyName) {
            JTextArea textArea = GuiStandardUtils.createStandardTextArea(5, 40);
            JComponent component = new JScrollPane(getBindingFactory().bindControl(textArea, propertyName).getControl());
            return component;
        }
    This is the first time JTextArea is binded.

    Code:
        protected Binding getBinding(String propertyName, JComponent component) {
            return getBindingFactory().bindControl(component, propertyName);
        }
    This is the second time JTextArea is binded.

    And, the second binded throw a exception.

    Code:
    java.lang.IllegalArgumentException: Control must be an instance of JTextComponent.
    	at org.springframework.util.Assert.isTrue(Assert.java:64)
    	at org.springframework.richclient.form.binding.swing.TextComponentBinder.doBind(TextComponentBinder.java:38)
    	at org.springframework.richclient.form.binding.support.AbstractBinder.bind(AbstractBinder.java:86)
    	at org.springframework.richclient.form.binding.support.AbstractBindingFactory.bindControl(AbstractBindingFactory.java:84)
    	at org.springframework.richclient.form.binding.support.AbstractBindingFactory.bindControl(AbstractBindingFactory.java:62)
    	at org.springframework.richclient.form.builder.AbstractFormBuilder.getBinding(AbstractFormBuilder.java:77)
    	at org.springframework.richclient.form.builder.TableFormBuilder.addTextArea(TableFormBuilder.java:95)
    	at org.springframework.richclient.form.builder.TableFormBuilder.addTextArea(TableFormBuilder.java:91)

  • #2
    Fixed.

    Thanks

    Comment


    • #3
      Originally posted by oliverhutchison
      Fixed.

      Thanks
      Thank you.
      but "addSelector" method have a same bug.

      Comment

      Working...
      X