XPages and materialize-tags plugin
<p>I am trying to implement the following plugin in a bootstrap 3 modal in XPages. I've got really close but I'm stuck at one point and I'm at a loss what to do. Hoping someone can point me in the right direction.</p>

<p>This is the plugin: <a href="http://henrychavez.github.io/materialize-tags/examples/" rel="nofollow">http://henrychavez.github.io/materialize-tags/examples/</a></p>

<p>The goal is that when I click on a row in a repeat control, it opens a modal and the KeywordList field for that document is displayed in the modal (using the tags/material design chips).</p>

<p>Here's my call to the modal:</p>

<pre><code>&lt;xp:this.attrs&gt;
&lt;xp:attr name="data-toggle" value="modal"&gt;
&lt;/xp:attr&gt;
&lt;xp:attr name="data-keyboard" value="false"&gt;
&lt;/xp:attr&gt;
&lt;xp:attr name="data-backdrop" value="static"&gt;
&lt;/xp:attr&gt;
&lt;xp:attr name="data-target" value="#editKeywordModal"&gt;
    &lt;/xp:attr&gt;
&lt;/xp:this.attrs&gt;
&lt;xp:eventHandler event="onclick" submit="true"  refreshMode="partial" refreshId="pnlRequests"&gt;
    &lt;xp:this.action&gt;&lt;![CDATA[#{javascript: var db:NotesDatabase = session.getDatabase(sessionScope.serverPath,sessionScope.requestsdbName);
var unid = rowData.getUniversalID(); 
viewScope.keyworddocUNID = unid;}]]&gt;&lt;/xp:this.action&gt;
&lt;xp:this.onComplete&gt;
var id = "#{id:pnlConfigKeywordListModal}"
XSP.partialRefreshGet(id,{
onComplete: function(){
$('#editKeywordModal').modal('show');
}});
&lt;/xp:this.onComplete&gt;
&lt;/xp:eventHandler&gt;
</code></pre>

<p>and inside the modal (editKeywordModal), inside a panel (pnlConfigKeywordListModal) is my field to display the keyword. configkeywordDoc is the document datasource corresponding to row I clicked:</p>

<pre><code>&lt;xp:inputText type="text" value="#{configkeywordDoc.KeywordList}" id="inputText1"&gt;
        &lt;xp:this.attrs&gt;
            &lt;xp:attr name="data-role" value="materialtags"&gt;&lt;/xp:attr&gt;
        &lt;/xp:this.attrs&gt;
&lt;/xp:inputText&gt;
</code></pre>

<p>It works great if I have a static list. However, when I perform a partial refresh on that modal before opening it, it flashes for a second as it opens (I can see the chips) and then I lose the tags/chips and they display as a comma separated string in the input text field.</p>

<p>Any ideas appreciated...</p>

<p>Thanks so much in advance.</p>

<p>Regards,</p>

<p>Dan</p>