How to initiate a partial refresh from a dijit.tree?

On an XPage I have a dojo.dijitree module which uses a Notes View as the datastore.

I have the universal ID of the referring document available for each item in my tree widget.

What I would like to do know is when some clicks on an item that a part of the content on the XPage gets refreshed with a part (data field) of the referring document. But I am not sure how to do this.

The only thing I have is an onclick event on my tree-item.

When I have have a button with the partical refresh enabled it says:

<xp:eventHandler event=”onclick” submit=”true” refreshMode=”partial” refreshId=”PaneToRefresh”>

Then I can place an server side action like:


If I place this action under my script I get the problem indication:

The markup tag script can only contain controls and markup tags.

So if you have a clue how to place a partial refresh under a ‘normal’ script that collects data from a document somewhere else then I would be greatful to hear it from you…


About these ads

Born in Holland, current country of residence is Sweden. IBM Notes Consultant since 1997. Main focus is Xpages development. Other interests: computers, motorcycles, music (bass guitar) & cooking.

Posted in Dojo, XPages
5 comments on “How to initiate a partial refresh from a dijit.tree?
  1. Jeremy Hodge says:

    What I do is have a button (for example named “refreshnow_button”) set up to do the partial refresh i want, with the following CSS to hide the button from the user:


    then, when I want to do the partial refresh from a client side script, i enter the following in the “client” event:

    dojo.byId(“#{javascript:getClientId(‘refreshnow_button’)}”).click() … wallah …

    depending on what (else) is going on around it in the script, you might find it helpful to put it in a setTimeout() as well, which will execute the script in X milliseconds, like this:

    setTimeout(“dojo.byId(\”#{javascript:getClientId(‘refreshnow_button’)}\”).click()”, 1000)

    Hope that Helps!

  2. Jeremy Hodge says:

    … hmm … obviously the “… wallah …” is not part of the code ;)

  3. hej Jeremy, thanks for the tip but it does not seem to work for me (yet).

    I just have added a simple alert() command under the button. pushing the button straight causes the alert to occur, but trying to call the alert by invoking the button via a script does not seem to work :-?

    probably i am doing something wrong here…

  4. Tim Tripcony says:

    Patrick, I’ll give you a hint:

    XSP._firePartialRefreshEvent(“axfull”,””, “”,targetId,””,””,targetId,””,true,true,true);

    I’m not sure why the ID to be refreshed has to be passed twice, but it does.

  5. Jeremy Hodge says:

    Tim … I don’t believe that the _firePartialRefreshEvent(…) is _forward_ compatible…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

I am Patrick Kwinten. I am a IBM Notes Domino Product Specialist since 1996. With this blog I am trying to give my contribution to the community.

The posts in this blog project my personal opinions, not the company I work for.

C U in Orlando


Follow my projects on OpenNTF. Below are some examples:

RSS Feed

Get every new post delivered to your Inbox.

Join 245 other followers

%d bloggers like this: