0
votes

I have a simple question:

I have a ViewPanel with my view and I have 3 button (action button) named

  • REMOVE ENTRY
  • MARK UNREAD
  • MARK READ

every 3 action execute a partial Update of my View after SSJS routine

  • REMOVE ENTRY: call a simple SSJS doc.remove(true);, but my ViewPanel show the entry after the refresh of this action (But if you execute another partial refresh the entry isn't correctly show into ViewPanel)
  • MARK READ: call a simple SSJS document1.getDocument().markRead(); and work correctly after the partial refresh of button event handler!
  • MARK UNREAD: call a simple SSJS document1.getDocument().markUnread(); but I have same problem of the action REMOVE ENTRY (after the event handler automatically partial refresh of BUTTON i don't see any change into ViewPanel...I need to execute another partial update after...and I see unreaded the entry)

Have someone any suggest?

1
tnx you Per Henrik Lausten, I have update my asked...Daniele Grillo

1 Answers

1
votes

I had experienced the similar issue. I don't say the solution I found is good one.. but atleast it is working for me.

After finish of every action which you are performing on the viewpanel, inside the event handler try putting this code :

<xp:this.onComplete><![CDATA[XSP.partialRefreshGet("#{id:viewPanel1}", {
    onComplete: function() {
        //
    }
});]]></xp:this.onComplete>

This will refresh the view Panel, once your action gets finished.