Announcement Announcement Module
No announcement yet.
custom binding list Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • custom binding list

    I'm wondering if I can use custom <binder> when I'm binding a collection.
    The code below is illustrating what mean:

        <view-state id="addMessages" model="messagesBean">
                <binding property="messages"/>???
                <binding property="someDate" converter="shortDate" required="true"/>
                <binding property="file"/>
            <transition on="proceed" to="reviewMessages">
                <evaluate expression="messagesBean.proceedMessages()"/>
            <transition on="cancel" to="cancel" bind="false"/>
    public class SomeObject implements Serializable {
        private transient MultipartFile file;
        private Date someDate;
        private List<String> messages =
                LazyList.decorate(new ArrayList<String>(),
                        new InstantiateFactory(String.class));
        public Date getSomeDate() {
            return someDate;
        public void setSomeDate(Date someDate) {
            this.someDate = someDate;
        public void setFile(MultipartFile file) {
            this.file = file;
        public MultipartFile getFile() {
            return file;
        public List<String> getMessages() {
            return messages;
        public void setMessages(List<String> messages) {
            this.messages = messages;
    The thing is when I want to have a converter for some property (someDate property in my code) and bind some objects collection at the same time (messages property in my code), binder for the ArrayList<String> is not working. So, what I would like to learn is how can I assign a converter for the date field when my form contains a collection of objects. Unfortunately, I was faild to find an answer in the documentation and at the forum. Please, point me to a code sample or instruction in the documentation or even make me known if it is possible to do and if it is possible what I have to change in my code.

    I wanted to note that if I remove <binder> section from the flow configuration file and use String instead of Date type for someDate property in my SomeObject class everything is working fine.