on 12-21-2013 9:34 AM
Hi All,
I am working on workflow apps SUP 2.1.3 and I want to save one variable's value and the variable is in global scope of Util.js and then I want to use that variable in my Custom.js. I tried localStorage for saving the variable but it is not working. Some things which I am doubtful about are listed below
1. Is it ok If I edit Util.js file? (File is not getting regenerated while deployment).
2. Local storage works fine in Android Emulator?
Please reply and suggest what things could have gone wrong.
Thanks in Advance.
Hi Anupriya
Please disable the "Update generated code" when you generate, Also see the sequence of java script importing in "workflow_jQueryMobileLookAndFeel.html" (or other html file if you are using). If you have declared variable declaration in Utils.js, it should be initialized before Custom.js. Please refer the screenshot attached.
By default, Custom.js will be initialized before Util.js. So if you declare some variable in Util.js, the same variable will not able to find value in custom.js. So reorder the js importing.
I would suggest not to edit framework js files generated by SUP. You have a workaround for this, declare the variable in "workflow_jQueryMobileLookAndFeel.html" file itself.
Ex.
If you do this way, "variable" can be accessed all over the project.
Regards
Yokesvaran Kumarasamy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As in the file written since the file is not regenerated you can edit it and there is no need to uncheck "update generated code" since it is not being affected. So the question is why you want to edit this file. What you are trying to do ?
- Midhun VP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anu,
I never tried this actually but for one of queries:
1. Is it ok If I edit Util.js file? (File is not getting regenerated while deployment).
Generally it is not advisable to edit any js file except custom.js but if you want to edit other than this then to reflect the changes to your app you can uncheck Update Generated code under Generate package while assigning to any registered user(s).
Rgrds,
Jitendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.