Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Feedback from a frustrated user on the @(Can)Execute API

[...]

> The only piece of the puzzle I don't get yet is how the MItem's
> selection state gets initialized, since I don't get preference change
> events for the initial values. Somehow, the addon needs to enumerate all
> MItems in the Application Model, look for any preference ID in their
> tags, consult the preference store, and set their selection state
> accordingly, correct? But when is the right time for this

Yes. I would tag those guys with the preference-node path, you can use
the tags or persistedState-Map although I prefer persistedState because
tags are also translated to CSS-Selectors so the more you use tags the
more work needs to be don by the CSS-Engine.

> initialization? In the addon's @PostConstruct? Or is this too early,

No that's exactly the right point in time. Addons are processed just
before the application model gets handed to the rendering framework.

> i.e., won't the model be populated with all MItems yet. Maybe this is
> what processors are meant for (as opposed to addons)?

At the point the Addons are processed the model is fully built up in
memory (unless naturally you add/remove something yourself later on).

> 
> I hope you can help me clear that last bit of confusion as well. Thank
> you in advance.

Tom



-- 
Thomas Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7, A-6020 Innsbruck
http://www.bestsolution.at/
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck


Back to the top