0
我有一个现在应该得到一个新属性的现有JSF复合组件。这个新属性应该是一个列表,用户可以在浏览器中选择每个鼠标的x/y坐标。填充列表,这是每个JavaScript的JSF复合接口的属性
<composite:interface componentType="myComponent">
...
<composite:attribute name="selectedPositions" type="java.util.ArrayList" />
</composite:interface>
<composite:implementation>
//TODO: fill selectedPositions with values
</composite:implementation>
使用该组件的开发者应该提供无论是预填充列表或在他们的支持豆空单:
<myns:mycomponent id="myComponent" selectedPositions="#{backingBean.prefilledList}" ... />
如果列表预填充,然后我将呈现这些值。但用户应该能够通过拖放来更改浏览器中的渲染值。当他/她提交表格时,更新值或新值应位于列表selectedPositions
内。
目前我不知道如何从我的JavaScript代码中获取值到列表中?