我的选项卡视图中有两个选项卡。一个选项卡包含所有员工日程安排,另一个选项卡包含个人日程安排。在创建个人日程安排时,选项卡1直到我们手动刷新后才会刷新。为解决此问题,我添加了dynamic = true和cache是错误的,但这会破坏我的第一个标签页的布局。
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:fesis="http://java.sun.com/jsf/composite/components/gadgets/schedule"
xmlns:dlg="http://java.sun.com/jsf/composite/components/dlg"
>
<body>
<ui:composition template="./template.xhtml">
<ui:define name="head">
<style type="text/css">
body .ui-tabs.ui-tabs-top .ui-tabs-nav li.ui-state-active, body .ui-tabs.ui-tabs-bottom .ui-tabs-nav li.ui-state-active, body .ui-tabs.ui-tabs-left .ui-tabs-nav li.ui-state-active, body .ui-tabs.ui-tabs-right .ui-tabs-nav li.ui-state-active{
}
body.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {
color:#5b6849;
background:lightgray }
</style>
<script type="text/javascript">
</script>
</ui:define>
<ui:define name="content">
<h:form id="form1" prependId="false">
<p:breadCrumb styleClass="component-margin">
<p:menuitem value="FES Integrated Systems" />
<p:menuitem value="View Schedule" url="#" />
</p:breadCrumb>
<p:tabView id="tabView1" dynamic="true" cache="false" >
<p:tab title="View Employee(s) Schedules">
<fesis:gdgt_view_emp_schedule id="gdgt_view_emp_schedule" prependIdValue=":form1:tabView1:"/>
</p:tab>
<p:tab title="My Schedules">
<fesis:gdgt_schedule_entry id="gdgt_schedule_entry" prependIdValue=":form1:tabView1:"/>
</p:tab>
</p:tabView>
<dlg:dlg_emp_group_detail id="dlg_emp_group_detail" scdlGroupMst="#{dlg_emp_group_detail.ent_group_detail}"/>
<dlg:dlg_manage_emp_group id="dlg_manage_emp_group" renderManageGroup="#{dlg_manage_emp_group.renderManageGroup}"/>
</h:form>
</ui:define>
</ui:composition>
</body>
</html>