1

Background: Xpage with multiple data sources. Each row of tabbed table contains an edit panel bound to a different data source than the main page. Each page contains a table to enter new documents. These documents are children of the main document. There is a view control that shows the user created documents immediately. The button in the table saves the document in addition to adding some control fields. It does a partial refresh of the editPanel.

Recently I added validation to the fields in the entry table. I use a function, and prevent updating from anything but the button. I am using Tommy Valand's method from this blog post: http://dontpanic82.blogspot.com/2010/03/xpages-making-validation-behave.html. If I don't use Tommy's method, then the validators fire when switching tabs, and are useless.

All of this works sort of, but I am experiencing the following issues. 1) I have to push the button twice to get the partial refresh to fire. Not only that, but the validation messages to not fire until the button is pushed twice. The first part was still an issue prior to adding the validation. 2) The table values do not clear after the refresh does happen. This used to work prior to adding the validation. The only way to get the values to clear now, is to do a full refresh (F5).

I really just need partial refresh to behave like it should. Any help is greatly appreciated.

8
  • Are you acquainted with the Firebug plugin for Firefox? Have you inspected if a request is sent to the server on the first request that "does nothing"? Nov 14, 2012 at 16:36
  • Tommy, I have not used that tool. I HAVE to make it work for IE, since that is the standard here. I will have to add that to my tool box. I am 99% sure that the request is ignored until the second click. Do you think using the Dojo date picker could have anything to do with it? Nov 14, 2012 at 18:57
  • Tommy, I installed Firefox and Firebug. Here is what seems to happen. Upon the first click, the POST does happen, but no error msg. Upon subsequent clicks, the error message fires, but it doesn't report. Shouldn't the POST never happen until it passes validation. Nov 14, 2012 at 19:32
  • Also, removing the Dojo data picker makes no difference. I only mentioned it because after I added it, xpages was acting weird, like adding any new elements after the data picker no matter where my cursor was placed. Nov 14, 2012 at 19:33
  • The reason I mentioned Firebug is that it's easy to debug the requests to the server. Regarding the POSTs. The page has to post the data to the server to validate (unless you use client side validation, which I have no experience with). Do you mean that the first click sends POST, but the second doesn't? If you try to create a test-xpage with the content of one of the tabbed panels, does that work as expected? It's been a while since I used tabbed panels, so I can't remember any issues with them. Nov 14, 2012 at 19:43

1 Answer 1

1

I am answering my own question because I think that I might have found out why the partial refresh was acting so flaky. Here is what I did that solved my issues: Each tab had an editPanel. If I make the edit panel do a partial refresh to itself then the buttons on that panel seems to behave as you would expect them to.

When I create a new core control panel, the default in No submission. I do not know whether this issue manifests itself only when using multiple data sources and/or tabbed tables. Hopefully this fix will be of use to someone down the road. It is worth a try if you are having issues with partial refresh working correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.