Results 1 to 10 of 10

Thread: Problem reading config_template.xml from .js

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Posts
    4
    Rep Power
    9

    Default Problem reading config_template.xml from .js

    Hello,

    I'm trying to read a global property define in config_template.xml but I'm always getting value undefined. My config_template.xml looks as follows:
    Code:
    <zimletConfig name="net_mydomain_myzimlet" version="0.4">
     <global>
      <property name="allowedDomains">*.mydomain.net</property>
      <property name="outputStyle">graphical</property>
     </global>
    </zimletConfig>
    Now I'm trying to read the value of the global property 'ouputStyle' as follows in my javascript:

    Code:
     
    Net_Mydomain_Myzimlet._handleResponse =
        function(cnvsInfo, result)
    {
        ...
    style = this.getConfigProperty("global.outputStyle");
        ...
    or
    Code:
     
    Net_Mydomain_Myzimlet._handleResponse =
        function(cnvsInfo, result)
    {
       ...
    style = this.getConfigProperty("outputStyle");
       ...
    but both of them return 'undefined'.

    What I'm doing wrong?

  2. #2
    Join Date
    Apr 2006
    Posts
    50
    Rep Power
    9

    Default

    Did you ever resolve this or does anyone know the solution. I am having the same problem.

    Cheers,

    RioGD

  3. #3
    Join Date
    Nov 2006
    Posts
    4
    Rep Power
    9

    Default

    Hi,

    Never got any replies to this issue. It's still unsolved as the feature was not so important for me at that time.

    Anyway, if you find a solution, please, let me know. It would probably be useful in the future.

  4. #4
    Join Date
    Apr 2006
    Posts
    50
    Rep Power
    9

    Default

    Temporarily, as a workaround, I have hardcoded the config values in the .js file. I must say though that it does seem strange no one else has documented this problem. Also it seems that allowedDomains is not working for me either (config or COS set values on the server).

    Good luck and I will give you an update if I figure out the problem. And I encourage anyone reading this who has ideas to let us know as well!

    Cheers,

    RioGD

  5. #5
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    10

    Default

    Quote Originally Posted by riogd View Post
    Temporarily, as a workaround, I have hardcoded the config values in the .js file. I must say though that it does seem strange no one else has documented this problem. Also it seems that allowedDomains is not working for me either (config or COS set values on the server).

    Good luck and I will give you an update if I figure out the problem. And I encourage anyone reading this who has ideas to let us know as well!

    Cheers,

    RioGD
    I am working on a book on zimlets right now, and I have not seen the behavior that you are listing. Are you sure that you are incrementing your version number in the zimlet cfg each time? Take a look at the mailbox.log after doing a zmzimletctl deploy

  6. #6
    Join Date
    Nov 2006
    Posts
    4
    Rep Power
    9

    Default

    Hello,

    At least in my case changing the config version number didn't help.

    However, allowedDomains is working in my case.

    Anyway, thanks for the hint! I didn't realize that there was a log file that could have some info. I'll check it soon.

Similar Threads

  1. Problem with reading the html email templates
    By Anuradha in forum Developers
    Replies: 4
    Last Post: 08-31-2006, 11:22 PM
  2. Is it started or not
    By kwelipatton in forum Installation
    Replies: 10
    Last Post: 03-28-2006, 11:11 PM
  3. Move server to different OS
    By EriSan500 in forum Administrators
    Replies: 7
    Last Post: 03-05-2006, 01:00 PM
  4. Reading attachments problem
    By lenjacobs in forum Users
    Replies: 2
    Last Post: 12-27-2005, 11:24 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
  •