المكتبة التقنية ←

تحديث صف Interactive Grid من خلال الـModel

English version

An Interactive Grid row action can retrieve related information without refreshing the entire page. The important part is keeping record identity, authorization, and persistence clear.

Identify the record associated with the clicked action. Do not assume that the currently selected row is always the row whose button was clicked. Send the necessary identifier to an Ajax callback, authorize access on the server, and return a small JSON response.

Apply values through the grid's model API rather than changing rendered cell HTML. A visual change alone can disappear when the grid redraws and may never reach its data model.

Decide whether the response changes only the client model or also persists a server-side operation. Show when saving succeeds, handle errors, and protect against stale responses and repeated clicks.

The source LinkedIn post shared a community article. This adaptation explains the design considerations without claiming authorship of that original resource.

Reference: Oracle APEX model API.

النسخة العربية

زر داخل صف Interactive Grid يقدر يجيب بيانات مرتبطة من غير تحديث الصفحة كلها. المهم توضيح هوية السجل والصلاحيات وطريقة الحفظ.

حدد السجل المرتبط بالزر المضغوط؛ الصف المحدد حاليًا مش بالضرورة هو نفس صف الزر. ابعت المعرف المطلوب لـAjax Callback، وافحص صلاحية الوصول على السيرفر، وارجع استجابة JSON صغيرة.

طبق القيم من خلال Model API الخاصة بالـGrid، بدل تعديل HTML المعروض في الخلية. التغيير الشكلي ممكن يختفي عند إعادة الرسم، وقد لا يصل لنموذج البيانات أصلًا.

حدد هل الاستجابة بتغير نموذج المتصفح فقط، أم تنفذ عملية محفوظة على السيرفر. وضح نجاح الحفظ، وتعامل مع الأخطاء والاستجابات المتأخرة وتكرار الضغط.

البوست الأصلي شارك مقالًا من المجتمع. النسخة دي بتشرح اعتبارات التصميم، ولا تنسب تأليف المصدر الأصلي لي.

المرجع: توثيق Oracle لـModel API.