Dynamically binding lists with Spring's form tag

后端 未结 1 1055
误落风尘
误落风尘 2021-02-03 11:48

I have a command object FaxForm and it holds a list of FaxStatus objects inside a faxStatusList property.

public class F         


        
1条回答
  •  无人及你
    2021-02-03 12:07

    Spring form tags has a checkboxes tag. You can use it as follows to do the binding automatically:

    
    

    The above snippet will display a list of checkbox items delimited with the br tag. Any changes made to the state of the checkboxes will be reflected appropriately in your FaxForm. faxStatusList object.

    0 讨论(0)
提交回复
热议问题