spring - Thymeleaf: How to work with a AbstractIterationElementProcessor class -
anyone work abstractiterationelementprocessor derived class in spring project uses thymeleaf? trying use implement kind of tag:
<form:form ...> ... </form:form>
the element iterated based on list should generated inside processor class, based on array list of field of class model class passed view (named command
).
in each iteration, 1 element of list processed switch-like structure inside tag , inner element chosen (form:input
, form:select
, etc).
right now, have code:
public class formprocessor extends abstractiterationelementprocessor { public formprocessor() { super("form"); } @override public void processclonedhostiterationelement(arguments arguments, element iteratedchild) { // } @override public string getiteratedelementname(arguments arguments, element element) { return "form"; } @override public boolean removehostiterationelement(arguments arguments, element element) { return false; } @override public abstractiterationelementprocessor.iterationspec getiterationspec(arguments arguments, element element) { return null; } @override public int getprecedence() { return 1000; } }
but have trouble understand implement in each method. can give hint on how that?
Comments
Post a Comment