Composite Component with child- Composite Component: Not thread safe?

荒凉一梦 提交于 2019-12-11 18:52:09

问题


Does anybody know if passing objects as parameter from one composite component to another child composite component is thread-save?

I have a composite component A that uses another composite component A' as child and passes an object as parameter cc.attrs.parameter to A'.
A is used twice in the same form:

Component A:

<cc:interface>
    <cc:attribute name="value"/>
</cc:interface>

<cc:implementation> 
    <cdef:myChildComponent value="${cc.attrs.value}"/>
    <!-- Show data from value -->
</cc:implementation>  

Component A' (myChildComponent):

<cc:interface>
    <cc:attribute name="value"/>
</cc:interface>

<cc:implementation> 
    <h:commandLink  action="${cc.attrs.value.load}">
        Reload Data
    </h:commandLink>
</cc:implementation> 

A' reloads data from the bean if you click on a button via Ajax. But it happens, that the Button in one A reloads the Data for the second A... (and I'm using id's and that stuff to separate both A)

If I copy the code from A' directly in A, so that no child composite component is used. this effect does not appear.

It looks like parameter-passing between composite components is not thread-safe... Strange thing...

来源:https://stackoverflow.com/questions/8877418/composite-component-with-child-composite-component-not-thread-safe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!