Do you have an example posted of a SDK 2 app that adds an entry to its "Gear" menu and allows the user to save settings to a preference object via a dialog window?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
The short answer is that right now that is not possible.
We are trying to figure out the best way to allow users to interact with setting from inside of a custom App. Since each App is sandboxed inside of an IFrame no App code can interact with the gear menu (since it is outside of your frame).
In the future we are looking into ways to make custom Apps and Rally Apps interact with Settings in a unified way.
If you are looking to store settings you can check into the documentation for the App object. In the 2.0p2 version of the SDK we added some functionality to help you manage settings on your Apps. Right now all custom Apps will have to provide their own interface to access settings.
I ended up using the ExtJS CookieProvider to save my app's state. By using cookies the settings are per user, and I also made them per-project. My code within the App class looks like this:
To use it, just call this.session() to get the state, and saveSession() to merge the state back in. Works great!
It will even work in dev mode. Note that Chrome (and other browsers?) will not save cookies in file:// mode unless you tell it to.