Parsley: how to share an instance between 2 Parsley configurations?

I have two parsley configurations for my two elements.

a.xml

<fx:Declarations>
    <!--Presenters-->
    <presenters:ScenarioDefinitionPresenter id="scenarioDefinitionPresenter"/>

    <!--Manager-->
    <managers:ScenarioDefinitionManager/>

    <!--service-->      
    <services:ScenarioDefinitionServiceImpl id="scenarioDefinitionService" />
</fx:Declarations>

B.xml

<fx:Declarations>
    <!--Presenters-->
    <presenters:TemplatePresenter/>
    <presenters:ScenarioDefinitionPresenter id="scenarioDefinitionPresenter"/>
</fx:Declarations>

My question is how to make sure that the "scriptDefinitionPresenter" in both configurations has the same instance?

Thank!

+3
source share
2 answers

Well, it depends on how you "configured" your Parsley configurations. In Parsley, if you have a “root” configuration with this presenter, it will also be used in all child configurations (unless you specify otherwise).

, 2 (2 root), . , . , , Parsley .

+1

, .

0

All Articles