Adding custom data list to alsfresco share - repository

i am a newbie in Alfresco. I have created custom datalist models, context model and also configured the share config xml file and everything is working well. How ever the datalist is not showing when i log in alfresco. What should i do then.

You should be able to create one of your custom datalists on the page :
http://"myhostandport"/share/page/site/"mysite"/data-lists
Does it show up there?
If not:
-Did you declare your datalist content model as a bean with parent="dictionaryModelBootstrap"?
-Does your content model type extend dl:dataListItem
-You can find all the datalists of your type with this kind of query: #dl\:dataListItemType:'myprefix\:mydatalisttype'

Related

It's possible to have CKEditor 5 getData() return custom attributes?

I've succesfully managed implementing custom attributes creating upcasts and downcasts converters; all seems to work but I'm now blocked on how to get the actual data back from the editor; if I use:
editor.getData()
I got the html tag (an <img> one) without the custom attributes while in the CKEditor Inspector I can see the attributes in both the model and the view.
How I can retrieve the data with the custom attributes?

Sensenet: Pagination on Document Library

It is possible to define pagination on document library?
I have a document library with more that 10000 documents... when I open the library occurs an timeout.
Actually SenseNet already does this! They just don't deliver it in the standard list control. If you open up the PRC and navigate to /Root/IMS/BuiltIn/Portal you'll see a list control with paging. The code can be found at /Root/Global/renderers/UserExploreGrid.ascx as User Control portlet. You can copy the code and change it to meet your needs.
Our company prefers to create User Control portlets and use Datatables with calls to the SenseNet OData API using skip and top to deliver pages.
Finally, given that SenseNet Content is stored as a tree structure (in SQL!), you can move the Content after creation so that data is organized hierarchically. A common solution is to take the first letter of the DisplayName and create a sub-folder from that letter, thereby reducing the number of items at a single node.
Here's what the paging looks like:
The short answer is no. Right now there isn't a built in functionality for that.
The long answer is that you can make a pagination yourself. One of the core member of sensenet made a grid where you can use pagination. It won't work with the current free to use releases because they lack the js files she used. But the idea behind it, is using a custom view. Which you can achieve by adding a system folder named Views under a the Document library and adding your custom view there.
You can use this grid for Explore, just follow these steps:
Go to the Explore action page, and switch editor mode on the PRC.
Place a ClientContext portlet (this can find under the Portlets->Application section in the portlet picker dialog) to the Wide column. Set portlet (client context porlet) properties, Apparance to None. It is a technical portlet, which allow get the CurrentContext in javascript. This is a very important element to work with this grid. The Grid use the client context.
Place a UserControlPortlet (In the portlet picker, Portlets->Application section) to the Wide Column.
Set portlet properties:
4.1. Portlet title: <%$ Resources: PortletTitles, Items%>
4.2. User Control path: /Root/Global/renderers/UserExploreGrid.ascx
Checkin Page modification on the PRC.
Enjoy your pageable explore portlet.
Keep in mind that this grid is specifically designed for users, so they will miss actions in the top menu. These must be handwritten. Then I suggest you copy the UserControl ( /Root/Global/renderers/UserExploreGrid.ascx)
and then put the action list on it . You can read more info about action list here: http://wiki.sensenet.com/ActionList
Br,
maros

Sharepoint 2010 custom content type does not show in list creation screen

I have a content type that was created by another developer long ago. After deployment, the content type does not show up in the list creation screen. Even when filtering lists and custom types. It's just not there anywhere. The feature is successfully deployed and if I do a template of the list from another farm, and then create the list from that template everything works as expected.
Thanks for anyone that knows what I might be missing here.
The answer was that it needs to have a list definition added to the project.

DNN get params in view are not available in edit

I am creating a dnn module. The content depends on the param in the url.
I want to be able to edit this content in the 'edit content' mode. However when i go to edit content the param in the url is no longer accessible because it is the parent document. How do i go about passing this value from the view.ascx to the edit.ascx?
Try storing the param in cookies or localstorage. Then you should be able to access it. Of course the user will be able to modify it but you can do a check that the user has not modified it by storing a server side encryption or somthing like that.
A workaround is to have a field where the user enters this parameter. But i know this isn't a very good solution. I am guessing that you will have to override the dotnetnuke core to do this (yes i know it sucks).
I hope I am understanding the question properly.
To pass parameters from your View to Edit controls, you should first make sure they are registered properly in the module definition. You default View should have an empty controlkey and your Edit should be registered with a control key, for example "addedit".
When creating a link between your view control and edit control, use the EditUrl() method of PortalModuleBase. When passing a parameter, for example an id of the item you want to load into your edit control, you can pass them as arguments in the EditUr method.
Example (in my view.ascx.cs):
lnkEdit.NavigateUrl = EditUrl("id", "16", "addedit");
This will assign a module view link to the edit.ascx (assuming the controlkey in the definition is addedit) passing in a url parameter "id" with value 16.
See my DNN Module Views tutorial for a complete lesson on how to do DNN module views and navigation.
http://www.dnnhero.com/Premium/Tutorial/tabid/259/ArticleID/204/Introduction-and-Module-Definition-basics-in-DNN-Part-1-6.aspx

How to set a value in application scope in struts2?

I have a list that is accessible to all user of my application.I am currently adding it to session of a particular user.But i want it to be in application scope rather than session scope.Please help also provide reference/link to any example
In action you can use :
ServletActionContext.getContext().getApplication().put("myVar", myObj);
In order to set in a JSP, you can use the <s:set> tag as :
<s:set name="myVar" scope="application" value="myObj"/>
I am not sure how you want to use the list: you want to display that list to the screen or you just need it as configuration. To display it you could:
create your list statically in your Action, then display it in the JSP
you could take the list dynamically from a database, then display it in the JSP
To use it as configuration: some data can be made available at application level at initialization, but those are configuration params. More info here:
where to put configuration parameters
Using the ServletContext is the only way you can set parameters dynamically to the servlet from your code: servletContext.setAttribute(). More info here:
why use servlet context