Results 1 to 4 of 4

Thread: Binding Hashset to textarea, odd marking

  1. #1

    Default Binding Hashset to textarea, odd marking

    I'm binding a hashset to textarea in my Spring form.
    Code:
    <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. #2
    Join Date
    Jul 2011
    Posts
    11

    Default

    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. #3

    Default 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. #4

    Default 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="" />
    </c:forEach>

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •