Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    adding context variable to a snippet

    I'm trying to use the issnippet dsRequest.addToTemplate parameter to add text derived in a server side SQLDataSource.executeFetch(...) directly to another template context. I have found examples where issnippet is used to add txt to a ds.xml operation binding but am struggling extending this to other template contexts. Can this be done?

    i.e. In this example, $moreStuff is not getting evaluated.

    In my SQLDataSource.executeFetch(...) method:
    Code:
    dsrequest.addToTemplateContext("moreStuff", " AND PK in (1,2,3) ");
    
    String stringCreatedElseWhere = "JOIN MyTable $moreStuff";
    dsrequest.addToTemplateContext("additionalJoins", stringCreatedElseWhere ,  true);
    in the ds.xml file:
    Code:
    <tableClause>
    $defaultTableClause $rawValue.additionalJoins
    </tableClause>

    #2
    It's just $additionalJoins (no $rawValue prefix).

    Comment

    Working...
    X