Oliver Gondža
unread,Jan 6, 2021, 5:54:05 AM1/6/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jenkin...@googlegroups.com
Hey, I am struggling with something supposedly simple. I need to get a
list of strings from user through both UI and JCasC.
In UI, I use `f:repeatable > f:textbox`, that unfortunately produces a
bit clumsy json structure of `"foo": [ {"name": "value 1"},
{"name": "value b"}, ... ]`. For databinding only, this is hidden and
can be read through a dummy data-bound class with field `String name` so
I can consume `List<Dummy>` and unwrap the strings manually. However,
this breaks the desired JCasC semantics of:
```
foo:
- one
- two
```
I ended up overriding `GlobalConfiguration#configure` to massage the
Json during form submission only to make it match the straightforward
type of `List<String>` that also works for JCasC. That, of course, is ugly.
Is there a more elegant way to read list of string inputs and have it
bound to `List<String>`?
Thanks!
--
oliver