Results 1 to 3 of 3

Thread: Problem with userProperties

  1. #1
    ankurankan is offline Junior Member
    Join Date
    May 2012
    Posts
    7
    Rep Power
    2

    Default 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??

  2. #2
    tdesorbaix is offline Zimlet Guru & Moderator
    Join Date
    Apr 2007
    Location
    Paris, France
    Posts
    365
    Rep Power
    8

    Default

    You must add a boolean at "true" as a third parameter to setUserProperty to save the properties.

  3. #3
    ychaouche is offline Senior Member
    Join Date
    Jul 2012
    Location
    Algiers
    Posts
    55
    Rep Power
    2

    Default

    There's also a saveUserProperties method that could be called Zimlet JavaScript API Reference - ZmZimletBase

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 04-12-2010, 12:13 PM
  2. How Do I Clear a Zimlet's UserProperties
    By DarrenF in forum Zimlets
    Replies: 1
    Last Post: 10-30-2008, 01:34 AM
  3. visible not working in userproperties
    By anands in forum Zimlets
    Replies: 2
    Last Post: 10-27-2008, 10:26 AM
  4. Where Zimbra stores userProperties?
    By mps in forum Zimlets
    Replies: 4
    Last Post: 04-24-2007, 01:29 AM
  5. Replies: 1
    Last Post: 02-14-2007, 01:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •