Linux iTOps Tube

Friday, 29 June 2012

Problem with userProperties

In my zimlet I get some usernames and password from the user and save it using the setUserProperty.




HTML Code:


this.setUserProperty("server1_baseurl", server1_baseurl);

        this.setUserProperty("server1_username", server1_username);

        this.setUserProperty("server1_password", server1_password);

        this.setUserProperty("server2_baseurl",  server2_baseurl );

        this.setUserProperty("server2_username", server2_username);

        this.setUserProperty("server2_password", server2_password);

        this.setUserProperty("server3_baseurl", server3_baseurl);

        this.getUserProperty("server3_username", server3_username);

        this.getUserProperty("server3_password", server3_password);

        this.setUserProperty("server4_baseurl",  server4_baseurl);

        this.setUserProperty("server4_username", server4_username);

        this.setUserProperty("server4_password", server4_password);

        this.setUserProperty("server5_baseurl", server5_baseurl);

        this.setUserProperty("server5_username", server5_username);

        this.setUserProperty("server5_password", server5_password);


When I test that if this is saved using the following code:




HTML Code:


this.testView = new DwtComposite({parent:this.getShell()});

        this.testView.setSize("400","400");

        this.testView.getHtmlElement().style.overflow = "auto";

        this.testView.setPosition(DwtControl.RELATIVE_STYLE);

        this.testView.getHtmlElement().innerHTML = "<div>" + this.getUserProperty("server1_baseurl") + this.getUserProperty("server1_username") + this.getUserProperty("server1_password")+ "</div>" + "<div>" + this.getUserProperty("server2_baseurl") + this.getUserProperty("server2_username") + this.getUserProperty("server2_password") + "</div>";

        this.testViewDlg = this._createDialog({title:"test", view :this.testView ,standardButtons: [DwtDialog.OK_BUTTON]});

        this.testViewDlg.popup();


It works fine and shows the values entered by the user. But when I refresh the page and again check the values the values are gone and the above test shows nothing.



What could be the problem??




No comments:

Post a Comment