Provides convenience for accessing Shared Properties as implemented by ACS Commons Shared Component Properties.
How to Use
The feature is very similar in usage to the standard ValueMapValue annotation.
The feature is very similar in usage to the standard ValueMapValue annotation.
Example
@Model(adaptables = {SlingHttpServletRequest.class, Resource.class})
public final class SharedComponentPropsExampleModel {
@SharedValueMapValue(type = SharedComponentProperties.ValueTypes.SHARED)
private String sharedProp;
@SharedValueMapValue(type = SharedComponentProperties.ValueTypes.GLOBAL)
private String globalProp;
// type will be MERGED by default
@SharedValueMapValue
private String mergedProp;
}
@Model(adaptables = {SlingHttpServletRequest.class, Resource.class})
public final class SharedComponentPropsExampleModel {
@SharedValueMapValue(type = SharedComponentProperties.ValueTypes.SHARED)
private String sharedProp;
@SharedValueMapValue(type = SharedComponentProperties.ValueTypes.GLOBAL)
private String globalProp;
// type will be MERGED by default
@SharedValueMapValue
private String mergedProp;
}
No comments:
Post a Comment
If you have any doubts or questions, please let us know.