Web Development

Syndicate content 22 

Hi,

posted some weeks ago in the "old" ZEN Google Group, maybe someone here can help to understand how to properly setting up a csp applications and contributing from the build-in caché security mechanism.

I´ve created a webapplication and wan´t to add further security to it using the smp. But... first things first.

I have two Databases let´s say DB1-LOGIN and DB2-Application. Each of this DBs has a resource assigned. DB1-LOGIN has a resource %DB1-LOGIN which has a public permission of 'read'. DB2 has a resource as well %DB2-Application with no public access.

I have defined two roles webapp-admin and webapp-user. Only webapp-admin and webapp-user are allowed to access DB2-Application. I´ve created to test users. test-admin (which has the webapp-admin assigned) and webapp-user (no special roles assigned). The CSP-Application in the smp has application role webapp-user. So test-user is automatically a webapp-user. So far so good

Last comment 16 March 2016
+ 1   0 6
0

answers

328

views

+ 1

rating

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.

Last comment 10 March 2016
+ 1   0 5
0

answers

176

views

+ 1

rating

There have been a few use cases recently within InterSystems where we've needed to connect to Caché-based web services from PHP. The first of these was actually the Developer Community itself, which uses web services as part of Single Sign-On with other InterSystems sites/applications. The following example demonstrates how to connect to a Caché-based web service (particularly, the web service in the SAMPLES namespace) from PHP, using password authentication.

+ 5   0 3
0

comments

1706

views

+ 5

rating

RESTful API Call From Cache to Particle.io Electron

Tom Fitzgibbon | Multidata | 212-967-6700 x537 | tom@mul.com

Summary: Simple Blink Tutorial for Particle.io Electron Device from Cache

Electron device is a tiny ARM processor ($40-$60) that connects to Particle’s world wide leased 2G/3G network (about $3/mo) and runs off an included LiPo battery. Using Cache’s %Net.HttpRequest you can send/receive data, control hardware and read sensors.

Step by Step (about 1 hour)

1) Get the Electron from store.particle.io.

2) Set up the Electron from setup.particle.io.

3) Install an LED and resistor from setup instructions.

4) Test with build.particle.io using their code for “Web-Connected LED”.  You get your access_token from Settings and device number from Devices in Build and substitute in their code.  Edit the code to make sure you can light the LED from a browser before moving to step 5

+ 2   0 1
0

comments

922

views

+ 2

rating

Question

I am configuring IIS to work with the CSP Gateway but I'm running into this error:

"The Module DLL 'C:\Inetpub\CSPGateway\CSPms.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a x86 processor architecture."

 

Answer

+ 2   0 1
0

comments

940

views

+ 2

rating

Hi-

I'm curious to know what InterSystems clients are using for csp based web development methodology.

Are you doing tag based development, or class based development?

If you are using tag based development, what tools are you using to create the look and feel of your web pages?  Are you using tools like Adobe Dreamweaver, or do your developers sit down and code HTML using plain editors like Notepad and Notepad++

Are you doing prototyping of web pages and then adding CSP tags, or are you just developing the finished csp page with no prototype?

Thanks
Ken

 

Last comment 26 February 2016
+ 2   0 0
0

answers

218

views

+ 2

rating

Hello,

I am trying to use %ZEN.proxyObject to send out in JSON format so I do:

    set tProxyRequest = ##class(%ZEN.proxyObject).%New()
    set tProxyRequest.notanumber = "28001"
    set tProxyRequest.aboolean = "true"
    
    set tBody = ##class(%GlobalCharacterStream).%New()
    do ##class(Ens.Util.JSON).ObjectToJSONStream(tProxyRequest,.tBody,"aelotwu")
    w tBody.Read()

and I get:

{
        "aboolean":"true",
        "notanumber":28001
}

But I want this:

{
        "aboolean":true,
        "notanumber":"28001"
}

 

Help please !

Last comment 17 February 2016
0   0 6
0

answers

632

views

0

rating

I'm designing a workflow for PHR via FTP.  What I've done is create a single FTP adapter to pick up files from multiple customers.  A router then accesses a lookup table and determines if a particular customer is allowed to send a particular message type to the state.  If not, the message doesn't go out.  It seems like everyone is against this approach (other than my CEO, thankfully), including Intersystems:

Our recommendation though is to create separate interfaces to retrieve PHR data from individual
participants. This configuration ... gives us the ability to disable an individual data feed without affecting other other participants.

This seems like a terrible practice to me, but before explaining my reasons I wanted to see what everyone else thinks.

Last comment 5 February 2016
0   0 3
0

answers

188

views

0

rating

Do you need to quickly build a web page to interact with your database? 

Take a look at these two courses to learn how Zen Mojo can help you display collections and make your collections respond to user interactions.

Displaying Collections and Using the Zen Mojo Documentation

Learn the steps for displaying a collection of Caché data on a Zen Mojo page, find crucial information in the Zen Mojo documentation, and find sample code in the Widget Reference. Learn More.

Zen Mojo: Handling Events and Updating Layouts

This is an entirely hands-on course devoted to event handling and updating the display of a Zen Mojo page in response to user interaction. Learn to create a master-detail view that responds to user selections. Learn More.

+ 2   0 2
0

comments

164

views

+ 2

rating

Is there a possibility to map a CSP page residing in namespace ABC to a namespace XYZ so you could access it as if executing from XYZ: http://localhost:57772/csp/xyz/MyPage.csp ? Some odd cocktail of web application and package mappings that could make this happen?

The idea is to keep the CSP page in sort of a read-only namespace that only contains code, with the data residing in another namespace. This works for zen pages, but not for CSP.

Last comment 29 January 2016
0   0 4
0

answers

277

views

0

rating

Oracle plans to deprecate the much-maligned Java browser plugin in JDK 9. For years, the bundled plugin put users at risk with its numerous security flaws. The web is clearly moving to a plugin-free state, which is a good direction.

If you are relying on the Java browser plugin, you should take a look at Java Web Start.

Here is the official blog post by Oracle:

https://blogs.oracle.com/java-platform-group/entry/moving_to_a_plugin_free

Stefan

0   0 2
0

comments

195

views

0

rating

Hi,

I'm trying to create a Zen Report that, when rendered to PDF has a header on every page that includes some items from the group that I'm iterating over in the <body>.  I can't use <header> as that only displays once for each iteration, even if that spans more than one page, but <pageheader> seems to be independent of <body> so again doesn't work.

 

Cheers,

Steve.

Last comment 21 January 2016
0   0 4
0

answers

165

views

0

rating

Hi

I'm starting to play around with dynamically creating tabs and panes from query data, and was trying to do the following, with nested tabs.

Tab Group

High level tabs

Sub Tab Group

Sub tabs from the High level tabs.


So I have built up my page with a placeholder top level tab group, then creating and added child tabs to this, then from this level, I have created a new Tab Group programatically, and programmatically added tabs to this new group.  However, all I am getting is the top level of tabs, with all of the leaf data concatenated under it.  Does ZEN allow nesting of tab groups programatically, or do I have to define them statically on the page?

 

Thanks
Chris

Last comment 20 January 2016
0   0 3
0

answers

183

views

0

rating

New to CSP and Zen.  I've been going through tutorials and have made some progress.  Using the "Contacts" tutorial as an example, I'm trying to create a "ViewContact" page.  I want this to be linkable so I'm using URI Parameters, which I understand.  However, what I'm not sure about is how to retrieve a specific record.  Should I use a SQL statement?  If so, how?

Let's say I just wanted to display the property "Name" for the contact with ID 12.  What would be the best way to do so?

Last comment 14 January 2016
0   0 4
0

answers

137

views

0

rating

I created a Zen page with a header. All is good. I then created a new Zen page and during the wizard specified that it was a "subclass of a template page". So now I have Class Custom.App.HomePage Extends Custom.App.TemplateMaster. If I visit HomePage.cls I see the header from the template. However, the HomePage class has no XData Contents section so I have no idea how to actually add content. I tried adding the section but once I do then I don't see the template content anymore.

So, how do I put content in a page that extends another page as a template?

The only documentation I found about templates doesn't really help and unfortunately I don't have access to the sample files mentioned.

Last comment 14 January 2016
0   0 4
0

answers

109

views

0

rating

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
}
Method %OnDrawHTMLMeta() As %Status
{
              Write "<meta name=""viewport"" content=""width=device-width, initial-scale=1.0,maximum-scale=1, user-scalable=no""/>"
              Write "<meta charset=utf-8 />"
              Quit $$$OK
}

Can you help me please?

Thanks.

Last comment 18 December 2015
0   0 2
0

answers

157

views

0

rating

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);

I expect to get the same component behavior of {type:'$button',caption:'Standard Button',key:'button',disabled:true} when enabling or disabling the button through JavaScript code. I mean, the same style, color, behavior, etc.

Last comment 15 December 2015
0   0 3
0

answers

159

views

0

rating