I'm binding a hashset to textarea in my Spring form.
The problem is that there is []-marks in the textarea. Anyone know how to get ridd off them?Code:<form:textarea path="set" />
Using e.g. List is not an option in my case.
I'm binding a hashset to textarea in my Spring form.
The problem is that there is []-marks in the textarea. Anyone know how to get ridd off them?Code:<form:textarea path="set" />
Using e.g. List is not an option in my case.
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![]()
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.
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!