FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.



Jun 25, 2015, 4:20 PM
9 Posts

Form in XPages loaded with last document

  • Category: Other
  • Platform: All
  • Release: 9.0.1
  • Role: Developer
  • Tags: form,view,document,xpages,populate,data
  • Replies: 5

I am working on an XPage with a form in it and I want the form to always populate the data from the latest document. Currently it just shows empty boxes . Also, I cannot use a view because my status field is rich media and I need the picture to show.

 

 

Thank you

Jun 25, 2015, 4:21 PM
9 Posts
Form in XPages loaded with last document

 

Jun 29, 2015, 8:05 AM
9 Posts
Form in XPages loaded with last document

 

Jun 29, 2015, 6:59 PM
453 Posts
Well ....

I would take the values from the fields and on a querySave event or an action button I would save them each in, probably, a sessionScope variable ant then have the fields default to the sessionScope variable. The other option might be a sessionScope Java Bean. I'm pretty sure either of those would work. Not sure on storing the RT Field is a scope variable but pretty sure you could do that in a Java Bean but I have never tried specifically doing this with a RT Object.

Jul 5, 2015, 5:16 PM
453 Posts
One additional thought

If you want the user to have the same defaults even after they log out and then open an new session save the values in an ApplicationScope Java Bean and key it on the user name. If you were to do this thenI would store the last access date in the bean and have an agent that would run say once a day and remove the ApplicationScope object for any person if the last access date is older than ????? I would do this because an ApplicationScope stays until the HTTP task is closed then restarted so it is possible to have a bunch of junk hanging around.

 


FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.