Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
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?
@TDT pardon, yes, I should have mentioned that I am using
WorkInProgressServiceEvent.PRE_CHECKINas hook for the listener. 👍
Which API are you using to update or store the attribute value?
@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 )
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?
after check-in, everything seems normal:
(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)
Are you performing the check-in as shown below?
I checked-in using the button in the ribbon, but it's the same result when doing it via context menu. 🤷
Okay, now I can see the attached screenshot.
