Georg Kastenhofer
Georg Kastenhofer

Reputation: 1427

XPages - dojo IO Pipelines in combination with ExtLib xe:namepicker

I have a big problem using dojo IO Pipelines in combination with ExtLib Controls (e.g. xe:namepicker) in Domino 9.0.1 FP3.

For illustration here two scenarios....

The XPage code for the first scenario (without xe:namepicker):

<xp:this.properties>
    <xp:parameter name="xsp.client.script.dojo.djConfig" value="ioPublish:true"></xp:parameter>
</xp:this.properties>

<xp:button value="Partial Refresh" id="button1">
    <xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="main" execMode="partial">
        <xp:this.onComplete><![CDATA[doPartialRefreshOf(['tagCloud1', 'tagCloud2']); ]]></xp:this.onComplete>
    </xp:eventHandler>
</xp:button>

<xp:panel id="main" style="background-color:rgb(0,255,64);">CONTENT</xp:panel>
<xp:panel id="tagCloud1" style="background-color:rgb(255,128,0)">TAGCLOUD1</xp:panel>
<xp:panel id="tagCloud2" style="background-color:rgb(128,0,255)">TAGCLOUD2</xp:panel>

<xp:eventHandler event="onClientLoad" submit="false">
        <xp:this.script><![CDATA[dojo.subscribe("/dojo/io/start", function(data){
    console.log("triggered on /dojo/io/start channel");
});
dojo.subscribe("/dojo/io/stop", function(data){
    console.log("triggered on /dojo/io/stop channel");
});]]></xp:this.script>
</xp:eventHandler>

Click on the button “Partial Refresh” results in the following output (on Firebug console):

triggered on /dojo/io/stop channel

POST...main

GET...tagCloud1

GET...tagCloud2

triggered on /dojo/io/stop channel

All works perfect!


The XPage code for the second scenario (with xe:namepicker):

<xp:this.properties>
    <xp:parameter name="xsp.client.script.dojo.djConfig" value="ioPublish:true"></xp:parameter>
</xp:this.properties>

<xp:button value="Partial Refresh" id="button1">
    <xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="main" execMode="partial">
        <xp:this.onComplete><![CDATA[doPartialRefreshOf(['tagCloud1', 'tagCloud2']); ]]></xp:this.onComplete>
    </xp:eventHandler>
</xp:button>

<xe:namePicker id="namePicker1" for="inputText1" pickerText="NamePicker"></xe:namePicker>

<xp:panel id="main" style="background-color:rgb(0,255,64);">CONTENT</xp:panel>
<xp:panel id="tagCloud1" style="background-color:rgb(255,128,0)">TAGCLOUD1</xp:panel>
<xp:panel id="tagCloud2" style="background-color:rgb(128,0,255)">TAGCLOUD2</xp:panel>

<xp:eventHandler event="onClientLoad" submit="false">
        <xp:this.script><![CDATA[dojo.subscribe("/dojo/io/start", function(data){
    console.log("triggered on /dojo/io/start channel");
});
dojo.subscribe("/dojo/io/stop", function(data){
    console.log("triggered on /dojo/io/stop channel");
});]]></xp:this.script>
</xp:eventHandler>

Click on the button “Partial Refresh” results in the following output (on Firebug console):

POST...main

GET...tagCloud1

GET...tagCloud2

As you can see, there is no output (/dojo/io/...) on the firebug console (dojo/io channels will not be triggered..)!


Both scenarios are working perfect in Domino 8.5.3 FP6 + Lotus Domino Upgrade Pack.


Any hints/advices how to solve this problem?

Thanks in advance

Georg

Upvotes: 0

Views: 145

Answers (1)

Brian Gleeson - IBM
Brian Gleeson - IBM

Reputation: 2565

9.0.1FP3 contains Dojo v1.9.4, and dojo/io has been deprecated since dojo 1.8. This may be part of the problem. See here: http://dojotoolkit.org/reference-guide/1.9/dojo/io.html

You could try using dojo/request instead, as suggested in that link. I'm not really familiar with the old IO or the new request packages though, so you would need to do some investgiation.

Upvotes: 0

Related Questions