Hi Greg, thanks for replying.
The renderers are in the main application, in a list of 7 fixed registers.

> Another thing to check is to make sure the package filtering on the 
> JSStageEvents is not excluding your renderers from having the simulated 
> events being created.

I have <crux:JSStageEvents packageExclusionFilter="_default_"/> is this correct?

In our main application we handle the "Language" by loading an xml that we 
inject into the views that require it, maybe this approach is not "quite right".
For now, to make the LangModel accessible from the rederers, I have extended 
ListItemRenderer, adding a "propertiesIt" property where I set it (through a 
bead). Maybe this solution is not very orthodox, but it works well. Do you see 
any problems with this solution?

Thx.
Hiedra.

De: Greg Dove <[email protected]>
Enviado el: domingo, 21 de noviembre de 2021 1:07
Para: [email protected]
Asunto: Re: Crux - ItemRenderer

I can't say for certain Maria, because it's been some time since I used Crux.

Are your renderers in the main app, or are they in a popup? Crux may not work 
inside a popup, without some tweaking and tuning for JSStageEvents, iirc.

Beyond that I think Crux is not particularly suitable for ItemRenderers. At 
least I would personally try to avoid using it in this case, unless the 
renderer count is always relatively low.

One of the key differences between the JS implementation vs. the Flash 
implementation is when the bean setup is run to support processing the view. 
This is triggered by 'addedToStage' event, which does not have directly 
comparable support in the browser.
JSStageEvents bead creates a simulated 'addedToStage' event. But the way that 
works is asynchronous (delayed) compared to the way it works in flash (which is 
synchronous) as soon as the renderer is added to the stage. So that is one 
possible reason for things not working the same, because often the code that is 
creating the renderers is also explicitly running code in the newly created 
renderer instance (like setting data and possibly other calls). It might be 
doing this after it has been 'addedToStage' and there is no chance for the 
PostConstruct method to run first, because it would be delayed. But if 
PostConstruct is never running at all then it could be related to use in a 
Popup.
Another thing to check is to make sure the package filtering on the 
JSStageEvents is not excluding your renderers from having the simulated events 
being created.





On Sun, Nov 21, 2021 at 11:51 AM Maria Jose Esteve 
<[email protected]<mailto:[email protected]>> wrote:
Hi, Is there any explanation for the fact that "[PostConstruct]" does not work 
in the itemrenderers?

Thx.
Hiedra

Reply via email to