TYPO3 Extension Builder v10: records from BE not showing up in List View - typo3-extensions

I created a new extension "lecturers" with the TYPO3 Extension Builder (v.10.0.1).
As default actions, I added list, show and create. After creating the extension, I did not modify any of the files except the list template.
Usually, I add new data within the BE, as it can be seen in the image:
But when I open the list view, no data is shown. Also, the repository is empty (<f:debug>{lecturers}</f:debug>.
However, when I added a record within the create view, the repository as well as the list view includes that one record.
Does anyone know which lines of code I am missing, to include the BE records in my repository as well? Thank you for your help!

After removing the setting of persistence in the generated folder TypoScript/setup.typoscript it worked

Related

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

SiteController cannot find the requested view

I am new to YII framework.I have installed Yii framework and I created one new sample project.
by default one sample application is coming. I am trying to add one new page to that site. i have created one new tab in menu. I copied that file to view folder.
when I click that tab in menu I got bellow error.
SiteController cannot find the requested view "adddep".
C:\xampp\Yii\framework\web\CController.php(878)
please any one can help me to solve this problem.
Thanks,
DHamodhar.E
The file adddep.php should be under views/site folder.
you say copy file to view folder and add a menu tab, you must follow mvc structure,
If you only create view file then you must need to create controller file, its not directly hit view file, first its hit controller file
here some tutorial link:
http://www.yiiframework.com/screencasts/
http://www.yiiframework.com/tutorials/

Lucene SearchResult.Fields collection is missing some properties

I have asked the following question at the Our Umbraco community site also, but I've had no luck there so far.
I've got a task where I need to manually add database records for a media image file, which is to appear in an Umbraco site for our client.
My SQL consists of:
Adding a record in umbracoNode for the image.
Adding a record in cmsContent
Adding a record in cmsContentXml
Adding records to cmsPropertyData for the image's umbracoFile, umbracoWidth, umbracoHeight, umbracoBytes, umbracoExtension
After executing the above, and logging into Umbraco, I can see the image in the Media area and all looks fine.
The problem is the call the #Model.MediaById() (in a Razor file) when I want to display that image - basically no image is displayed since the img 'src' attribute is not set.
I've stepped through the Umbraco code and found the problem. Basically when the code uses Lucene to search for the media (ExaminedBackendMedia.GetUmbracoMedia()), it does find the image file, however there are a number of fields missing for the SearchResult. For example, none of the "umbraco*" properties adde to cmsPropertyData appear in the fields collection. When I step through the code for another image (one that was added manually) I can see an extra 5 or so properties in the fields collection - including all the "umbraco*" properties.
So I can see that I have missing data here. Basically the SearchResult object is missing some fields. Can someone suggest what I may have missed please? Why is Lucene not picking up the "umbraco*" properties that I've added via SQL scripts?
You need to make sure that you republish the nodes, which will take them from the database entries that you created and put them into the XML cache that umbraco actually uses when serving up data.

Add dynamic tabs in tabbed property view of eclipse

I am trying to create a tabbed property view as per given article : The Eclipse Tabbed Properties View
As per article, org.eclipse.ui.views.properties.tabbed.propertyTabs extension point can be used to add new tabs.
<extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
<propertyTabs contributorId="mview.views.SampleView">
<propertyTab
category="sample"
id="mview.ButtonTab"
label="Button"/>
<propertyTab
afterTab="mview.ButtonTab"
category="sample"
id="mview.AdvancedTab"
label="Advanced"/>
</propertyTabs>
</extension>
However in my case the tabs of property view vary depending on the item selected in view. So I have to add the tabs dynamically into extension depening on the item selected.
Please suggest how to do so.
Update:
One of the way to do so (I am not sure if its adviced) is using IExtensionRegistry.addContribution() method. Here I provided an inputstream object containing desired extension details. This added tabs to property view at run time. However with change in selection of item in list viewer, the property view is not updated. Please suggest if this is the right approach to do so.
Ok, I got the solution Its a two step process. Using this one can dyanamically add tabs (and their sections):
Step 1: Associate a tab descriptor provider with the view.
Add an extension point - org.eclipse.ui.views.properties.tabbed.propertyContributor to the view (if not already added). In the propertyContributor section, add a class for tabDescriptorProvider item. This class will implement ITabDescriptorProvider interface.
Step 2: Provide Tabs and Sections:
TabDescriptor provider will return array of TabDescriptors when its getTabDescriptor() method is called. Each TabDescriptor return a list of SectionDecriptors and each SectionDescriptor is linked to a Section. Finally it is the Section class that contains widgets to be displayed on screen. Each widget in Section class has a modify listner which updates the properties of selected items.
While the answer from Viral may not match the specific needs of the OP, the provided answer is likely acceptable to many.
If a tab does not have any sections to display, the default TabbedPropertySheetPage will not show that tab. Thus, if the problem domain is specified in terms of IFilter implementing classes, "dynamic" tabs may be achieved.
Tabs will be added or be removed as the selection changes depending upon whether any sections are present. A visible tab may have one or more sections present on it, and the number of sections on a visible tab may change from selection to selection.
As I came across this page with the same basic issue, I was a bit disappointed that I would need to intervene in the way the OP suggested. After some experimentation, I was able to achieve what I needed purely through the IFilter approach as suggested by Viral.
A tutorial is provided at http://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html
You need to define a new YourPropertySection derived fromAbstract PropertySection . Also define a filter derived from IFilter and override the select method to return true only for the desired type of selection. Then in plugin.xml write an extension point which would map your PropertySection to the required PropertyTab and will also associate your filter. So this section & tab will only show when your filter returns true.

Adding a custom field type to SugarCRM?

I'm trying to add a custom field type to our SugarCRM 6.2 instance. I want to add an "email link" type field. I want it to function like the URL field, but prefix every address with "mailto://" prefix instead of "http://".
It will be good if that field type is available in studio while creating new fields or in minimum, some custom code to achieve it.
What I did up to now:
- I've copied include/SugarFields/Fields/URL to include/SugarFields/Fields/Email
- In modules/ModuleBuilder/language/en_us.lang.php I've added a title for the email field
But unable to get anything working. Any help?
First of all you do not want to make any coding changes outside of the custom directory. Doing so outside of this directory is not upgrade safe.
Create a custom fields directory in your custom folder
Create new template files (.tpl) for your custom field
then you can just add a regular textfield in studio
then edit your viewdefs in your custom directory
in your tpl file concatenate the mailto:// to your text and just add the persons email address and it will take care of the rest for you
why you need custom field type for such small functionality? Just add your custom JS file in editviewdef.php. Then use some jQuery selector to perform certain action. For detail view, you can use view.detail.php to add required text in run time.
This will help you to store less data in database and display more in frontend.