0 Followers · 247 Posts

Zen is a school of Mahayana Buddhism that originated in China during the Tang dynasty as Zen Buddhism. Zen school was strongly influenced by Taoism and developed as a distinct school of Chinese Buddhism.

In InterSystems Data Platform Zen is a name for MVC web application framework for rapid software development.

Documentation.

Question Ruslan K · Oct 14, 2017

I want to call ZenMethod when page is closing. Is it possible?

I tried

ClientMethod onunloadHandler() [ Language = javascript ]
{
    zenPage.SomeZenMethod();
}


Method SomeZenMethod() [ ZenMethod ]
{
    // to do some work
}

but it is not working

1
0 424
Question José Pereira · Oct 10, 2017

Hi everyone! My company has a Zen ERP application with CSP delegated authentication. Now, we're developing a separated BI application, using Angular, which consumes DeepSee REST API services. Both applications access the same Caché database.

How to implement single sign-on strategy in order to allow an already authenticated ERP user to access DeepSee REST services? Has anyone already implemented something like that?

Thanks in advanced.

3
0 611
Question Ruslan K · Oct 5, 2017

How to show alert message on ZEN when user closing window?

Standart js way to add listener is not working.

I tried this

ClientMethod onloadHandler() [ Language = javascript ]{zenPage.window.addEventListener('onbeforeunload', function(e){
   
        return 'Are you sure you want to leave?';});
    
}

and this, but both are unsuccessfully .

ClientMethod onloadHandler() [ Language = javascript ]{
    
    
   zenPage.window.onbeforeunload zenPage.myClientMethod;}
5
0 796
Question Ruslan K · Aug 23, 2017

When I add a parameter to dataCombo for loading it on runtime and the property editable set to 0, dynamically loading content for dropdown through parameter works fine.

But, when I set editable to 1, to implement user search in dataCombo, loading through parameter is not working, it is loaded all rows, but I need loading on some parameter. It don't see the parameter, when editable is 1.

Is it normal behavior of dataCombo? But how about user search in dataCombo on this case? When editable is 0, we can't enter any character in dataCombo.

2
0 372
Question Laura Cavanaugh · Aug 10, 2017

I have a <tablePane> element with OnCreateResultSet and OnExecuteResultSet methods; autoExecute is "false" but the OnCreateResultSet and OnExecuteResultSet methods are nevertheless called on page load.

I want the user to be able to press a button to submit the parameters, then have this button call tablePane.executeQuery() to execute the query.

autoExecute is simply igonored.  We're on 2014.1.3 with plans to upgrade to 2016 soon.

Are there more settings I need to set? Or is this attribute simply ignored?

5
0 410
Question Rui Figueiredo · Aug 25, 2017

I'm working on an existing Zen Report that uses queryClass/queryName to retrieve data using a class that has a Stored Procedure method. Which works fine.
I have created second class with a Stored Procedure method, I modified the zen report to use this class and now I'm having the following error.

Error: SQLCODE: -99 Message: User UnknownUser is not privileged for the operation
ErrorNo: 5540

 

Regards,

Rui

4
0 485
Question Ruslan K · Aug 22, 2017

The dataCombo property columnHeaders is a comma-delimited list of column headers displayed in the dropdown list.

Comma is a delimiter.

But, if I want add comma to columh header, for instance "House number, apartment" - this is value for header of one column.

How can I escape comma in this case?

"House number\, apartment" - is not working. 

26
0 616
Question Laura Cavanaugh · Aug 17, 2017

Hello all,

In my ZEN login page, I found a way  to bypass the submit button and force a user to click on the Sign In button, thus forcing the code to call my OnSubmit(), like this:

<!--ondefault="return true;"--><!-- this removes the ability to use "return" to login forces button click to login -->

<loginForm id="loginForm"   ondefault="return true;">

4
0 716
Question Stephen Wilson · Nov 22, 2016

TablePane1 is populated when a %ZEN.Component.button on a form is clicked from a JavaScript onclick method.

<button caption="Search" onclick="zenPage.onSubmit();"

TablePane1 also has a JavaScript onselectrow method zenPage.onSelectRow() that gets the currently selected RowID.

onselectrow="zenPage.onSelectRow()"

This JavaScript method gets the RowID and feeds it into ClassMethod GetAuditLogs(ByRef pRowId) [ ZenMethod ] to get the audit events for that record.

3
0 569
Question Brian Shingle · Aug 7, 2017

Greetings!

I'm new to Zen reports and I'm wondering if what I'm trying to do is possible.  I have a classmethod  that accepts three parameters to generate an xml file from a global.    I've set up my Report Definition to call the ClassMethod that generates the .xml file; however, I'm trying to figure out how to pass the parameters to that ClassMethod from the Report Definition.  The example in the documentation shows parameter passing using SQL (which I'm not using), so I'm curious if this will work.  

2
0 468
Question Ruslan K · Aug 9, 2017

I have a tablePane. TablePane can have one, or two, or three parameters. It depends on some conditions.

At first I add all three parameters to tablePane.

set p1 = ##class(%ZEN.Auxiliary.parameter).%New()
set p1 .id = ..id1
do table.parameters.Insert(p1 )
do %page.%AddComponent(p1 )

set p2 = ##class(%ZEN.Auxiliary.parameter).%New()
set p2 .id = ..id2
do table.parameters.Insert(p2 )
do %page.%AddComponent(p2 )

set p3 = ##class(%ZEN.Auxiliary.parameter).%New()
set p3 .id = ..id3
do table.parameters.Insert(p3 )
do %page.%AddComponent(p3 )

Then through javascript I set parameters values and query names.

2
0 349
Article Lexi Hayden · Jun 8, 2017 3m read

I needed to use the OnGetNodeInfo callback of a Zen <dynaTree>, because this seems to be the only way to control the style separately for different levels of the tree. This post describes two discoveries I made.

How a dynaTree builds a tree via the OnGetNodeInfo callback

When you use a dynaTree with the OnGetNodeInfo callback, the dynaTree creates a series of nodes and displays them top to bottom in the order they were created

0
0 357
Question Laura Cavanaugh · May 17, 2017

I need a trick to display the cellTitle for just ONE column in a tablePane with a unique value.  Here are the issues:

1. OnDrawCell has access to the cell data for that row/column, in %query(pName),  but setting the cellTitle property to a column doesn't refresh the column object

2. Setting showValueInTooltip is good for the entire table, not just one cell

3. ** the column element does not evaluate zen expressions, so I can't say cellTitle="#(%query.Comment)#", for example.  That's the crux of the problem.

<tablePane id="tblComplete"  
 tableName="MyTable" 
 orderByClause="ID DESC" 

2
0 561
Question Randy Stewart · May 8, 2017

Suppose I have an image and need to convert that image into a PDF for inclusion in an HL7.

I know that Zen Reports can display an image in a PDF but I do not want to view the image in a web page. I just need to convert the image to PDF in a Process and then include that PDF in an HL7. The  workflow would be like this:

Get image -> Convert image into PDF -> Include PDF in HL7 OBX.

I know how to do the last part to include PDF in HL7 OBX. Just need ideas on the first part.

2
0 1308
Question Peter Kopp · Apr 20, 2017

I am attempting to do two things with the mime types.

 

Collect the mime type from a stream(%FileBinaryStream) using this syntax: myCONTENTTYPE=stream.GetAttribute("Content-Type")

However, myCONTENTTYPE always comes in empty.

Set the CONTENTTYPE PARAMETER in the OnPage ClassMethod of a ZEN page, using this syntax: s ..#CONTENTTYPE=myCONTENTTYPE

However, I cannot seem to get the correct syntax.

 

I would appreciate any and all help. Thank you.

4
0 833
Article John Murray · Feb 14, 2017 1m read

If you are developing applications that use CSP or Zen, or potentially any of the other InterSystems web-related stuff that's built on top of CSP, then it's important to know how to keep one particular secret.

A central part of the CSP security architecture is a server-side session key. "Server-side" because its value should never be revealed to the client that is issuing the web requests. If it is revealed, a malicious client might be able to use it to bypass your security and make your server do things you don't want it to.

1
0 719
Question Sebastian Thiele · Apr 7, 2017

Hi,

is there a way to implement the behaviour for a zen dataCombo? Let´s assume the dataCombo retrieves it´s data via sql query, lets say 50 records. Now the user type into the input of the datacombo 'a', which shall auto select the first entry beginning with character 'a'. If the type 'a' again, the next item from the list is selected. What I am looking for is an approach to implement such an behaviour. See a simple <select> component which support the desired functionality out-of the box.

3
0 420