Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Have you tried using dataContexts to define your datasource? I believe dataContext is a global object.</p> <p><strong>Update:</strong> dataContexts or even dominoDocument datasource worked when saving a document, but the problem was that the values were not saved. I therefore used a viewScope variable to store the values and that did the trick. I am not sure if this will help you, but here you go, this works for me:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex"&gt; &lt;xp:this.data&gt; &lt;xp:dominoDocument var="newDoc" formName="frmContact"&gt;&lt;/xp:dominoDocument&gt; &lt;/xp:this.data&gt; &lt;xp:inputText id="inputText1" value="#{viewScope.firstName}"&gt;&lt;/xp:inputText&gt; &lt;xp:inputText id="inputText2" value="#{viewScope.lastName}"&gt;&lt;/xp:inputText&gt; &lt;xp:button value="Label" id="button1"&gt; &lt;xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="dialog1"&gt; &lt;xp:this.action&gt;&lt;![CDATA[#{javascript:getComponent("dialog1").show();}]]&gt;&lt;/xp:this.action&gt; &lt;/xp:eventHandler&gt; &lt;/xp:button&gt; &lt;xe:dialog id="dialog1"&gt; &lt;xp:button value="Label" id="button2"&gt; &lt;xp:eventHandler event="onclick" submit="true" refreshMode="complete"&gt; &lt;xp:this.action&gt;&lt;![CDATA[#{javascript:newDoc.replaceItemValue("fldFirstName", viewScope.firstName); newDoc.replaceItemValue("fldLastName", viewScope.lastName); newDoc.save(); getComponent("dialog1").hide();}]]&gt;&lt;/xp:this.action&gt; &lt;/xp:eventHandler&gt; &lt;/xp:button&gt; &lt;/xe:dialog&gt; &lt;/xp:view&gt; </code></pre> <p>Hope this helps!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload