Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If I'm reading your question correctly, this is just a timing issue: when you define client-side code and server code in the same event, the client-side code is always executed first. So it's refreshing your <code>dynamicContent</code> control <em>before</em> it executes the <code>navigator</code> event.</p> <p>Move the CSJS code to the <code>onComplete</code> property of the <code>eventHandler</code>. This property isn't surfaced in the "pretty panels" for events, so you'll need to navigate directly to the <code>&lt;xp:eventHandler /&gt;</code> tag (either in the Source XML or via the Outline), and you'll find <code>onComplete</code> listed under All Properties.</p> <p>Placing the refresh code in <code>onComplete</code> will ensure that the second refresh doesn't occur until <em>after</em> the first one is completed, which will allow the second target to reflect any changes triggered by the event.</p> <p><strong>Bonus tip:</strong> you can also chain refreshes:</p> <pre><code>XSP.partialRefreshGet("#{id:div1}", { onComplete: function() { XSP.partialRefreshGet("#{id:div2}", { onComplete: function() { XSP.partialRefreshGet("#{id:div3}", { onComplete: function() { XSP.partialRefreshGet("#{id:div4}"); } }); } }); } }); </code></pre> <p>This allows you to refresh as many targets as you want, but the same rule applies: if you need any of the targets to be "aware" of changes to data or components made within an event, you'll need to trigger the start of the chain in the <code>onComplete</code> attribute of that event, <em>not</em> as the client-side code of the event itself.</p>
    singulars
    1. This table or related slice is empty.
    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