查找

記事
· 2017年5月6日 2m read

Let's write an Angular 1.x app with a Caché REST backend - Part 11

In our last lesson, we added a form to Edit our existing Widgets, and save them back to the server.  However, our Form was not well structured and our Save button had no intelligence, and was not fully visible.  So today, we will apply some Material components and Angular style to make the form more useful

Let's open EditWidget.csp, and make some changes.  First, we want to change the component from an md-card to an md-dialog.  We then want to wrap the content in a div so we can set the layout to "column" so the controls display in a vertical list, and also a Form which enables Angular to verify the state of the form.

Next we will mark the Name and Description as required, which can set the $valid and $invalid states of the form.  We can then use this to control the disabling of the Save button, which we will apply an md-raised style to.  Let's take a look at the code, with the changes highlighted

How does this look now?  We now have a well structured form, and if we remove one of our Required fields, our Save button disables and we can't save the Widget until we reinstate the mandatory data. We also get a visible marker of the fields which are marked as mandatory.

The form still looks a little bare though, so we can add a Toolbar to show the operation and basic information of the selected Widget

And now, we have a better looking form

Today we:

  1. Changed our form to an md-dialog
  2. Used the layout directive to control the flow of the page
  3. Added form validation and used to control the Save button
  4. Added a toolbar to the form

Next time we will:

  • experience some shake ups at Widgets Direct

This article is part of a multi-part series on using Angular on top of Caché REST services.  The listing of the full series can be found at the Start Here page

ディスカッション (0)2
続けるにはログインするか新規登録を行ってください
質問
· 2017年4月25日

uu-encoded?

We have a vendor that can only send us a uu-encoded PDF. Is there a way to decrypt it in Ensemble?

Thanks

Scott Roth

The Ohio State University Wexner Medical Center

3 Comments
ディスカッション (3)2
続けるにはログインするか新規登録を行ってください
質問
· 2017年4月24日

How to change the user of the $ZF user

Hi I've created a word macro in order to convert doc to txt via the command line, this works fine via the command line by myself or another user but when I try as an the intersystems user which runs under  LocalSystem it doesn't work. 

So can I change the user, or set the $ZF to run as a different user?

Or do I have to try another way to convert doc to txt - it's looking like libreOffice?

I just wanted to stick with word because I could be guaranteed on the result being accurate.

Thanks

Regards

Richard

11 Comments
ディスカッション (11)2
続けるにはログインするか新規登録を行ってください
質問
· 2017年4月22日

CacheLicense

when the "/apps/docmatic/%CSP.SysConnection.cls" gets hit.
If some page hit the above (%CSP.SysConnection) it consume license or not?

1 Comment
ディスカッション (1)1
続けるにはログインするか新規登録を行ってください
質問
· 2017年4月21日

Cache 5.02 License Error

Hi All,

    We are using the InterSystems cache 5.02
    We having 80 license unit but don't the reason 50 unit have been consumed (CSP unit)
    This happen because of this page ran frequently "/apps/docmatic/%CSP.SysConnection.cls"
    Can anyone explain why this page ran frequently and consume license?
    
Thanks,
Sansa.    
    

1 Comment
ディスカッション (1)0
続けるにはログインするか新規登録を行ってください