Components are not persisted across different presenters

Notice: This thread is very old.
jiri.pudil
Nette Blogger | 1032
+
0
-

I've got a question regarding persistent components. The documentation says that (emphasis mine)

Their state is then passed around when jumping to another presenter, just like with persistent parameters.

I've got a filter component with some persistent parameters. I use it in ListPresenter that displays records from the database, and now I want to make a link to ExportPresenter and use the component there as well, passing the filter setup in the link. The component has the same name and is marked as persistent in both presenters, however, its persistent parameters get stripped here when creating the link.

What is the correct behavior? Is this a bug, or just a misleading documentation?

enumag
Member | 2118
+
+1
-

I don't use this feature but try to define the component and mark it as persistent in a common ancester of both presenters. It just might work.

Last edited by enumag (2015-05-19 11:45)

jiri.pudil
Nette Blogger | 1032
+
0
-

It works, thanks. I don't like the idea of creating a common ancestor only for this purpose, but I guess it will have to do.