WB17 - Looper rows get empty when editing

Startbeitrag von Arie am 18.11.2013 20:15

I have a web-app where user can enter their working hours.
I use a looper. Every looper-row has 2 lines of controls (mainly edit controls and a few comboboxes).
These controls are spread over 2 rows to get a nice user interface. The top line holds the most important (and mandatory) info. The second line is used for additional info.

Very often (but not always - I can't yet get my fingers on it) all rows get empty, as if there are no controls at all.
But only for the 'other' rows, never the currently edited row.
It happens when switching from one control to another (TAB or mouse). There's is no on-exit code behind controls or even on the looper-row. Certainly no code which hides controls or what so ever. I don't notice a screen refresh, it looks like a browser 'thing'.
Like below: 5 empty rows should have controls too!

Anyone seen this before?

Antworten:

Hi Arie,

Considering your other post (about the table in edit), I would advice you to abandon editing in tables and loopers for Webdev.
In Windev it is perfectly doable, but in Webdev it's just not worth all the extra work.
It's not like in Windev, that the user can easily tab through the columns and move to a next line.
Also the entering of an editable column is not easy and the font of the column in edit sometimes is too big for the field.
So there no efficiency gain for the users in letting them enter data in a table. (although I do offer it sometimes as an extra option)
About loopers, I really dislike them because they are so unpredictable (like your current experience) and avoid them as much as possible,
So -except for checkboxes- I always offer a popup or a Pagedisplaydialog to enter data.
Just my two cents.

Regards,
Piet

von Piet van Zanten - am 19.11.2013 10:09
I'm getting to the point where is goes wrong.
When I remove one of the buttons, also sitting in a looper row, the problem is gone!
(the X button in my screenshot)
Strange thing is, there are 2 more buttons of the same kind. I added logging and did some tracing, but no code is run. This button is not pressed in code. It no submit button. What could be wrong with this button?
I completely rebuild the looper with no go.

Still investigating....

von Arie - am 19.11.2013 12:05
Thanks Piet,

I finally trapped my problem (see my other reply). But ran into another right away.
Now when there is data in the rows and I use the scrollbar to move up.down through all rows, the data is lost, for all rows which where "off screen" (better: outside the visible part of the looper). What about that?

The looper indeed behaves to its own rules.

I think your advice is the way to go.
I'm going to use a different approach and suprise my users :rp:

von Arie - am 19.11.2013 12:12
Piet,
in what way do you give users the option to add/edit/delete rows?
Use table-select-row event for editing?
Using a delete button (checkbox) on every row?
Please give me a quick start

von Arie - am 19.11.2013 12:17
Hi Arie,

I'm sorry, don't use loopers to display data for editing, only tables, because a table row can easily be selected.
The add, modify and delete buttons are outside the table.

Regards,
Piet

von Piet van Zanten - am 19.11.2013 12:45
OK thanks.

von Arie - am 19.11.2013 12:46
Hi Arie

Look at the style you are using. I found Out that it can make quite a diffirece. Go to the 7 tab of the control There are several options of the style you are using.
I helped ad e view days ago, changing the style to simple helped

regards

Allard

von Allard - am 19.11.2013 15:26
Allard,
sorry no change. It looks like values entered by the user get lost. And values added by programming have no problem. Bbut I;m not 100% sure.

von Arie - am 19.11.2013 15:58
Piet,

you might want to check this article http://www.thenextage.com/wordpress/two-styles-of-editing-records-from-a-link-in-an-ajax-table/
It describes how to use an AJAX table together with PageDisplay(), which cannot be used in AJAX mode. But CAN with the help of a little trick.
Now you can get rid of first selecting a row with that not so fancy radiobutton and then pressing an edit-button. It can al be done by selecting a table-row at once.

Thanks to Pete and Fabrice

And thanks to you, I'm now doing it your way:spos:

von Arie - am 19.11.2013 20:46
Hi Arie,

Nice article, but I'm using a very straightforward method using PageDisplayDialog in most cases.
Sometimes I have a permanent "form" below the table or a button with a popup.
The pagedisplaydialog is very close to the Windev way of using a form window to edit a row in a table.
(In fact I still use an ancient naming convention for the pages _tbs for browsing page _fic for form pages, coming from Windev 5 RAD)
I don't like a link in a table to edit because it's limited to one column and may inadvertedly trigger an edit when selecting a row in the table. I prefer the button and additionally a double click to edit.
Just a consistent use of three buttons: new, edit and delete.

Regards, Piet

von Piet van Zanten - am 20.11.2013 07:22
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.