go to post Fabio Goncalves · Jul 19, 2016 Yeap! I was trying to use getTemplateForArea(area) and zenPage.loadTemplateNS(), but I couldn´t make it work as I expected.Good. Thank you very much!
go to post Fabio Goncalves · Jul 19, 2016 I agree with Eduard Lebedyuk answer bellow that, SPA don´t work with browser back/forward buttons and consequently with the browser history. However, I noticed that the pushDocument has a parameter 'nohistory' that uses the mechanism history.pushState when set as 'true'. It is available on %ZEN.Mojo.basePage. I did some test in order to try to help Alexandre and i have noticed that after you pushDocument, popDocument, than click on back or forward browser buttons and than try to pushDocument once again, it does not work correctly as it was. Does anybory has any thoughts about that?
go to post Fabio Goncalves · Jul 19, 2016 I agree with Eduard Lebedyuk answer bellow that, SPA don´t work with browser back/forward buttons and consequently with the browser history. However, I noticed that the pushDocument has a parameter 'nohistory' that uses the mechanism history.pushState when set as 'true'. It is available on %ZEN.Mojo.basePage. I did some test in order to try to help Alexandre and i have noticed that after you pushDocument, popDocument, than click on back or forward browser buttons and than try to pushDocument once again, it does not work correctly as it was. Does anybory has any thoughts about that?
go to post Fabio Goncalves · Jun 15, 2016 Hi, After read all I didn't get exactly what you need. However, you can get all variables using ˆSPOOL. If you run the following command, which uses the device 2 (ˆSPOOL) you will get all variables on the global ˆSPOOL http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=... /* Writing to the ^SPOOL global */ OPEN 2 USE 2 WRITE CLOSE 2 /* Displaying the ^SPOOL global */ ZW ^SPOOL
go to post Fabio Goncalves · Jun 13, 2016 Hiyou can take a look at :%ZEN.Auxiliary.jsonProviderThis provider can give you a JSON object that allows you to serialize.Browse the class above via class reference and have a look at the methods bellow.http://docs.intersystems.com/cache201317/csp/documatic/%25CSP.Documatic.cls%WriteJSONFromObject%ObjectToJSONI hope it helps
go to post Fabio Goncalves · Jun 13, 2016 I usually add a HANG command when I want to start debugging Hang 15 And call the system or app which runs the specific class method, routine, csp, etc. This hang gives me some time to go to studio and attach my studio debug to that process according to the name.
go to post Fabio Goncalves · May 17, 2016 Hi Terri!Yes. It is possible. Yoy can take a look at Aviation.ReportDomain class on SAMPLES namespace where there is an example of SQL load. Also It is possible via $System.iKnow.IndexTable(). If you take a look at %SYSTEM.iKnow:IndexTable you will find an example of %iKnow.Source.SQL.Lister use.From the Administration Portal you can go to iKnow >Architect where there is some option to load SQL data and other Listers. (this resource is available from 2016.x)Another option is: http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...Regards
go to post Fabio Goncalves · May 16, 2016 Hello Daniel,Here in Brazil I am working with some APs and customers about the same issue. During some conversations on internal mail lists I got those inputs:1) The first recommendation in the chain is Zen Mojo if they want to use our offering. If they have web developers they should consider HTML development with JS frameworks like AngularJS, React and connect via JSON over REST.2) The bigger the application, the better a framework that suits more complex needs. You can build more complex systems with Zen Mojo, but after you hit a certain level of complexity it is better to leverage a less simplistic framework, like Angular or React. In general: If the customer or AP is able to build up and maintain knowledge in Angular or React, they should choose that path. If they are a Caché shop that wants to do web development, but can’t dedicate resources to it, they should choose Zen Mojo.3) If the customer or AP decision is to use the ZEN Mojo, they can use use multiple templates for desktop applications. Multiple templates has some disadivantages.4) We have already customers who have built complex desktop applications with Zen Mojo. Both used a generator approach, because that is what they used in their previous generation of their front-end. The Plugin Documentation is an example of a small desktop application.5) There is some nice content related to global summit 2016 wich uses some Angular examples 6) In general we release every 2.5 months.I have been discussing with those AP and customers the advantages and disadivantages and also demonstrating to them in pratice how both works. The final decission should be the AP or customer decisions according to their team, busineess and strategy.I hope it helps.
go to post Fabio Goncalves · May 16, 2016 Hi Sergio, I don´t know what exactly you are looking for, but you can take a look at both links bellow: http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=... http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=... I hope it helps.
go to post Fabio Goncalves · May 2, 2016 I am really interested in to know if just change my class definition from %Library.GlobalCharacterStream to %Stream.GlobalCharacter is needed considering that it has the same storage mechanism or there is some diferences where is needed to migrate data from %Library.GlobalCharacterStream to %Stream.GlobalCharacter by writing on the new %Stream.GlobalCharacter stream?Also when using SQL to insert, update and select %Stream.GlobalCharacter has the same behavior as the %Library.GlobalCharacterStream ?
go to post Fabio Goncalves · Apr 28, 2016 Hi Steve,When working with multiple plugins you may have the same control type on both, in order to resolve the conflicts you can implement the "onResolvePluginConflicts" client method on your Page where you will define which is your main plugin.Take a look bellow: /// This event handler callack is called when more than one plugin is registered with a/// <class>documentView</class> for the same control type./// /// In this case: $header and $control are registered both with the <class>corePlugin<class> and /// the <class>jQMPlugin</class>ClientMethod onResolvePluginConflicts(conflicts) [ Language = javascript ]{// Map all components to the jQM plugin,// the documentView automatically checks if it's possible.for (cmp in conflicts) {zenThis.setPluginMapping(cmp, 'jQM');}}I hope it helps.Best regards.
go to post Fabio Goncalves · Apr 27, 2016 Hi Alexandre, I have tested the following and it worked as mentioned above. Layout object: {type:'$containerFluid',children:[ {type:'$dropdown',id:'dropdown',key:'drop1',buttonGroup:true,content:'Default ',children:[ {type:'$dropdownMenuItem',content:'Action',value:'Action',key:'action'}, {type:'$dropdownMenuItem',content:'Another action',value:'Another action',key:'another-action'}, {type:'$dropdownMenuItem',content:'Something else here',value:'Something else here',key:'something-else-here'}, {type:'$dropdownMenuItem',divider:true}, {type:'$dropdownMenuItem',content:'A separated link',value:'A separated link'} ]}, ]} on your "onselect" javascript method you can add: case 'action': var selText = $('#dropdownbutton').text(); var value = mainView.getItemByKey(key).$getValue(); $('#dropdownButton .content').html(value+' <span class="caret"></span>'); $('#dropdownMenu').dropdown('toggle');; break; Results: Can you please try this? Thanks. Fábio.
go to post Fabio Goncalves · Apr 26, 2016 Hi,Another option is try to use the SQL Data Migration Wizard. You can copy just the data and or create the schema as well.To select the data from a specific Year, Customer, etc. you can create a view on the source side and then use the migration wizard to migrate to importe the data.I hope it helps.Fábio.
go to post Fabio Goncalves · Apr 26, 2016 Hi Joyce,It worked well on this version. Thank you very much!Best Regards.Fábio
go to post Fabio Goncalves · Apr 19, 2016 Sharing with all another example.Credits to Amir Samary. Class Sequence.Implementation Extends %RegisteredObject{/// SQL Example:/// select Sequence.NextVal('TEST')ClassMethod NextVal(pSeqName As %String, pContext As %String = "*") As %Integer [ SqlName = NextVal, SqlProc ]{set tSeqName = $ZConvert(pSeqName,"U")Set tContext = $ZConvert($Select(pContext'="":pContext,1:"*"),"U")Set seq = "" if $Data(^Sequence(tSeqName)) { set seq = $Increment(^Sequence(tSeqName,tContext)) Set %Sequence(tSeqName,tContext)=seq //For use by CurrVal() } else { throw ##class(%Exception.SQL).CreateFromSQLCODE("-460","Sequence does not exist") } Quit seq}/// SQL Example:/// select Sequence.CurrVal('TEST')/// WARNING: This will not work when called on the Management Portal since different processes/// on the CSP Gateway pool may be answering to the HTTP request to execute the query./// This should work properly vía ODBC/JDBC since a single process is kept open for us and should/// also work on $System.SQL.Shell().ClassMethod CurrVal(pSeqName As %String, pContext As %String = "*") As %Integer [ SqlName = CurrVal, SqlProc ]{set tSeqName = $ZConvert(pSeqName,"U")Set tContext = $ZConvert($Select(pContext'="":pContext,1:"*"),"U")Set seq = "" if $Data(%Sequence(tSeqName,tContext)) { set seq = %Sequence(tSeqName,tContext) } else { throw ##class(%Exception.SQL).CreateFromSQLCODE("-460","There is no current value for this sequence. Call NextVal() first.") } Quit seq}/// Create a new Sequence if it not exist. If the sequence exist, then return an error message/// Ejemplo de SQL:/// select Sequence.CreateSequence('TEST')ClassMethod CreateSequence(pSeqName As %String, pContext As %String = "*") As %String [ SqlName = CreateSequence, SqlProc ]{set tSeqName = $ZConvert(pSeqName,"U")Set tContext = $ZConvert($Select(pContext'="":pContext,1:"*"),"U") if $Data(^Sequence(tSeqName)) { throw ##class(%Exception.SQL).CreateFromSQLCODE("-460","Sequence already exists") } else { set ^Sequence(tSeqName) = "" set ^Sequence(tSeqName,tContext) = 0 } Quit 1}/// Drop a sequence if this exist, if it not exist, then return an error message/// Ejemplo de SQL:/// select Sequence.DropSequence('TEST')ClassMethod DropSequence(pSeqName As %String) As %String [ SqlName = DropSequence, SqlProc ]{set tSeqName = $ZConvert(pSeqName,"U") if $Data(^Sequence(tSeqName)) { Kill ^Sequence(tSeqName) Kill %Sequence(tSeqName) } else { throw ##class(%Exception.SQL).CreateFromSQLCODE("-460","Sequence does not exist") } Quit 1}}
go to post Fabio Goncalves · Apr 19, 2016 Not necessary. It was just a copy and paste. You can use a registered for this and just expose your classmethod as sqlproc.
go to post Fabio Goncalves · Apr 19, 2016 Hi Jue,I am trying to install AngularJS from http://oss.opensagres.fr/angularjs-eclipse/1.1.0/. I don´t really know if this is the right one if it suits on our Atleier version. However I have searched for some Angular JS pluging on Google and followed the instructions. I am trying to install from Atelier->Help->Install NewThis is the error that I am facing out:Cannot complete the install because of a conflicting dependency. Software being installed: AngularJS Eclipse 1.1.0.201511091212 (angularjs-eclipse-feature.feature.group 1.1.0.201511091212) Software currently installed: Eclipse Platform 4.5.2.v20160212-1500 (org.eclipse.platform.feature.group 4.5.2.v20160212-1500) Only one of the following can be installed at once: International Components for Unicode for Java (ICU4J) 54.1.1.v201501272100 (com.ibm.icu 54.1.1.v201501272100) International Components for Unicode for Java (ICU4J) 4.0.1.v20090415 (com.ibm.icu 4.0.1.v20090415) International Components for Unicode for Java (ICU4J) 4.0.1.v20090822 (com.ibm.icu 4.0.1.v20090822) Cannot satisfy dependency: From: AngularJS Eclipse 1.1.0.201511091212 (angularjs-eclipse-feature.feature.group 1.1.0.201511091212) To: org.eclipse.angularjs.core [1.1.0.201511091212] Cannot satisfy dependency: From: Eclipse AngularJS Core 1.1.0.201511091212 (org.eclipse.angularjs.core 1.1.0.201511091212) To: bundle org.eclipse.wst.validation 0.0.0 Cannot satisfy dependency: From: Eclipse e4 Rich Client Platform 1.4.1.v20160212-1350 (org.eclipse.e4.rcp.feature.group 1.4.1.v20160212-1350) To: com.ibm.icu [54.1.1.v201501272100] Cannot satisfy dependency: From: Java EMF Model Utilities 2.0.200.v200905140200 (org.eclipse.jem.util 2.0.200.v200905140200) To: bundle com.ibm.icu [3.8.1.1,4.1.0) Cannot satisfy dependency: From: Java EMF Model Utilities 2.0.201.v201001252130 (org.eclipse.jem.util 2.0.201.v201001252130) To: bundle com.ibm.icu [3.8.1.1,4.1.0) Cannot satisfy dependency: From: Eclipse Platform 4.5.2.v20160212-1500 (org.eclipse.platform.feature.group 4.5.2.v20160212-1500) To: org.eclipse.rcp.feature.group [4.5.2.v20160212-1500] Cannot satisfy dependency: From: Eclipse RCP 4.5.2.v20160212-1500 (org.eclipse.rcp.feature.group 4.5.2.v20160212-1500) To: org.eclipse.e4.rcp.feature.group [1.4.1.v20160212-1350] Cannot satisfy dependency: From: Common Frameworks 1.1.300.v200904160730 (org.eclipse.wst.common.frameworks 1.1.300.v200904160730) To: bundle org.eclipse.jem.util [2.0.100,3.0.0) Cannot satisfy dependency: From: Validation Framework 1.2.102.v200905201610 (org.eclipse.wst.validation 1.2.102.v200905201610) To: bundle org.eclipse.wst.common.frameworks [1.1.200,2.0.0) Cannot satisfy dependency: From: Validation Framework 1.2.104.v200911120201 (org.eclipse.wst.validation 1.2.104.v200911120201) To: bundle org.eclipse.wst.common.frameworks [1.1.200,2.0.0) It takes a while longer trying to compute 15 alternative solutions by itself and then pops up the error message above. Thanks.
go to post Fabio Goncalves · Apr 15, 2016 Hi Steffan,I though about have those header and footer layouts stashed and or loaded dinamically so that it can be injected the other pages/layouts when needed. Could you please provide me more details about how to have this menu logic in a central method, as you mentioned? I have adviced them to use Multiple Templates (Dynamic Dispatch) in order to have the code more organized and easy to maintain. Thanks.
go to post Fabio Goncalves · Apr 15, 2016 I thought about stash the header and footer and inject this code on the layouts when needed . Also they would likje to control the active option, for instance, or have a history bar right bellow the menu. I am really interested in advice to them the best approach and I am worried about do not make simple things became a monster in order to get difficult for maintanance, etc.