on 01-03-2015 1:07 PM
Hi all,
I have developed a small application for practice which has login screen and once logged there will be sign out button.following are my questions
Thanks
Deepan
Hi Deepan
In this example, we show that we can use a model to clear the value of a dialog. You may want to adapt it to your case. Of course, you can clear the value. However, we always advocate using model so that we have the MVC in place; and make your implementation cleaner. That's it does not matter, you have using a input control or other controls. So long as the value in the model is clear, the value of the control will be clear accordingly.
Hope this helps.
Thanks
-D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Deepan,
For clearing a variable, here is an example using an input control, button, and function. Let's say the input control and button are defined in the XML view as follows,
<Input id="idInput" value="User" />
<Button press="handleLogOut" />
In the controller's handleLogOut function, you can get the view, get the input control by id, and set the value:
handleLogOut : function(){
this.getView().byId("idInput").setValue("");
}
For duplicate controls, it sounds like duplicate ids are being created. This could happen if you use the same id="x" in an XML view or if controls are being created programmatically with duplicate ids.
For performance tips...that's a good question. Usually, we troubleshoot poorly performing examples, but it would be good to locate a collection of best practices.
Regards,
Scott
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.