1
panel(name:"Reference Name") {
        label("Select XML field for reference name:", constraints:gbc(gridx:0,gridy:0, anchor:WEST))
        comboBox(id:"refNameSelectBox",items:displayNameOptions, constraints:gbc(gridx:0,gridy:1,ipadx:20, anchor:WEST))
        label("Before:", constraints:gbc(gridx:0, gridy:2, anchor:WEST))
        textField(id:"refBeforeText", text:"taco", constraints:gbc(gridx:1,gridy:2,ipadx:30, gridwidth:REMAINDER, anchor:WEST))
        label("After:", constraints:gbc(gridx:0, gridy:3, anchor:WEST))
        textField(id:"refAfterText", text:bind(source:dispBeforeText, sourceProperty:'text'), constraints:gbc(gridx:1,gridy:3,ipadx:30,gridwidth:REMAINDER,anchor:WEST))
        checkBox(id:"refSpaceUnder",text:"Replace spaces with _", constraints:gbc(gridx:0,gridy:1,gridwidth:REMAINDER,anchor:WEST))
        checkBox(id:"refNoSpecials",text:"Remove Special Characters", constraints:gbc(gridx:0,gridy:2,gridwidth:REMAINDER,anchor:WEST))
    }

I'm trying to give the user a preview of some text manipulation. Right now, I have refAfterText bound to refBeforeText which just copies the text. I want to use those last two checkboxes to alter the text. Checking both boxes would change refBeforeText from "I have a Taco!" to "I_have_a_Taco" in refAfterText.

User001
  • 303
  • 1
  • 3
  • 5
  • What exactly is your question? – doelleri Sep 30 '15 at 21:29
  • How do I make it so that when I check refSpaceUnder, the text in refAfterText changes from "I have a taco" to "I_have_a_taco". – User001 Sep 30 '15 at 21:37
  • That's a bit too broad unless you can show what you've tried so far to accomplish what you want that hasn't worked. – doelleri Sep 30 '15 at 21:41
  • So.... what you're asking seems to be "How do I bind code to a user clicking a checkbox in this layout I've created"? You could add an "actionPerformed" attribute to the checkBox's that would do what you want. http://www.groovy-lang.org/mailing-lists.html#nabble-td360356 I don't see any Binding going on, so you may be further from knowing how to do this than you think. – billjamesdev Sep 30 '15 at 21:47

0 Answers0