Article Fabio Goncalves · Jan 8, 2018 2m read

Hi Community,

I would like to share with you my experience regarding  to debugging via Atelier.

I'm developing a REST API and would like to attach to a process when I call the API via a REST Client tool, for example Postman. The purpose is to inspect values from HEADER and BODY of the HTTP request during the debugging process.

Come on! How am I doing? I am going to demonstrate that by using a class from SAMPLES namespace.

1 - Open Atelier;

2 - Open your REST Service class;

3 - Go to the method related to the URI that you need to debug;

3
0 1405
Article Fabio Goncalves · Apr 19, 2017 5m read

In the previous article, I have demonstrated a simple way to record data changes. At this time I have changed the "Audit Abstract Class" which is responsible for recording audit data and the data structure where the audit log will be recorded.

I have changed the data structure to a parent and child structure where there will be two tables to record the "transaction" and the "fields its values" changed on that transaction.

Take a look at the new data model:

Take a look at the code changed from "Audit Class":

4
1 1139
Article Fabio Goncalves · Dec 12, 2016 3m read

Suppose you have developed your own web app with InterSystems technologies stack and now want to perform a captcha validation on the client side in order to determine whether or not the user is human and make it safer. There are some modern frameworks to address the captcha issue, however most part of them needs internet access to generate codes and sometimes are complex to implement. Take this as basic example considering that image recognition has gotten too good. That's why you nowadays you tend to see more pattern recognition captchas than mere reading ones. (I.e. click all the images with

9
2 1619
Question Fabio Goncalves · Jul 19, 2016

I have a Zen Mojo application, developed using Bootstrap plugin and using "Explicit Dispatch" with multiple templates.

I have every template representing an specific area of my application (customer, order, logon, application settings, etc.). 

Each template has specific code,  client side validation and so on related to its areas by using javascript.

So, I would like to know if it is possible, for example, through my order template call a javascript function from another template (e.g.: customer), where I there is functions for document id validation, date of birth validation, etc.?

Thank you.

2
0 350
Question Fabio Goncalves · May 16, 2016

Hi All, 

I am providing support to an AP about using document criteria on Multiple Templates (Explicit Dispatch).

I am trying to set the  criteria value from:

view.setDocumentKey('initial-search',{patirntId:tPatId});

 However it is not possible to get the criteria value on %GetJSONContent through pCriteria parameter object.

How can I do this with Multiple Templates on bootstrap plugin?

Thanks.

1
0 345
Question Fabio Goncalves · Apr 19, 2016

Does Caché support SQL CREATE SEQUENCE as in PostgreSQL?

If not, what would be the best alternative? Create my own sequence logic as the example bellow? 

 Class Util.MySequence Extends %Persistent [ ClassType = persistent, ProcedureBlock ]
{


Property dummy As %String;

Property myvalue As %Integer [ Calculated, SqlComputeCode = { Set 
{myvalue}=##class(Util.MySequence).CurrentValue()}, SqlComputed ];

ClassMethod CurrentValue() As %Integer
{
        s x=$I(^MySequence)
	Quit x
}

Method myvalueGet() As %Integer [ CodeMode = expression ]
{
..CurrentValue()
}

}

 

Thanks.

4
0 714
Question Fabio Goncalves · Mar 21, 2016

Hi Community,

How can I create a JSON with the object ID by using the %Object:$toJSON API?

I have the following piece of code bellow where I create an object reference, create a %Object instance from %fromObject and them I am creating the JSON from $toJSON, but it does not expose the %ID (object id). How is the best approach to create a JSON with the respectives object IDs?

7
0 1617
Question Fabio Goncalves · Mar 17, 2016

I am trying to debug a class on Atelier and it is not stopping at the defined breakpoint.

Atelier IDE Version: 1.0.107 - Cloud Connection

I have already taken a look at the Community´s Atelier Debugging Video and followed the steps without success.

Can anybody help me on that?

Tks. 

3
0 435
Question Fabio Goncalves · Mar 7, 2016

I would like to know how to get the key value from a dropdownmenuitem placed on a navbar.

I have tried to get from onselect and onchange events of the template class, but it didn´t  work.

According to the snapshot attached I am trying to retrieve the values from 'action-1' and 'action-2'. 

I have attached a ZIP file with a snapshot which value I am trying to retrieve and example classes.

Thanks.

8
0 363
Question Fabio Goncalves · Jan 14, 2016

Is it possible to override JQuery Mobile elements´styles (buttons, lists, font size, color, etc) or an existing  theme with a separate custom css file?

I am really interested in an official or elegant way to do it.

Thanks.

2
0 534
Question Fabio Goncalves · Dec 17, 2015

I am trying to define the charset for a JQM Application and it is not working. I have tried the following options without success:

Method %OnDrawHTMLMeta() As %Status
{
              Write "<meta name=""viewport"" content=""width=device-width, initial-scale=1.0,maximum-scale=1, user-scalable=no""/>"
              Write "<meta http-equiv=Content-Type content=text/html; charset=utf-8 />"
              Quit $$$OK
}
1
0 430
Question Fabio Goncalves · Dec 14, 2015

Hi All,

I am trying to disable a button on a JQM application.

I started the button as disabled according to this code: {type:'$button',caption: Button',key:'button',disabled:true}

However, I would like to enable or disable the button via JavaScript code . I have tried the following, but it don´t have the same behavior and style as the code above.  

var view = zen('mainView');
              view.disableItem('button',true,0);

2
0 382