Question

I have a part which is a simple list view, which I'm using as a log view. In the @PostConstruct method it registers for events to be logged. By default the part is stacked behind another part. I've found that the @PostConstruct method is not called until the view is first shown to the user. This means that log events are not logged unless the user has first clicked on the part. This doesn't work for me, as I want the part to contain the full log history, even if the user has never clicked on it.

Have I missed something basic? Is there any way that I can coax e4 to construct the part right from the start? I guess a better way to handle this would be to keep the log event data separately and only viewed through the part. Is there any way to avoid that?

Many thanks in advance.

Était-ce utile?

La solution

You can get the part created using the injectable part service EPartService -

partService.showPart(id, PartState.CREATE);

It might be better to put the listeners in a non-UI component which you could start from the life cycle @PostContextCreate method.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top