Announcement Announcement Module
No announcement yet.
How to bind a collection of custom objects in WebFlow 2.2.1 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to bind a collection of custom objects in WebFlow 2.2.1

    I am trying to bind a collection of objects in a spring web flow form. Each object in the collection has fields that require a custom type converter.

    Can this be done? How do I configure this?

    Here is the basic idea of the code so far:

    <view-state id="refund" view="refundAction" model="refundModel">
            <var name="refundModel" class="xxxx.RefundModel" />
                <binding property="refunds" />            
    public class RefundModel implements Serializable{
        private List<RefundDTO> refunds;
        public RefundModel(){
            refunds = ListUtils.lazyList(new ArrayList<RefundDTO>(), FactoryUtils.instantiateFactory(RefundDTO.class));
        public List<RefundDTO> getRefunds() {
            return refunds;
        public void setRefunds(List<RefundDTO> refunds) {
            this.refunds = refunds;
    public class RefundDTO implements Serializable{
        //requires a custom converter	
        private SoTransactionDO payment;
        //requires a custom converter	
        private Money amount;
        private String address1;
        private String address2;
        private String city;
        private String state_province;
        private String zip_plus_4;
        private String country;
          //requires a custom converter	
        private Address userAddress;
        //requires a custom converter	
        private Money maxAmount;
        public RefundDTO(){}

  • #2
    The problem was that this was not working with spring-webmvc < 3.02. I updated my spring dependency to 3.03 and it works as expected