Announcement Announcement Module
No announcement yet.
Binding Hashset to textarea, odd marking Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Binding Hashset to textarea, odd marking

    I'm binding a hashset to textarea in my Spring form.
    <form:textarea path="set" />
    The problem is that there is []-marks in the textarea. Anyone know how to get ridd off them?

    Using e.g. List is not an option in my case.

  • #2
    Hi jaanlai,

    Since few days, I try to bind a Set with a form. Could you tell me how did you do ?

    I have a class (call it ClassA) with a Set of an other class (call it ClassB). I would like to add/remove element from Set<ClassB> with a web form. But I can't


    • #3
      hashset binding

      hi andilo,

      what exception error do you encounter and when?

      they said that hashset cannot be bind because form binding uses index to know the order
      and since hashset do not have index, you cannot use it..

      however please let us know what error do you get.


      • #4
        binding set how?

        Hi jaanlai,

        can you please show us how did you bind Hashset?

        Do you have code doing iteration with use of varStatus for index?
        Do you have something like this below in your JSP where ?

        <c:forEach items="${myObject.myHashset}" varStatus="x">
        <form:input path="myHashset[${x.count - 1}].firstName" value="" />

        Please let us know if you are able to do this as it will help many.