[
https://issues.apache.org/jira/browse/SHINDIG-1788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Geer updated SHINDIG-1788:
--------------------------------
Description:
Templates that are defined inline are accessible from the os.getTemplate method
call. Templates that are defined in a Template Library or in the Module header
are not accessible. Inline templates process through and eventually get sent to
os.registerTemplate, non-inline templates make it to
os.Loader.processTemplateNode where they don't go any further (if the template
has a tag, which follows the opensocial doc examples). If the template doesn't
have a tag and only a name, it looks like it might work. I didn't see a name
attribute included in the Open Social template spec anywhere though. Is that
valid instead of "tag"?
Non-inline templates seem to work declaratively but not through the API.
Example TemplateLibrary file
<?xml version="1.0" encoding="UTF-8"?>
<Templates xmlns:acct="http://www.foo.com/templates/accounts">
<Namespace prefix="acct" url="http://www.foo.com/templates/accounts"/>
<Template tag="acct:AccountList">
<table cellpadding="0" cellspacing="0" border="0" class="table
table-striped table-bordered" id="tblAccounts">
<thead>
<tr>
<th width="10">ID</th>
<th width="200">Name</th>
<th class="edit"></th>
</tr>
</thead>
<tbody>
<tr repeat="${Top.Account}">
<td>${Cur.Key}</td>
<td>${Cur.Name}</td>
<td>
<input type="hidden" value="${Cur.id}"/>
<button onclick="editAccount('${Cur.id}');" class="btn
editAccount">edit</button>
</td>
</tr>
</tbody>
</table>
</Template>
</Templates>
was:
Templates that are defined inline are accessible from the os.getTemplate method
call. Templates that are defined in a Template Library or in the Module header
are not accessible. Inline templates process through and eventually get sent to
os.registerTemplate, non-inline templates make it to
os.Loader.processTemplateNode where they don't go any further.
Non-inline templates seem to work declaratively but not through the API.
> Non-inline templates are not accessible from os.getTemplate JavaScript
> ----------------------------------------------------------------------
>
> Key: SHINDIG-1788
> URL: https://issues.apache.org/jira/browse/SHINDIG-1788
> Project: Shindig
> Issue Type: Bug
> Components: Javascript
> Affects Versions: 2.5.0-beta1
> Reporter: Chris Geer
>
> Templates that are defined inline are accessible from the os.getTemplate
> method call. Templates that are defined in a Template Library or in the
> Module header are not accessible. Inline templates process through and
> eventually get sent to os.registerTemplate, non-inline templates make it to
> os.Loader.processTemplateNode where they don't go any further (if the
> template has a tag, which follows the opensocial doc examples). If the
> template doesn't have a tag and only a name, it looks like it might work. I
> didn't see a name attribute included in the Open Social template spec
> anywhere though. Is that valid instead of "tag"?
> Non-inline templates seem to work declaratively but not through the API.
> Example TemplateLibrary file
> <?xml version="1.0" encoding="UTF-8"?>
> <Templates xmlns:acct="http://www.foo.com/templates/accounts">
> <Namespace prefix="acct" url="http://www.foo.com/templates/accounts"/>
> <Template tag="acct:AccountList">
> <table cellpadding="0" cellspacing="0" border="0" class="table
> table-striped table-bordered" id="tblAccounts">
> <thead>
> <tr>
> <th width="10">ID</th>
> <th width="200">Name</th>
> <th class="edit"></th>
> </tr>
> </thead>
> <tbody>
> <tr repeat="${Top.Account}">
> <td>${Cur.Key}</td>
> <td>${Cur.Name}</td>
> <td>
> <input type="hidden" value="${Cur.id}"/>
> <button onclick="editAccount('${Cur.id}');"
> class="btn editAccount">edit</button>
> </td>
> </tr>
> </tbody>
> </table>
> </Template>
> </Templates>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira