2
votes

I see that i can pass data between 2 xpages by using url parameters in the first page and then retrieve them from the second xpage by using : param.get().

How can i send data without showing them in the url and without session scope variable? Can i use post method?

1
Is there a reason why you don't want to use scoped variables?Simon O'Doherty
no this is mostly a general question, i am not looking for a specific solution. But i ve read that request scope variables are not always working without problems(i also had problems with request scope in the past) and session scope is not a best practice if you want just request lifetime. this could be a reason. I ve read about createForm=false property and the use of a custom html form. is there any other more out-of-the-box way?mike_x_
See Per's answer for what I was planning to suggest. But bear in mind that one trouble with "general questions" is that without knowing the business case for your technical objective, we can't gauge whether your design pattern is sound to begin with. You can use flashScope to do what you're describing, but there might be a much better way to deliver the functionality that is the reason why you're trying to do what you're describing.Tim Tripcony
I think flashscope works just inside single NSF. And yes, you can use POST, that will work cross NSF/server boundaries.Frantisek Kossuth

1 Answers

5
votes

You can create and use a flashScope implementation in XPages. See http://www.bleedyellow.com/blogs/andyc/entry/a_flash_scope_for_xpages for more details.

The flashScope scope variables lives from one xpage to the next.

Update april 2016

The blog post is no longer available. You can find an implementation of flashScope in the XPages Scaffolding project on Github. You need to add the following to your code: