Hi Team,
I am creating a component extending the Essentialslistpickercomponent. But i want to show only 3 documents in the properties picker in the experience manager.
I tired keeping parametername and values for only 3 documents in cms and changed pagesize to 3.
Please suggest a method to do the same
Hey @krajendran, if you are extending EssentialsListPickerComponent
, your above described method is how you would restrict the results to 3 documents.
Is this not working for your use case?
Could you elaborate further?
public interface CustomComponentInfo extends EssentialsListPickerComponentInfo {
@Parameter(name = “category”, displayName = “Category”, defaultValue = “news”)
@DropDownList(value = {“Newsroom”, “Sustainability”})
String getCategory();
}
@ParametersInfo(
type = CustomComponentInfo.class
)
public class CustomComponent extends EssentialsListPickerComponent {
public CustomComponent()
{
}
public void doBeforeRender(HstRequest request, HstResponse response) {
super.doBeforeRender(request, response);
CustomComponentInfoparamInfo = (CustomComponentInfo)this.getComponentParametersInfo(request);
request.setAttribute("cparam", paramInfo);
}
}
this is my component and componentinfo custom class and the properties shows 10 documents along with my param value category but i need only 3 document picker.
- i tried changing pagesize in property to 3
- in console i deleted the paramatervalues and names of documents4-10
- i even added override methods for three documents
but i could see getdocuments in essentialslistpickercomponent adding 10 document beans
is there any way to restrict it to 3