May 10, 2016, 1:15 AM
24 Posts
topic has been resolvedResolved

Editing All Documents in Xpage

  • Category: Dojo and Client Side JavaScript
  • Platform: All
  • Release: 9.0
  • Role:
  • Tags:
  • Replies: 10

Hi

 

I got a requirement that I should  edit multiple documents(Update Fields), without opening the xpage. I have a Xpage which displays all documents, if user need to edit some fields he need to click the document in which the document will be open into another Xpage where he can edit some specific fields.This they need to do one by one. My requirement is they can edit the first xpage which will make all the documents editable.

They are comparing this with excel sheet, that they can open a excel sheet and update anything.

Is this possible.

Regards

Dali 

May 10, 2016, 6:38 AM
93 Posts
Inline editing

Brad Balassaitis has a nice blog post on how to do this with Gridx, which I have personally used in the past.

Link: https://xcellerant.net/gridx-in-xpages/

Alternatively, have a quick look on google for inline/inplace editing with xpages and I;m sure you'll find a solution to fit your requirements.

May 10, 2016, 8:08 AM
24 Posts
Editing All Documents in Xpage

I tried Google. I din not got much. I will search on the link given by you. If you have some examples then please share. That will be great support for other developers also. I will also share my final result

May 10, 2016, 8:48 AM
93 Posts
Support

Hi Dali,

 

The link I supplied is already a great piece of support, with code examples, and screenshots etc

 

Blog no 30 in the series is the one specific to inline editing

 

 

May 12, 2016, 6:58 AM
24 Posts
Editing All Documents in Xpage

Hi

 

It is interesting, i read article no 31 also, which describe about the changes in Lotus Admin, I spoke to my admin who sits in another country, he said it can be done in ver 9 and we are still on ver 8#.

If you can guide me step by step, I will implement this.

 

Regards

Dali

May 12, 2016, 2:11 PM
589 Posts
ummm

What version are you on?  When you created your post you must have chosen 9.0.  If you're still coding Xpages on pre-9.0 the you've got some bigger issues and should talk to your admin about upgrading.  I know you can't control that, but just the security updates alone are worth the upgrade.

I don't totally get what you're doing...  Chris's suggestion was about using a grid and doing in place editing.  If you didn't want to use a grid and you're real goal is just to keep people on the page you could do a repeat control and for each row you gave 2 versions... the read version and the edit version.  A button to edit and save.  So they click edit.  you do a partial refresh to bring up the edit custom control.  done.  Clicking a Save or Cancel button returns it.

So not quite as fluid as "Excel" but you stay on the page and you can do this with any version of Xpages since it's just a repeat control, table, and custom controls.

 

Just a thought.

Good Luck!

 

May 13, 2016, 6:57 AM
24 Posts
Editing All Documents in Xpage

Currently I am not ver 8#. might be upgrading to Ver 9. But still have to implement this

May 13, 2016, 10:22 AM
93 Posts
Modal?

Another possibility, based on David's idea of using a repeat control, would be something like this (which I have recently just done myself)

In your repeat control, code 2 buttons, [Open Document] and [Edit Document]

Clicking each of these buttons, would then open the document in a modal window.

In the onClick event of the button's, do something like viewScope.documentMode ="editDocument" or "openDocument"

Then, for the default action property of the datasource within the modal, compute it to viewScope.documentMode

So clicking open, will open the modal is read mode, clicking edit will open the modal in edit mode. You are also never leaving the main page, just simply showing a modal, then hiding it again when finished.

I recently watched John Jardin's webinar "Optimus XPages: An Explosion of Techniques and Best Practices" in which he speaks about and demo's a single page application which might also give you some nice  idea's on alternative ways to achieve your goals.

Slides: http://www.slideshare.net/Teamstudio/optimus-xpages-an-explosion-of-techniques-and-best-practices

Recording: https://youtu.be/8LEBYhp73nk

 

Good luck!

May 13, 2016, 11:59 AM
453 Posts
I'm with Dave and Chris

I would sure look at the repeat control option. I have done something along these lines with a checkbox in the repeat, that can open the document or ???? The repeat is so powerful that I use it almost exclusively for these sorts of things.

May 17, 2016, 1:08 AM
24 Posts
Modal

Thanks Chris Modal worked in for Ver 8.

I have few question , We are upgrading to 9 very soon for implementing gridx(https://xcellerant.net/gridx-in-xpages/) do we have to copy Gridx files and folders to the webcontent   folder of the database. Suppose we have 4 different nsf's on four different folders of the servers, do we have to copy gridx on every four folders(Webcontent) or there is some more way.

For Reference

https://xcellerant.net/2014/11/05/gridx-in-xpages-making-the-code-available/ 

May 17, 2016, 4:09 PM
589 Posts
hmm

The BEST way to make something like Gridx available to multiple databases is to make an OSGI Library.  

It's basically you're own custom "Extension Library".  You can add any kind of JavaScript project to it or even custom Java Classes and have them available at the server level.

It's a little complex to get started but there are some resources available on it.  

https://frostillic.us  -> somewhere in there Jesse did a little series on it.

John has a good article here ->  https://www.dalsgaard-data.eu/blog/wrap-an-existing-jar-file-into-a-plug-in/

This installs into the server via an update site.  So you will need admin support, but this is absolutely the best way to add resources at the server level.