是否有一种方法可以动态地在流体中创建元素,如:
<f:section name="foo">
<{tag} />
</f:section>应该在这样的地方使用的东西:
<f:render section="foo" arguments="{ tag: 'f:form.textfield' }" />输出的结果应该是:<input type="text" … />,而不是它所做的<f:form.textfield … />。
发布于 2018-11-09 13:21:03
不是那样的,但是你可以用f:switch做点什么
<f:section name="foo">
<f:switch expression={tag}>
<f:case value="f:form.textfield"><f:form.textfield /></f:case>
<f:case value="etc">...</f:case>
</f:switch>
</f:section>https://stackoverflow.com/questions/53226430
复制相似问题