Asking your browser for help in smartUI developments

Browser Memory

When you think of smartgUI, you may always think of a lot of small js/css text files and a couple of resources to be loaded. All together act as smartUI Page like this:

A typical standard landing page

This is a typical landing page. With such a page you can control, how your perspective is working and also if certain commands, controls and widgets are correct. For example, the widget ot the top left is a modified Welcome Widget showing System Messages and other news channels.

What else can a browser do for you in your continuing quest to produce an awesome user experience for an enduser?

A lot! First, open the development tools in the browser. Here we are using Chrome, but this tools are available on all browsers.

Developer tools – a closer look

Developer Tools

Press Ctrl+Shift+I or the Develeloper tools entry in the menu.

The tabs in the developer tools

This will open up the develeloper tools. The functionality is subdivided in several tabs. The most important (from left to right) are

  • Elements. Gives you the possibility to see the actual DOM loaded, Here you can change css and other elements and you’ll see immediately the effect. The rightmost icon lets you identify any element on the screen (and display it in the DOM). Thaty a handy way to identify elements on the screen and to which js file they belong (Similar way as we had in legacy gui with oscript in these ancient times)
Identify Icon
  • Console. Gives you all messages from the browser. You can see all module messages, also missing modules are displayed in red. There are several levels of messages, which can be filtered. Here, since this is a develeopent VM, all levels are activated.
  • Sources. The main tab to work with.
The sources window

The complete smartUI is loaded in the browsers memory (except those data parts, which will be changed via REST/Ajax later on). So we can examine directly, whats happening in the browser.

Interesting is the treeview at left:

Loaded js parts

We see blue and orange folders, which can be opened. Lets open a blue folder, for example the “New Generation Desktop” ngd and the resubmission

Bundles and Sources

First, we see, the ngd has the name ngd/bundles. It contains the js and css bundles of ngd. Lets open another folder, the resubmission folder. Here you see a blue app/bundles folder and an orange folder named src. Here you have the standard SDK tree. If there sre orange folders, then you can browse into the source code, like this:

Load a souce file which is not in the SDK

Here we checked the AddReminder.js from the reminder package, which is one of these modules not part of the smartUI SDK.

Whats to do with that file(s)? Select the file (with js extension) in the tree and right klick. Here you can edit the file or save the file to your filesystem.

Save a loaded js file

Search a needle in a haystack

We have a lot of js files in the browser memory. How to search for a specific file?

First, display the search window by clicking on the to right 3 point menu. Goto More Tools and click on Search. Then a search bar opens at the lower left. Enter your search name (mostly part of the requirejs path) and you’ll see the results. Select the .js file (bundles are not very useful to read). The file is displayed in the source window.

Our requirejs paths in the browser

Sometimes its quite nice to inspect the loaded requirejs modules in the browsers memory.

At first, we have to switch to the debugger mode. So open the console tab and type “debugger” in the last line to put the browser in Debug mode.

Then our interestring things appear at the right of the developers tools.

We see, the scope is filled with the loaded objects. Go to the global scope. Scroll down, until you’ll find ther csui entry. Please note, this may change to nuc from 21.2!

There are several entries under csui. Open the first “require” entry (or “requirejs”). Then open s. Expand contexts. Open _ (underscore). Expand registry.

Then all loaded csui and extension parts are listed in the registry. Lets examine one entry (countryselector.view).

Under depmaps, we see the dependencies.

Under map we see all map related things, this is the place to override an original module with a custom one.

And we have access to the source code (if we click on the link at countryselector.view:13.)

Now you have the base for your own experiments. There are a lot of additional features in the developers tools, which could not be covered here. So: Happy experimenting.

OS-Package in OScript

Oscript OS Package

The famous OS package in OScript is very important for the internal functionalities of the Content Server Modules, but its hardly documented. This post is an overview of the methods in this package.

A closer look

All of these methods van be used by adressing tzhe methods with the package name (OS) in any oscript program. For example OS.Features(Object) lists all features of the object in the argument.

Disclaimer: This list is not complete and may change any time and any Content Server Version, as long as there is no official documentation of this package. And there is (of course) no guarantee on this list by me.

Methods

CreateOSpace(sPath)ObjectCreates a new OSpace
New(oParent)ObjectCreates a new OSpace object
Delete(Object)Deletes an OSpace object
NewTemp(MasterObject)Creates a new instance of an OSpace object
IsTemp(Object)IntegerWas the object created using newTemp. Result 0,1.
Root(MasterObject)ObjectReturns the module root object
Roots()ArrayReturns all loaded root objects
Orphans(Object)ArrayReturns all orphans in the objects ospace
Children(Object)ArrayGets children objects from the object
Patent(Object)ObjectGets the parent object
Name(Object), FileName(Object)StringReturns the name of the object/ospace of the object
ReadOnly(Object)BooleanIndicates, if the current ospace is locked
Features(Object)ListLists all features in the current object
IsFeature(Object, sFeatureName)BooleanReturns, if the Feature sFeatureName exists in Object
AddFeature(Object, sFeatureName, [optional] CopyableBoolean)Add a new feature to the object
DeleteFeature(Object, sFeatureName)Removes the feature sFeatureName from the object
ClearValue(Object, sName)Clears the content of the feature nName
IsObject(objRef)BooleanChecks, if the object still exists

Happy OSpace Changing

Possible amendment of the search results

We just discussed a possible amendment in the OpenText smartUI Content Server Search Results. Whats about an addition of a thumbnail for each document found?

Tabular View with Thumbnails

It looks like this:

https://youtu.be/HQR50f0o6Hk

New in 21.1: Business Events

Business Events

Good News for Content Server Administrators. They are no longer aloane on monitoring the system.

A new type of Administrator is born, the Business Administrator. The Content Server now has two kinds of events. The “System Events” are for Administrators, the “Business Events” are for Business Administrators.

Business Events are not only for a relief of System Administrators but also to capture events of interest to Business Administrators operating their normal day business.

New in System Monitoring

There is a new link in the System Monitoring Admin Pages

New link in System Monitoring

In the Configuration, email Notofications will be send automatically to the group BENotifyGroup. This group is created for new installs and upgrades. An option to send these notifications also to Administrators is per default on.

email Notifications in Business Monitoring

This Events are also scriptable and exportable

Export Admin Settings

And also there is a new Usage Privilege called “System Monitoring”. With that privilege you can access the “Business Events” configuration page ans the “System Events” reports page.

To access, the group “Business Administrators” must be enabled, which is the default, otherwise the access will be restricted.

The new privilege System Monitoring

Business Event Reports

The “System Event Reports” is a shared admin page for reviewing and exporting reports. Here we have two kinds of users:

  • Business Administrators see Business Events, no System Events.
  • System Administrators see only System Events, unless the “send to Administrators” is checked. If its checked, they see both.
System Event Report

New on this page is the filter by Event Type.

Happy Event Monitoring for Business Administrators and Happy Spare Time for Administrators.

New in 21.1: Search MyAssignments Widget

The new Search Box

A minor improvement in OpenText’s new Content Server 21.1 is the addition of a Search Box in the MyAssignments Widget in smartUI.

The new MyAssignments Search Box - not expanded

Here, the MyAssignments widget is marked. To marvel at the new Search Box, you need to expand the widget.

The new MyAssignments Search Box - the Loupe

Then click on the loupe

Next, the Search Box is displayed.

The new MyAssignments Search Box -the Search Box

Happy Searching

New in Content Server 21.1: Strict URL Syntax on additional Enterprise Menu Items

The new Strict URL checkbox

In 21. there is a new checkbox in the “Additional Enterprise Menu Items” Admin page. This allows you to enforce a stroct URL Syntax without Javascript or relative URL Syntax.

A small extension to 21.1, but a giant leap for Administrators to enforce more security on the Enterprise-Menus.

The Admins have an option to overrule this restriction by unchecking the new option. But this page is restricted to Content Server Administrators and not available for Business Administrators.

Fine!

Activating missing Webreport Tabs

Missing Tabs

A short, but sometimes time consuming thing are the missing Webreport Tabs. Imagine, you have a Content Server with an jetty based internal Admin Server or an external Admin server on a fast machine.

The problem

Then, from time to time, you will see this on editing a webreport:

Missing Webreports Tabs

All Edit Tabs for the webreport are missing. Although you can start the missing functions within the URL, its annoying.

The Cure

If this happens, use this Magic Trick N,12:

Simply stop Content Server and Admin Server. Start the Admin Server and wait at least 5 min before starting the Content Server.

Magic Trick N.12 in Action

Then you’ll see everything is there.

Wow. You made it. You are a great wizard.

Seriously:

There is a timing problem in the Content/Admin Server. If the Content Server starts to fast, COntent Server thinks, there is no license for webreports at first. Later, it gets the license, but the GUI is drawn without the webreports tabs.

Wait for your Content Server to start up. Wait at least for 5 min. Then everything will be drawn in the GUI.

Happy webreporting.

New in 21.1: Folder-Templates

The latest addition in OpenTexts Template technology are Folder-Templates.

Reason for the new Folder-Templates:

Here is a couple of use cases:

  • Create a folder from template within in Workspace: Create some optional folders (not applicable to every Workspace) with predefined folder names, folder permissions, etc.
  • Create folder from template in the enterprise directory: Create a hierarchical structure with predefined folder names, folder permissions, etc

Folder-Templates – How do they work?

Lets explain this in a step-by-step example:

  1. Create the Top Folder structure in “Content Server Document Templates”. Dont forget to add the Classifications according to your schema. Here the main structure is named “Stock Plan”

2. Create the folder structure as required.

3. Add the folder structure at any connected workspace you like. Here a smartUI based workspace is displayed. At the “+”, you can add the Folder Structure “Stock Plan” by one simple click.

5. Then the folder structure is added. The clock icon is a smartUI indicator, that this structure is new. (See my posts on this topic)

Annd there are all subfolders defined.

All Classifications, Categories etc applied to the template will also be present at this copy, like in any other template.

The Sky is the Limit!

Happy Templating.

Next week we’ll discuss the Improvements in Content Intelligence (3 new Widgets) and the Modifications in the Webreports in the amazing new Version 21.1 of Content Server.

New in 21.1: Multilingual Metadata Support

Multilingual Metadata in 21.1

Finally, Multilingual Metadata Support is implemented in Content Server 21.1. Before that version there was only Support available here.

The Users Point of Vue

Multilingual Metadata can be added/edited at the Property Panel of a document. The first screenshot gives the entry of the name, the second gives the entry of the Description field.

Multilingual Metadata in 21.1
Multilingual Metadata in 21.1

Only Names and Descriptions are supported for Multilingual Metadata. For more fields or even Category Attributes in multiple languages, refer to an OpenText Partner like CASSIA.

The Programmers Point of Vue

The Name and Description fields show at least two multilingual text pickers. These are found in the SDK in /lib/csui/controls/multilingual.text.picker and in /lib/csui/dialogs/multilingual.text.picker. Unfortunately there is no Documentation and no index.html. Lets take a look on that control:

The Controls

The left screenshot is from dialogs, the right is from controls.

Multilingual Text PIcker

This is embedded in the header.view.js from the dialogs/node.picker and will only be activated, if Metadata Languages are enabled. The mixin allows the form to be displayed as a Bootstrap Popover.

Mixin Start

Changes in that area require the changed multilingu<al text picker and also the changed paths to be followed for that changes. Therefore require a spawn of the whole nodestable widget to reflect that changes. This is acually not recommended.

Happy MLM