Persistent params in components

Notice: This thread is very old.
kubco2
Member | 9
+
0
-

Hello,

how to use persistent params in component only while this component is active?

My problem:
main presenter has sectiongroup component and it has sections components.

One section can contain eg. grid and form.
Grid has public property $item(no persistent) and row handle “edit! itemId”, in this action I assign id to property item.
In createComponentForm, I call $this[‘grid’]->item, if item is not empty I fill default values.
If I want edit some row, I must have URL with ?do=…grid-edit&…grid-item=x … Better could be to redirect with persistent property item, but then when I browse to another section, persistent parameter from grid component stays in URL.

How can be this done better?

Thanks for help.

Jakub

amik
Member | 118
+
0
-

What is the reason to make the item id persistent parameter? It is completely OK when you do any other action in the grid, the grid row is not editable anymore. Grids I know also behave this way.

kubco2
Member | 9
+
0
-

I have dynamic form generated by entity, which I select in grid.
If it was presenter action, it is easy.
But in component I dont know how to properly persist this entity(id) parameter. Maybe it is possible to load http data from request in form configuration, but it is not nice :-(.

I cant edit presenter.
Persistent param in component stays in other components – undesired
I tried set param to form action – didnt work
.....
Edit: second test to set action url on form works. But if you know about better way, post please.

Thanks.

Last edited by kubco2 (2014-12-11 23:05)