Primefaces 罗尔斯走了。令人惊叹的!非常感谢。然而,仍然存在一个问题。加载事件模型仍然不能完全工作。有时显示事件,有时不显示。没有Java错误和Javascript错误。对这个有什么建议吗?同时,我将再次尝试调试…PostConstruct方法。并从使用一致的命名空间

Primefaces 罗尔斯走了。令人惊叹的!非常感谢。然而,仍然存在一个问题。加载事件模型仍然不能完全工作。有时显示事件,有时不显示。没有Java错误和Javascript错误。对这个有什么建议吗?同时,我将再次尝试调试…PostConstruct方法。并从使用一致的命名空间,primefaces,jsf-2.2,Primefaces,Jsf 2.2,罗尔斯走了。令人惊叹的!非常感谢。然而,仍然存在一个问题。加载事件模型仍然不能完全工作。有时显示事件,有时不显示。没有Java错误和Javascript错误。对这个有什么建议吗?同时,我将再次尝试调试…PostConstruct方法。并从使用一致的命名空间声明开始…感谢您发布解决方案。你在action和actionlistener之间的区别上学到了宝贵的一课! <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns


罗尔斯走了。令人惊叹的!非常感谢。然而,仍然存在一个问题。加载事件模型仍然不能完全工作。有时显示事件,有时不显示。没有Java错误和Javascript错误。对这个有什么建议吗?同时,我将再次尝试调试…PostConstruct方法。并从使用一致的命名空间声明开始…感谢您发布解决方案。你在action和actionlistener之间的区别上学到了宝贵的一课!
<ui:composition xmlns="http://www.w3.org/1999/xhtml"   
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://xmlns.jcp.org/jsf/core"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:p="http://primefaces.org/ui">
    <h:form id="content-form">
        <p:outputPanel id="page-title-myevents">
            <h3>#{translations['pvm_myevents']}</h3>
        </p:outputPanel>

        <h5>#{translations['misc_myscheduler']}</h5>
        <p:schedule id="myScheduler" value="#{myEventsBean.eventModel}" widgetVar="myscheduler" timeZone="#{appSettingsBean.uiTimeZone}">
           <p:ajax event="dateSelect" listener="#{myEventsBean.onDateSelect}" update="myEventDetails" oncomplete="PF('myEventDialog').show();" />
           <p:ajax event="eventSelect" listener="#{myEventsBean.onEventSelect}" update="myEventDetails" oncomplete="PF('myEventDialog').show();" />
           <p:ajax event="eventMove" listener="#{myEventsBean.onEventMove}" update="myEventMessages" />
           <p:ajax event="eventResize" listener="#{myEventsBean.onEventResize}" update="myEventMessages" />
        </p:schedule>
        <p:dialog widgetVar="myEventDialog" header="Event details" modal="true">
        <h:panelGrid id="myEventDetails" columns="2">
            <p:outputLabel for="myEventTitle" value="#{translations['fld_eventtitle']}" />
            <p:inputText id="myEventTitle" value="#{myEventsBean.event.title}" required="true" />

            <p:outputLabel for="myEventFrom" value="#{translations['fld_from']}" />
            <p:calendar id="myEventFrom" value="#{myEventsBean.dateFrom}" timeZone="#{appSettingsBean.uiTimeZone}" pattern="#{appSettingsBean.uiDateTimePattern}" />

            <p:outputLabel for="myEventTo" value="#{translations['fld_to']}" />
            <p:calendar id="myEventTo" value="#{myEventsBean.dateTo}" timeZone="#{appSettingsBean.uiTimeZone}" pattern="#{appSettingsBean.uiDateTimePattern}" />

            <p:outputLabel for="myEventAllDay" value="#{translations['fld_allday']}" />
            <h:selectBooleanCheckbox id="myEventAllDay" value="#{myEventsBean.event.allDay}" />

            <p:commandButton id="myEventResetForm" type="reset" value="#{translations['btn_reset']}" />
            <p:commandButton id="myEventUpdate" value="Save" action="#{myEventsBean.addEvent}" oncomplete="PF('myscheduler').update();PF('myEventDialog').hide();" />
        </h:panelGrid>
        </p:dialog>
        <p:messages id="myEventMessages" showDetail="true" closable="true">
            <p:autoUpdate />
        </p:messages>
        <hr></hr>
    </h:form>
</ui:composition>
<!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:h="http://java.sun.com/jsf/html" 
    xmlns:f="http://java.sun.com/jsf/core" 
    xmlns:p="http://primefaces.org/ui">
<ui:include src="/themes/theme.xhtml"/>
<h:body>
    <ui:insert name="header" >
        <ui:include src="/main-dashboard/my-topnav.xhtml"/>
    </ui:insert>
    <ui:insert name="content" >
        <ui:include src="/main-dashboard/my-sidenav.xhtml"/>
        <p:outputPanel id="dashboard-container">
            <ui:include src="/main-dashboard/my-sidenavtoggler.xhtml"/>
            <p:outputPanel id="content-window">
                <p:outputPanel id="content-panel">
                    <ui:include src="#{contentLoaderBean.mainContent}" />
                </p:outputPanel>
            </p:outputPanel>
        </p:outputPanel>
    </ui:insert>
</h:body>
</html>