/** * Specifies whether {@link Iterable}-s (not to be confused with {@link Iterator}-s) that don't implement any other * recognized Java interfaces (most notably {@link Collection}) will be recognized as listable objects * ({@link TemplateCollectionModel}-s), or they will be just seen as generic objects (JavaBean-s). Defaults to * {@code false} for backward compatibility, but in new projects you should set this to {@code true}. Before setting * this to {@code true} in older projects, check if you have called {@code myIterable.iterator()} directly from any * templates, because the Java API is only exposed to the templates if the {@link Iterable} is wrapped as generic * object. * * @since 2.3.25 */ public void setIterableSupport(boolean iterableSupport) { checkModifiable(); this.iterableSupport = iterableSupport; }
/** * Specifies whether non-{@link List} {@link Collection}-s (like {@link Set}-s) must be wrapped by pre-fetching into * a {@link SimpleSequence}. The modern approach is wrapping into a {@link DefaultNonListCollectionAdapter}. This * setting only has effect when {@link #getUseAdaptersForContainers()} is also {@code true}, as otherwise * {@link SimpleSequence} will be used regardless of this. In new projects you should set this to {@code false}. At * least before {@code incompatible_improvements} 2.4.0 it defaults to {@code true}, because of backward * compatibility concerns: with {@link TemplateSequenceModel} templates could access the items by index if they * wanted to (the index values were defined by the iteration order). This was not very useful, or was even * confusing, and it conflicts with the adapter approach. * * @see #setUseAdaptersForContainers(boolean) * * @since 2.3.22 */ public void setForceLegacyNonListCollections(boolean forceLegacyNonListCollections) { checkModifiable(); this.forceLegacyNonListCollections = forceLegacyNonListCollections; }
checkModifiable(); this.useAdaptersForContainers = useAdaptersForContainers;
/** * Specifies whether {@link Iterable}-s (not to be confused with {@link Iterator}-s) that don't implement any other * recognized Java interfaces (most notably {@link Collection}) will be recognized as listable objects * ({@link TemplateCollectionModel}-s), or they will be just seen as generic objects (JavaBean-s). Defaults to * {@code false} for backward compatibility, but in new projects you should set this to {@code true}. Before setting * this to {@code true} in older projects, check if you have called {@code myIterable.iterator()} directly from any * templates, because the Java API is only exposed to the templates if the {@link Iterable} is wrapped as generic * object. * * @since 2.3.25 */ public void setIterableSupport(boolean iterableSupport) { checkModifiable(); this.iterableSupport = iterableSupport; }
/** * Specifies whether {@link Iterable}-s (not to be confused with {@link Iterator}-s) that don't implement any other * recognized Java interfaces (most notably {@link Collection}) will be recognized as listable objects * ({@link TemplateCollectionModel}-s), or they will be just seen as generic objects (JavaBean-s). Defaults to * {@code false} for backward compatibility, but in new projects you should set this to {@code true}. Before setting * this to {@code true} in older projects, check if you have called {@code myIterable.iterator()} directly from any * templates, because the Java API is only exposed to the templates if the {@link Iterable} is wrapped as generic * object. * * @since 2.3.25 */ public void setIterableSupport(boolean iterableSupport) { checkModifiable(); this.iterableSupport = iterableSupport; }
/** * Specifies whether non-{@link List} {@link Collection}-s (like {@link Set}-s) must be wrapped by pre-fetching into * a {@link SimpleSequence}. The modern approach is wrapping into a {@link DefaultNonListCollectionAdapter}. This * setting only has effect when {@link #getUseAdaptersForContainers()} is also {@code true}, as otherwise * {@link SimpleSequence} will be used regardless of this. In new projects you should set this to {@code false}. At * least before {@code incompatible_improvements} 2.4.0 it defaults to {@code true}, because of backward * compatibility concerns: with {@link TemplateSequenceModel} templates could access the items by index if they * wanted to (the index values were defined by the iteration order). This was not very useful, or was even * confusing, and it conflicts with the adapter approach. * * @see #setUseAdaptersForContainers(boolean) * * @since 2.3.22 */ public void setForceLegacyNonListCollections(boolean forceLegacyNonListCollections) { checkModifiable(); this.forceLegacyNonListCollections = forceLegacyNonListCollections; }
/** * Specifies whether non-{@link List} {@link Collection}-s (like {@link Set}-s) must be wrapped by pre-fetching into * a {@link SimpleSequence}. The modern approach is wrapping into a {@link DefaultNonListCollectionAdapter}. This * setting only has effect when {@link #getUseAdaptersForContainers()} is also {@code true}, as otherwise * {@link SimpleSequence} will be used regardless of this. In new projects you should set this to {@code false}. At * least before {@code incompatible_improvements} 2.4.0 it defaults to {@code true}, because of backward * compatibility concerns: with {@link TemplateSequenceModel} templates could access the items by index if they * wanted to (the index values were defined by the iteration order). This was not very useful, or was even * confusing, and it conflicts with the adapter approach. * * @see #setUseAdaptersForContainers(boolean) * * @since 2.3.22 */ public void setForceLegacyNonListCollections(boolean forceLegacyNonListCollections) { checkModifiable(); this.forceLegacyNonListCollections = forceLegacyNonListCollections; }
checkModifiable(); this.useAdaptersForContainers = useAdaptersForContainers;
checkModifiable(); this.useAdaptersForContainers = useAdaptersForContainers;