Hi Simcha,

the best way to leverage this widget is to build your own bootstrap dual listbox plugin. Take a look at the code of the other plugins and make sure to check the documentation for creating helper plugins before you start:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

Let us know if you encounter any difficulties.

N.B.: I should mention that you can also just create the proper HTML code in your layout, but then you have to manually call the initialization and refresh methods in your application code all the time.

I have never actually tried to pass slashes as parameters, but I would guess that it should work if you encode them. I am aware that some systems drop these requests, because it is easy to inject malicious code this way.

Are you receiving a 404 and use Apache? If so, you may have to enable  the AllowEncodedSlashes directive:

http://httpd.apache.org/docs/current/mod/core.html#allowencodedslashes

You cannot use macros in Zen runtime expression this documentation chapter covers runtime expressions:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

If this question is actually about localizing text in Zen, please take a look at this documentation chapter:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

Localize your text in %OnGetJSResources() and load it on the client-side via zenText(id).

I would write it like this:

    set array =  []

    while (result.Next()) {
        set object = { 
                "data":{
                    "id":result.Data("ID"),
                    "reg":result.Data("Registration"),
                    "snNum":result.Data("SatNavVehNumber")
                }
            }
          do array.$push(object)
    }

You can directly embed your values as Caché Object Script and that makes your code look pretty close like the desired outcome. This approach makes it very simple to build complex JSON structures and still know what you are doing.

Steve, the correct approach is to either

a) subclass the plugin in question and generate a different HTML base or invoke additional beautify code

b) build your own plugin if you want to support a new layout object

What you describe sounds like a specialized $navbar component, so you may want to subclass the bootstrap plugin and register a specialized $navbar widget, e.g. $mynavbar.

I am not able to view the image, but in general Object Synchronization can be used by multiple servers. The architecture is designed in such a way, that usually one node is taking the role of a master and all other nodes become clients to this master.

You can implement other schemes as well, as indicated by this paragraph in the documentation:

For object synchronization, the idea of client and server is by convention only. For any two databases, you can perform bidirectional updates; if there are more than two databases, you can choose what scheme you use to update all of them (such as local databases synchronizing with a main database independently).

There is no support for bi-directional updates at the same time, so you have to sync one direction first and after that happened you can sync the other way around. The more complex your mesh becomes the harder it becomes to resolve conflicts.

That's why the documentation recommends staying with a master / client scheme, as this reduces the complexity of resolving conflicts.

Also, you have to be aware that Object Synchronization is not built for real-time updates. You are synchronizing at discrete intervals.

I would like to add that $zf(-3) and $zf(-4,1) calls can only be used to load what we call a callout library. This is a specific DLL that properly exports functions during linking and  exposes them in a ZFENTRY table. You can find more material about the callout gateway in this part of the documentation:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

If you want to work with a specific DLL that is not a callout library, you have to wrap the library, e.g. in a Java jar library or a callout DLL and then call out from Caché Object Script.

The project Evgeny mentioned may be of help as well.

Hm, interesting. So what this basically means is that the 404 page gets cached when a URL is requested and it is not available. Re-enabling the REST application does not clear that cache and that is the reason why the REST application does not work for the URLs that have the 404 cached when it's enabled again.

Automatically clearing the cache for a REST application is not trivial, as it does not translate to a single URL. I will check back with the developers and see what we can do about this.

Not in the near-term. We are using a highly optimized in-memory and on-disk structure for our JSON support and the document data model. Providing more features and adding more optimizations to this structure stays a priority.

Our model allows us to support other serialization formats as well and we have some hooks in place we plan to leverage in the future. MessagePack and other serializations are on the tentative list for this, but nothing is carved in stone at the moment.

Do you have a specific use case where MessagePack is a requirement?

As the others, I am trying to guess what you mean when you say organizing code. I can think if source control, project organization and auto code formatting.

If you get more specific we can provide a better answer. If you are not aware of Atelier, our new Eclipse-based IDE, take a look at the session recording from Global Summit 2016:

https://beta.learning.intersystems.com/mod/page/view.php?id=212

I am not sure if this helps, but I want to mention that Ensemble comes with an option to export all classes and routines that are required to run an Ensemble production. At least, all dependencies Ensemble can resolve.

You can find the related documentation here:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

Maybe you can take a look at the code behind the scenes, or analyze the output of such an export.

The error means that the version of your Java runtime is too old. For more information on this error, please see a related stackoverflow thread:

http://stackoverflow.com/questions/10382929/how-to-fix-unsupported-major...

Recent versions of Caché and Ensemble only support Java 7 and 8, as Java 6 has reached end-of-life and has multiple security flaws.

Upgrade your Java runtime to 7 or 8 and the error will go away.

Hi Benjamin,

regarding your questions:

1) String concatenation is possible with the underscore "_" character. For example:

set myquery = "SELECT * FROM " _ tableName

Don't use the plus "+" character as this is the addition operator. It will evaluate your string and convert it into a number. Unless your string starts with a number, it will be evaluated to 0. 

2) Multiline statements are not supported in Caché Object Script, so you have to concatenate your string if you want to spread the query on multiple lines.

HTH,

Stefan

Thanks Eduard for posting the working solution. The reason why this works is that you actually create an object of your registered class and assign the values. The jsonProvider API can now walk the object and project the types properly.

In the non-working example, you created a zenProxyObject and assigned the values on your own. The zenProxyObject just deals with auto-types and guesses the best possible type fit. As you see, this guess can't be correct all the time as in this case.

If you want to create a JSON structure with specific types, either use a) the new JSON support in 2016.1 (recommended if 2016.1 is available) or b) create a subclass from %RegisteredObject and use the jsonProvider API.