set Simple view in document library

Showing results for 
Search instead for 
Did you mean: 
Active Member

set Simple view in document library

Hi Team,

I want to set Simple View as by default view in document library on site creation.

For that i have made changes in documentlist.js like below:
viewRendererName: "simple",    but that didn't worked.

Can anyone please suggest what are the other changes are required ?


1 Reply
Senior Member II

Re: set Simple view in document library

Hi Hardik,

You need to set "defaultViewId" as simple which is property of "defaultViewConfig" aspect.

So you can create policy which capture site creation event and in that policy you can set default view.




Map<QName, Serializable> viewProp = new HashMap<QName, Serializable>();
viewProp.put(ApplicationModel.PROP_DEFAULT_VIEW_ID, "simple");
nodeService.addAspect(folderNodeRef, ApplicationModel.ASPECT_DEFAULT_VIEW_CONFIG, viewProp);
Thanks & Regard,