adm2 question

Posted by Darren Parr on 02-Apr-2020 20:32

Hi

I'm hoping someone knows the answer to this. I've got a very typical adm2 window with dynamic toolbar. Lots of viewers on different pages with a smart folder etc. I want to put a frame on a different page which is just a container. What code should I put behind a button to have it act like we've started an update in a viewer. On clicking I want the browser linked to a parent sdo to stop, navigation buttons to grey out etc.Only allow update from the toolbar etc. I just need to ensure the record cant change on this parent sdo

HTH

D

Posted by Darren Parr on 03-Apr-2020 10:13

OK. I managed this. It was easier than I thought in the end. In case anyone ever needs something simple that's still a smart object and you want to write a slightly different interface for update, I did it like this.

Mines a smart frame. I had to make it a TableIOTarget and link it to the toolbar. Its also a data target for whatever SDO you're getting your parent data from. You'll need a setTableIOSource and a getTableIOSourceEvents functions so the link works.

In addition you'll need to override dataAvailable so you catch changes to the current record. Once you enter update mode you can signal this via a publish of updateState with "update". When done the same with "updateComplete".Most importantly and the bit I was missing was that you also need to make the call to isUpdatePending true so navigation stops. This ensures the user cant change the parent record whilst you're in the middle of the edit.

I'll leave this here so it helps someone else if needed. This stuff is old these days and most (like myself) aren't active with this stuff any longer. We're busy with PAS web handlers these days.

All Replies

Posted by Darren Parr on 03-Apr-2020 10:13

OK. I managed this. It was easier than I thought in the end. In case anyone ever needs something simple that's still a smart object and you want to write a slightly different interface for update, I did it like this.

Mines a smart frame. I had to make it a TableIOTarget and link it to the toolbar. Its also a data target for whatever SDO you're getting your parent data from. You'll need a setTableIOSource and a getTableIOSourceEvents functions so the link works.

In addition you'll need to override dataAvailable so you catch changes to the current record. Once you enter update mode you can signal this via a publish of updateState with "update". When done the same with "updateComplete".Most importantly and the bit I was missing was that you also need to make the call to isUpdatePending true so navigation stops. This ensures the user cant change the parent record whilst you're in the middle of the edit.

I'll leave this here so it helps someone else if needed. This stuff is old these days and most (like myself) aren't active with this stuff any longer. We're busy with PAS web handlers these days.

This thread is closed