tabview

How to lazy load Angular 2 components in a TabView (PrimeNG)?

ぃ、小莉子 提交于 2019-11-30 13:29:51
问题 It is my app.component.ts: import { Component } from '@angular/core'; @Component({ templateUrl: 'app/app.component.html', selector: 'my-app' }) export class AppComponent { } And this is my app.component.html: <p-tabView> <p-tabPanel header="Home" leftIcon="fa-bar-chart-o"> <home-app></home-app> </p-tabPanel> <p-tabPanel header="Hierarquia" leftIcon="fa-sitemap"> <tree-app></tree-app> </p-tabPanel> <p-tabPanel header="Configurações" leftIcon="fa-cog"> <config-app></config-app> </p-tabPanel> <

How to dynamically add and remove a tab in p:tabView component

我们两清 提交于 2019-11-28 09:30:00
I am trying to add a PrimeFaces <p:tab> dynamically. While adding the second tab I am getting the following exception: "java.lang.IllegalStateException: Component ID tab0 has already been found in the view". How can I solve this? Here is the view code: <h:form prependId="false"> <p:tabView id="tabview" dynamic="true" cache="false" binding="#{testBean.tabView}" activeIndex="#{testBean.activeTab}" > <h:commandButton value="Close" action="#{testBean.removeTab}"/> </p:tabView> <h:commandButton value="Add Tab" action="#{testBean.addTab}"/> </h:form> Here is the bean code: public String addTab() {

JSF dynamically include src in “ui:include src=”#{bean.pagePath}\"

倖福魔咒の 提交于 2019-11-27 05:30:20
I tried to include multiple source page path using ui:include tag in different tabs. The problem is when i gave the source page path as static one means that page will be shown but if give the source page path from backing bean mean it won't include the page. Here is my code template.xhtml : <p:layoutUnit position="center" id="layoutCenter"> <h:form id="tempFormId"> <p:tabView value="#{multiTabBean.tabsList}" var="useCase" activeIndex="#{multiTabBean.activeTabIndex}"> <p:tab title="#{useCase.title}" closable="true"> <f:subview> <h:panelGroup id="mainTempPanelGroupId" layout="block"> <ui

How to dynamically add and remove a tab in p:tabView component

◇◆丶佛笑我妖孽 提交于 2019-11-27 03:05:40
问题 I am trying to add a PrimeFaces <p:tab> dynamically. While adding the second tab I am getting the following exception: "java.lang.IllegalStateException: Component ID tab0 has already been found in the view". How can I solve this? Here is the view code: <h:form prependId="false"> <p:tabView id="tabview" dynamic="true" cache="false" binding="#{testBean.tabView}" activeIndex="#{testBean.activeTab}" > <h:commandButton value="Close" action="#{testBean.removeTab}"/> </p:tabView> <h:commandButton

JSF dynamically include src in “ui:include src=”#{bean.pagePath}"

时间秒杀一切 提交于 2019-11-26 11:36:26
问题 I tried to include multiple source page path using ui:include tag in different tabs. The problem is when i gave the source page path as static one means that page will be shown but if give the source page path from backing bean mean it won\'t include the page. Here is my code template.xhtml : <p:layoutUnit position=\"center\" id=\"layoutCenter\"> <h:form id=\"tempFormId\"> <p:tabView value=\"#{multiTabBean.tabsList}\" var=\"useCase\" activeIndex=\"#{multiTabBean.activeTabIndex}\"> <p:tab