There is still a small bug left:
It works fine if I'm setting a single entity: (I'm always making a clone of the object in the loop with s.clone(), so I keep the original settings)
@{www.WebSearch.index(s.clone().setPage(0))}
However If i'm adding somthing to a collection (eg HashSet<String> collection)), e.g in a loop, play will not use my cloned instance!
@{www.WebSearch.index(s.clone().addHighlighted(key).setPage(0))}
At each iteration of the loop, s will contain all previous keys I added to the loop!
After each iteration I have to manually remove each key I added %{ s = s.removeHighlighted(key); }%
The clone function is below.
public SearchSettings clone() { try { return (SearchSettings) super.clone(); } catch (CloneNotSupportedException e) { return null; } }
There is still a small bug left:
It works fine if I'm setting a single entity: (I'm always making a clone of the object in the loop with s.clone(), so I keep the original settings)
@{www.WebSearch .index( s.clone( ).setPage( 0))}
However If i'm adding somthing to a collection (eg HashSet<String> collection)), e.g in a loop, play will not use my cloned instance!
@{www.WebSearch .index( s.clone( ).addHighlighte d(key). setPage( 0))}
At each iteration of the loop, s will contain all previous keys I added to the loop!
After each iteration I have to manually remove each key I added hted(key) ;
%{
s = s.removeHighlig
}%
The clone function is below.
public SearchSettings clone() { tedException e) {
try {
return (SearchSettings) super.clone();
} catch (CloneNotSuppor
return null;
}
}