cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Translate the entire conversation x

Make listener update UI after doing modification at check-in on WTPart?

SvenR
14-Alexandrite

Make listener update UI after doing modification at check-in on WTPart?

Version: Windchill 12.0

 

Use Case: Using a listener via API in order to update attributes at check-in of the corresponding WTPart / WTPartUsagelink.


Description:

Updating values of the attributes works perfectly, but after check-in using the browser UI, the new attribute values are not displayed on screen. The UI is not refreshed. Is there a command/hook or something that makes the web ui refresh?

If the user manually refreshes (hits F5), then the new values are displayed...

I tried those functions, but either wasn't competent enough or they are not made for this use case...:

 

// refresh for changes that might have been made to the object
working_part = (WTPart) PersistenceHelper.manager.refresh(working_part, true, true);


WorkInProgressHelper.service.refreshObject(working_part);
PersistenceServerHelper.manager.update(working_part);
PersistenceServerHelper.update(working_part);
wt.fc.PersistenceHelper.manager.save(working_part);
// this all does not help...

 Anybody have an idea?

 

 

9 REPLIES 9
TDT
16-Pearl
16-Pearl
(To:SvenR)

Hi @SvenR,

 

Which event are you using, pre-checkin or post-checkin?

SvenR
14-Alexandrite
(To:TDT)

@TDT pardon, yes, I should have mentioned that I am using

WorkInProgressServiceEvent.PRE_CHECKIN

as hook for the listener. 👍

 

 

TDT
16-Pearl
16-Pearl
(To:SvenR)

Which API are you using to update or store the attribute value?

SvenR
14-Alexandrite
(To:TDT)

@TDT the attribute value on the WTPartUsageLink is set like so

usagelink.setLineNumber(TheNewlineNumber);
PersistenceServerHelper.update(usagelink);

(traversed via wt.fc.QueryResult from the WTPart)

 

And then later it gets refreshed like described above in order to be checked-in (should be similar as described in CS142340 )

 

TDT
16-Pearl
16-Pearl
(To:SvenR)

After a check-in, the page should ideally refresh and display the updated values in the UI.
Could you please share screenshots of the UI at the time of check-in?

SvenR
14-Alexandrite
(To:TDT)

after check-in, everything seems normal:

2026-01-15 18_07_04-not-refreshed.png

(edit: the image was lost during reply)

even the top menu bar / ribbon at the top is 'flashing' for a short time while refreshing after check-in. But the structure view does not get refreshed automatically... It does not matter whether editing the occurrence attributes (or something else, that's what I tried to do it fast) happens from the structure view on the left or from within the 'uses' tab on the right side before doing check-in. 

(This is on Windchill 12.0.2.26)

TDT
16-Pearl
16-Pearl
(To:SvenR)

Are you performing the check-in as shown below?

 

TDT_0-1768497653990.png

 

SvenR
14-Alexandrite
(To:TDT)

I checked-in using the button in the ribbon, but it's the same result when doing it via context menu. 🤷‍

TDT
16-Pearl
16-Pearl
(To:SvenR)

Okay, now I can see the attached screenshot.

Announcements
Top Tags