0

Spent a couple of hours on this now and I'm at my end of the rope here...

Could someone please tell why the below isn't working:

Just created a fresh database on a Domino 8.5.3 server all default settings.

What I expect to happen is that "$$xspsubmitvalue" should contain "whatYouWantToSendHere", but it's empty.

I'm using the URL to open the XPage: /fresh.nsf/test.xsp?Open&Login

This is the request URL after pushing the button:

/fresh.nsf/test.xsp?Open&Login&$$ajaxid=view%3A_id1%3ArefreshMe

and this is the form data:

$$viewid:!d6g1y5acmu!

$$xspsubmitid:view:_id1:_id2

$$xspexecid:

**$$xspsubmitvalue:**

$$xspsubmitscroll:0|0

view:_id1:view:_id1

Would highly appreciate some input!

Thanks!

/J

SourceCode

http://pastebin.com/nyQYaRUC

Per Henrik Lausten
  • 21,331
  • 3
  • 29
  • 76
jBoive
  • 1,219
  • 1
  • 14
  • 40

2 Answers2

2

Well, first, I believe you have an extra ",{}" in there at the end of the call to the partialRefreshGet function - partialRefreshGet only takes two parameters, the ID and the options object, but that isn't your issue.

The problem is that you have this is all happening inside a button that is also doing a partial refresh - since partial refreshes are asynchronous, and only one partial refresh can happen at a time, your code to execute the partial is conflicting with the button click's action to do a partial. Set submit="false" on your button and see if it works.

Jeremy Hodge
  • 1,655
  • 9
  • 8
2

The code of your button is "corrupt": It fires a partial refresh, and the CSJS code will never be executed.

Change this

<xp:eventHandler
        event="onclick"
        submit="true"
        refreshMode="partial"
        refreshId="refreshMe">

to this

<xp:eventHandler event="onclick" submit="false">

then it will work as required.

EDIT

Normal CSJS code will be executed, but not the CSJS based partial refresh because of an internal blocking ( a timestamp stored in XSP.lastSubmit ).

Sven Hasselbach
  • 10,455
  • 1
  • 18
  • 26
  • Not completely true - the CSJS code will actually be firing, but its getting called during the firing of the button's event - since it is set to submit="true" the button's partial refresh is already considered "in progress", preventing any partial refresh from getting programmatically called during the CSJS side of the button's click event. So technically your solution is correct, but not for the reason you say. – Jeremy Hodge May 31 '12 at 12:35
  • What I mean is the CSJS triggered partial refresh. – Sven Hasselbach May 31 '12 at 12:39