Conflict between List Navigation and Form inside a weblock

Conflict between List Navigation and Form inside a weblock

  

Hi everyone,


I'm facing a problem while using a form inside a weblock; basically what happens is that every time i click on a new page through list navigation widget I can see no more the data inside the form. See the attached oml to understand what I mean.

Got any suggestions?

Cheers,

Jim

Solution

Hello Gianmaria,

What you are experiencing is the behavior that I would expect.
You have a form in a web block INSIDE a Table records. By the way, the way you are using the Table Records and the accordion is by itself a problem...

But let's see what is happening.

A Form goes look for the data in the source ONLY when the page is LOAD. After that, on submits and ajax submits, the form do not copy data from the source for its record anymore.

When you change pages, you are doing an Ajax Submit.
This means that while the web blocks in the table records WILL be rendered again, the forms will NOT fetch data from the source, causing your form to appear empty.

A workaround is to explicitly set the form record to the aggregate's list current using an assign.

I'm sending your OML back with some modifications and minor bugs fixed. I changed the way you are using the accordion to something that makes sense.

In any case, I think using a form inside a table is a little bit strange... You could use other approaches to edit data...

Hope this helps.
Cheers.

Solution

Hi Gianmaria,


To solve the form not showing issue, you must explicitly assign it in the preparation of the webblock, as the Ajax Refresh does not assign it to the form widget.


Also, in the aggregate, you forgot to filter it by the input parameter, like this



And one last thing, set the Start Index property in the PersonTable to get it from the Navigation, with the action List_Navigation_GetStartIndex


And you should be good to go.

Cheers

Eduardo Jauch wrote:

Hello Gianmaria,

What you are experiencing is the behavior that I would expect.
You have a form in a web block INSIDE a Table records. By the way, the way you are using the Table Records and the accordion is by itself a problem...

But let's see what is happening.

A Form goes look for the data in the source ONLY when the page is LOAD. After that, on submits and ajax submits, the form do not copy data from the source for its record anymore.

When you change pages, you are doing an Ajax Submit.
This means that while the web blocks in the table records WILL be rendered again, the forms will NOT fetch data from the source, causing your form to appear empty.

A workaround is to explicitly set the form record to the aggregate's list current using an assign.

I'm sending your OML back with some modifications and minor bugs fixed. I changed the way you are using the accordion to something that makes sense.

In any case, I think using a form inside a table is a little bit strange... You could use other approaches to edit data...

Hope this helps.
Cheers.


Hi Eduardo, thanks for the quick reply. I'll try your solution in my environment. If I may ask, what do tou mean when you say 'you could  use other approches to edit data' ? Can you suggest few examples? Again, thank you so much for your answer and your time

André Rodrigues wrote:

Hi Gianmaria,


To solve the form not showing issue, you must explicitly assign it in the preparation of the webblock, as the Ajax Refresh does not assign it to the form widget.


Also, in the aggregate, you forgot to filter it by the input parameter, like this



And one last thing, set the Start Index property in the PersonTable to get it from the Navigation, with the action List_Navigation_GetStartIndex


And you should be good to go.

Cheers


Hi André thank you for your suggestion. I will fix all the problems in my environment and move on, thank you again for your time.

Cheers,

Jim


Hello Gianmaria,

Usually a table shows data and when you want to edit it, you go to a detail page to edit this data, or you open a popup, or a modal.

The idea is that the list shows only the relevant information that must be seen in the list page. In the details page/etc, you can edit more information that are not visible there.

Cheers.

Eduardo Jauch wrote:

Hello Gianmaria,

Usually a table shows data and when you want to edit it, you go to a detail page to edit this data, or you open a popup, or a modal.

The idea is that the list shows only the relevant information that must be seen in the list page. In the details page/etc, you can edit more information that are not visible there.

Cheers.

Ok Eduardo, I got your point, thank you for the explanation. Yes, probably I should try other methods but I thought that it would have been a good solution for my application. 

Cheers