In my application I have an action bean with a following field.
@In(create = true) private SearchPattern searchPattern;
Normally I'd like a new empty searchPattern to be created and then filled by user. But sometimes I want a specific searchPattern (with some fields pre-filled) to be used instead of an empty one.
How should I implement my action bean to achieve this? Any help would be greatly appreciated:)
Use @Factory and then in the factory method you can put your logic that creates new SearchPattern and sometimes fills it with the initial values.
-Pawel