Bài đăng

Đang hiển thị bài đăng từ Tháng 6, 2017

[sapui5] List binding remove application filter

Hi, I've search sapui5 API can find the function to remove all existing filter from sapui5 List Binding . Hence I need to find a workaround to reset the list binding (used in resetting search field). We have no function yet, so we need to empty the filter array by manual assignment: oListBinding.aApplicationFilters = []; oListBinding.sFilterParams = undefined; oListBinding.refresh(); We have some more method to empty an array, you can find here . p/s: Update on 02 Nov, 2017: to remove the filters, you just need to pass an empty array to the function: oListBinding.filter([]); This worked in SAPUI5 1.44 ---V---

[sapui5] Cannot get control by control Id? See this post

Hello guys, You maybe sometime frustrated when getting ID of controls of the sapui5 framework, I got the same problem too, when I was starting to work with sapui5. The root cause that I found the most is forgetting declaring ID for the fragment. Because as sapui5 guideline mentioned, unlike View, Fragment's ID  is not generated automatically by the framework. You have to do it by yourself when you initiate the fragment. If you forgot to do this, you won't be able to get the fragment (or controls inside it) using sap.ui.Core.byId() later. Remember to use this line of code when initiate fragment: sap.ui.core.Fragment ( sFragmentId ,  sId ) But if you use other function, be aware of the order: sap.ui.xmlfragment ( sId,  sFragmentId ,  , oController ) Example: this.oDialog = sap.ui.xmlfragment( "createProcessDialog","com.HQ.app.test..fragment.CreateProcessDialog", this); More details can be found here: https://sapui5.hana.ondemand.com/sdk/#doc

Tips & Best Pratice in Software Development

Testing in development: - We should add a comment above the code block where used as testing some instruction like: // Testing purpose: ... - Later, when we have done developing the project. We can use 'Search' function in the whole project to search the "testing purpose" instruction, then remove it if necessary. - This tips should be applied at the beginning of every project. ---V---

How to save your code in online noting tool

Hình ảnh
Hi guys, As a developer, you may have wondered how to save your code for later reference. There's some solution out there, but I would like to share my method that seems to be effective & convenient in this CLOUD era. 1. Copy your code. 2. Save on  https://repl.it/  (create your account first) 3. Copy the link generated. 4. Paste the link in Online Onenote. Onenote will generate the panel to contain the code (retrive from rep.it) 5. Enjoy. (You know what, you can have live demo with the panel in Onenote - amazing). At the present, the function generate panel/snippet from the link is only available for Onenote only. But I'm pretty sure that they will bring it to Onenote soon. Other noting tools like Evernote, Google keep... have the same function as well. ---V---

"Hành trình về Phương Đông" - Blaird T. Spalding - (Nguyên Phong dịch)

Hình ảnh
Đây là cuốn sách lôi cuốn mình trong mấy ngày qua. Thói quen mình là dành 15-30 phút trước khi đi ngủ để đọc sách; nhưng với cuốn này đã mở ra đọc thì đọc liên tù tì cả giờ sau mới đi ngủ, mà còn luyến tiếc. Cuốn sách như bìa sách bên phải mình đọc thì mình nghĩ là bản rút gọn, vì khá nhỏ gọn so với một bản lớn mà mình nghe bạn mình nói trước đây, nhưng nhìn chung cũng khá đầy đủ và khá hay với người mới bắt đầu. Ý mình bắt đầu ở đây là bắt đầu tìm hiểu về " khoa học tâm linh". Mình đến với cuốn sách này vì nó đã quá nổi tiếng chứ không rõ chi tiết nội dung của nó là gì. Chủ đề tâm linh là chủ đề mình chưa muốn tập trung tìm hiểu lúc này. Nhưng có lẽ duyên số  đã mang mình tới cuốn sách "thay đổi tư duy" này. Trước khi đến với "hành trình về phương đông", mình là một dân duy vật biến chứng điển hình, xuất thân từ nền giáo dục phổ thông Việt Nam và sau 4 năm ở trường Đại học khoa học tự nhiên. Mình luôn lấy phương pháp luận biến chứng để xem xét và gi

[sapui5] You should know about neo-app.json

Hình ảnh
This file is a configuration file in sapui5 project, which should be KNOWN by every developer. On function I used (actually it take me lots of time to figure it our) is the 'path' attribute of neo-app, which is some kind of shortcut to destination: For example: This neo-app.json has defined that "/app_safety_app" is the shortcut for destination name "app_safety_app" (this one is defined in your HcP or 'destination' in local web IDE). With this definition, you can make HTTPRequest (or ajax call) to external service without worrying about violating cross-domain policy (discussion about it can be found here ). Hence, it your code, you don't need to write the full URL, just pick this short URL with the shortcut in the beginning: Cheer! ---V---

Implement Search field with case-INSENSITIVE by SAP UI5

Hello guys, Continue to read if you're sapui5 developer, or you work closely with UI development. At the time I write this post, SAP UI5 and Odata does not support filter with case sensitivity. Odata provide some filter parameter that help you to filter with case-INSENSITIVe. However, you hardly modify the URI of ODATA service in your font end SAP UI5 code. Most of us use API provided from SAP , we only provide the parameter to API function, then let the API from SAPUI5 library handle the ODATA service URL. In short, I mean we cannot, or hardly, modifying the odata GET request as we want, but use the standard API instead. Return to the main topic, we need to write a function to filter the ODATA get request so that we get the returned data filtered as the way we want (filter with case-INSENSITIVE). For example: you type " test " in the search field, then you should get the results with all the entries containing "test", or "Test", or "TES

Xbox One X có thể trở thành một cái máy tính và hơn thế nữa

Hình ảnh
Xbox One X đã ra mắt, so với những thông tin do chính Microsoft rò rỉ trước đó thì không có nhiều điểm là chúng ta ngạc nhiên . Nhưng điểm thú vị ở đây đó là  Xbox One X  giờ đang có vị trí cực kì thuận lợi, kết hợp với thời điểm tốt và một tầm nhìn tốt để trở thành một chiếc máy tính làm được gần như mọi việc, từ chơi game, điều khiển nhà thông minh cho đến đầu setup box để giải trí hay tiến xa hơn là thay luôn cho cái máy tính bình thường. Sự hội tụ của  Windows 10 Xbox One  X chạy một hệ điều hành Xbox OS riêng, nhưng nền tảng này lại được xây dựng trên Windows 10 nên sẽ không khó để nó có thể làm được những thứ mà một chiếc máy tính có thể làm. Con CPU của sản phẩm lại sử dụng cùng nhân x86 nhưng được tùy biến lại cho phù hợp với nhu cầu hiệu năng cao. Vậy thì Xbox One X giờ đâu có khác gì so với một cái máy tính của bạn, à có khác là có mạnh hơn và giá chỉ 500$ mà thôi. Nếu một ngày nào đó  Microsoft  cho phép Xbox chạy app desktop đầy đủ thì chắc là sẽ có nhiều người đến mua lắm

Setup customized destination for local SAP Web IDE

Follow instruction in: https://www.sap.com/documents/2015/08/484b6d95-5b7c-0010-82c7-eda71af511fa.html# i'm wondering if because of Bosch's firewall has blocked the connection of local web IDE to the external ODATA service like Northwind. Will try when I back home. ---V---

Be careful to pick the right region for your SAP HANA Cloud

Hình ảnh
I've lost the whole morning to figure out why all of my joined domain get disappeared in SAP HANA cloud platform. SAP appy  pretty well the new Fiori UX to their end user, but it is not done very well with the SAP HANA Cloud cockpit. It make me confused and don't know what is the reason for my problem. OK, here the story: I login my account to continue my working pending from yesterday, but I can't found my working folder with my team like yesterday, which should be like this: Instead, I got the default log in screen like this: At first, I think SAP HcP mis-understand with my trial account. (I have 2 account: partner account to dev app and trial account for my discovery). Hence, I tried to log in again many times. But not working. Then I delete all history & cookies of history, log in again but not work. I have to restart my computer, but nothing work... Having no clues, I read about user type of SAP HcP. Then and see this key word: Region Sudden

How to Find and Replace Words in Multiple Files

Hình ảnh
What do you do if you have to replace a single word in dozens, or even hundreds or thousands, of text files? You keep calm and download  Notepad++  or  Replace Text . These two utilities will do the job in seconds. It’s a dilemma common among developers and programmers. Imagine you’re managing a project with hundreds or thousands of files. When a product name that appears on almost every page changes, you can hardly go through each page to manually search and change the name. No, you’re smarter than that. You fire up Google, you find this article, and you learn about a solution that only takes seconds. How to Edit Multiple Files in Bulk You can either use Notepad++ or a dedicated tool called Replace Text to  bulk-edit  your files. Notepad++ First, allow Notepad++ to find the word in all the files you need to edit. Open Notepad++ and go to  Search > Find in Files…  or press  CTRL+SHIFT+F . This opes the Find in Files menu. Under  Find what: , enter the word or phrase