Customer Portal

access a Dictionary in Java

Comments 2

  • Avatar
    imriskal
    0
    Comment actions Permalink
    Hi,

    The common syntax in CTL would look like this:
    dictionary.myEntry["retry"] = "myValue";

    When you type this into a CTL editor, you have an option to convert your CTL code into Java code, see the screenshot.
    convert.png
    Converting the CTL code above, you will get the following:
    java.util.Map<java.lang.String,java.lang.String> tmpVar0 = CTLUtils.toMap(getGraph().getDictionary().getValue("myEntry"), java.lang.String.class);

    boolean tmpVar1 = false;

    if (tmpVar0 == null) {
    tmpVar0 = new java.util.LinkedHashMap<java.lang.String,java.lang.String>();
    tmpVar1 = true;
    }

    tmpVar0.put("retry", "myValue");

    if (tmpVar1) {
    getGraph().getDictionary().setValue("myEntry", tmpVar0);
    }

    Hope this helps.
  • Avatar
    cloverdm
    0
    Comment actions Permalink
    :) Thanks ,really helped.

Please sign in to leave a comment.