Master datasource and detail datasource are synchronized via current-row-change, works great. Detail (grid, docking center) contains among others a varchar2(4000) Text column. Therefore, in a separate panel (docking south), there is a single, big texstArea, bound to the same datasource+column.

Idea: changing the current record in the detail grid will change the single big textArea too.

This works but only(!) if the current-row-change event of the detail datasource has an action attached, even if its just:

   procedure resync_attext is
   end ;

No biggie, but suspicious, methinks.

asked 12 Nov '14, 11:16

dipr's gravatar image

accept rate: 0%

edited 12 Nov '14, 11:17

Hi Paul,

This is not a bug but a feature. :-)

Formspider datasources have a current row and components (outside of the grid) show the value in the column that they are bound to in this current row. If the current row changes, Formspider updates all the components bound to the datasource.

Changing the current row in a grid changes the current row of the datasource the grid is bound to. We could code Formspider in a way that whenever you click to a row in a grid, the app contacts the server and changes the current row of the datasource automatically. But maybe there are cases where your screen doesn't have anything else to sync. There is just a grid on the screen. In that case, why bother contacting the server? So we left the decision to the developer. If you want the synchronization to happen immediately, you add a current row change event. If you want to defer it until the next event (whatever that may be) you do nothing.

Hope this helps.

Kind Regards, Yalim


answered 13 Nov '14, 04:11

Yalim's gravatar image

Yalim ♦♦
accept rate: 22%

Perfect answer! Exactly that very Explanation would be a ideal ToolTop Text at the IDE's current-row-change-event's action field :D

So, when would a bound textArea become updated then, when the grid does NOT have said "null;" procedure?

Only by programmer's explicit request, or automatically but delayed, "piggy-backed" onto the next mandatory DB-round trip?

Basically I don't need a separate manual, really detailed ToolTips at property would be sufficient.

(13 Nov '14, 07:26) dipr

It would be updated automatically but delayed, "piggy-backed" onto the next mandatory DB-round trip.

(13 Nov '14, 07:58) Yalim ♦♦

Rereading your explanation I found the missing piece of information on formspider's internal workings, pls correct me if I'm wrong:

  • there is a datasource inside the DB, with a current row state

  • there is a subset thereof inside tomcat's grid element, with a separate(!) current row state

  • changing the grids current row creates INSIDE Tomcat (session state) a "DB current row change pending" state, but does NOT synchronously tell the DB datsource to change the current row (except when there is a change-current-rot event action on the grids datasource)

  • only when that pending row update is proparagte to the DB layer, the DB datasource changes its current row and updates all other elements bound to it

am I close?

(13 Nov '14, 10:39) dipr

Yes. One minor issue only. There is nothing inside Tomcat. There is the Grid on the screen and corresponding Javascript objects to support it. There is the datasource and the state of the application in the database. The middle tier just facilitates the communication. In your mental model you don't need to think about the Grid and its current row. Even if the two current rows (grid's and datasources) might be different temporarily, that's immediately synced backed to the datasource before any code is executed. You never work with the current row of the Grid. I don't think there is even an API for it. This is a good article that explains how Formspider works:

Practically, you are working in a virtual application running in the database.

(13 Nov '14, 10:59) Yalim ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 12 Nov '14, 11:16

Seen: 611 times

Last updated: 13 Nov '14, 10:59

© Copyright Gerger 2017