Is there a way to create dynamically elements?

前端 未结 2 989
北荒
北荒 2020-12-19 10:36

Let say that I want to create a variable set of elements within a component. So I tried to do that way:

相关标签:
2条回答
  • 2020-12-19 10:59
    <a4j:outputPanel id="out">
        <rich:tabPanel>
            <c:forEach items="list" var="var">
                <rich:tab label="#{var.name}" switchType="client">
                    content
                </rich:tab>
            </c:forEach>
        </rich:tabPanel>
    </a4j:outputPanel>
    
    0 讨论(0)
  • 2020-12-19 11:16

    Yes, it is possible, but difficult. Here are some notes I have:

    Use c:forEach to create tab tags inside tabPanel inside outputPanel. reRender outputPanel on tab removal, add, or name change

    http://relation.to/11633.lace

    http://devharbor.blogspot.com/2009/08/add-jsf-controls-dynamically-with.html


    We also made use of templating, though I still have an outstanding issue for it: How to force the build phase in a JSF 1.2 page using JSTL?

    http://facelets.java.net/nonav/docs/dev/docbook.html#template Docs on templating

    http://www.jsfcentral.com/articles/facelets_3.html Templating tutorial

    0 讨论(0)
提交回复
热议问题