0

As said in this question's answer :

     "Components which uses Ajax. If you don't need it, disable Ajax"

a p:schedual isn't displayed if there are others components with an f:ajax in the same page.

i noticed that if these components are written in the code after the schedual, the latter can be displayed but these components do not respond to user interactions anymore (I've an example of code in a previous question i've asked).

So, what if i "need them to work" ? is the schedual designed to work only alone and disable other components to share the ajax functionalities with it ?!

This the code in which i used the schedual :

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.org/ui"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:c="http://java.sun.com/jsp/jstl/core">

<h:head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

    <link rel="stylesheet" href="CSS/general.css" type="text/css" />
    <link rel="stylesheet" href="CSS/jquery-ui-1.10.0.custom.min.css"
        type="text/css" />




    <script src="JS/jquery-ui-1.10.0.custom.js" />
    <script src="JS/jquery.flip.js" />
    <script src="JS/jquerygen.js" />


    <title>my app</title>


</h:head>

<body>
    <f:view>
        <h:form id="form1">

            <h:panelGroup id="windsarea" layout="block">
                <h:panelGroup id="gesevntsincl" layout="block">


                    <p:growl id="messages" showDetail="true" />

                    <p:schedule id="schedule" value="#{scheduleController.eventModel}"
                        widgetVar="myschedule">

                        <p:ajax event="dateSelect"
                            listener="#{scheduleController.onDateSelect}"
                            update="eventDetails" oncomplete="eventDialog.show()" />
                        <p:ajax event="eventSelect"
                            listener="#{scheduleController.onEventSelect}"
                            update="eventDetails" oncomplete="eventDialog.show()" />
                        <p:ajax event="eventMove"
                            listener="#{scheduleController.onEventMove}" update="messages" />
                        <p:ajax event="eventResize"
                            listener="#{scheduleController.onEventResize}" update="messages" />

                    </p:schedule>

                    <p:dialog widgetVar="eventDialog" header="Event Details"
                        showEffect="clip" hideEffect="clip">
                        <h:panelGrid id="eventDetails" columns="2">
                            <h:outputLabel for="title" value="Title:" />
                            <p:inputText id="title" value="#{scheduleController.event.title}"
                                required="true" />

                            <h:outputLabel for="from" value="From:" />
                            <p:inputMask id="from"
                                value="#{scheduleController.event.startDate}" mask="99/99/9999">
                                <f:convertDateTime pattern="dd/MM/yyyy" />
                            </p:inputMask>

                            <h:outputLabel for="to" value="To:" />
                            <p:inputMask id="to" value="#{scheduleController.event.endDate}"
                                mask="99/99/9999">
                                <f:convertDateTime pattern="dd/MM/yyyy" />
                            </p:inputMask>

                            <h:outputLabel for="allDay" value="All Day:" />
                            <h:selectBooleanCheckbox id="allDay"
                                value="#{scheduleController.event.allDay}" />

                            <p:commandButton type="reset" value="Reset" />
                            <p:commandButton id="addButton" value="Save"
                                actionListener="#{scheduleController.addEvent}"
                                oncomplete="myschedule.update();eventDialog.hide();" />
                        </h:panelGrid>
                    </p:dialog>


                </h:panelGroup>

            </h:panelGroup>


            <div id="tasksbar" />
            <div id="startbutn" />

            <h:panelGroup id="startmenudiv">
                <h:panelGroup id="substartmenudiv" />
            </h:panelGroup>
            <div style="visibility: hidden;">
                <BR />
                <BR /> <BR /> <BR /> <BR /> <BR /> <BR /> <BR /> <BR /> <BR />
                <BR /> <BR /> <BR />
                <BR /> <BR /> <BR /> <BR />
                <BR /> <BR /> <BR /> <BR />
                <BR /> <BR /> <BR /> <BR /> <BR /> <BR /> <BR /> <BR /> <BR />
                <BR /> <BR /> <BR />
                <BR /> <BR /> <BR /> <BR />
                <BR /> <BR /> <BR /> <BR />
                <BR /> <BR /> <BR /> <BR /> <BR /> <BR /> <BR /> <BR /> <BR />
                <BR /> <BR /> <BR />
                <BR />

            </div>

            <div id="loginbackground" />
            <div id="logindivflip">
                <div id="logindiv">
                    <br />
                    <div class="hidden" style="font-weight: 900;">Welcome,please
                        authentificate :</div>
                    <br />

                    <div class="hidden">
                        <h:outputText value="login :" />
                        <h:inputText class="rounded" value="#{userBean.login}" />
                    </div>
                    <br /> <br />
                    <div class="hidden">
                        <h:outputText value="password :" />
                        <h:inputText class="rounded" value="#{userBean.pwd}" />
                    </div>
                    <br /> <br />
                    <div class="hidden">
                        <span class="ebbtn"> <a id="logsubmitbtn" href=""
                            title="Reset" onclick="">Submit <f:ajax event="click"
                                    execute="@this" listener="#{userBean.verifierUserDsLdap}" />
                        </a> <a id="resetbtn" href="" title="Reset" onclick="">Reset</a>
                        </span>
                    </div>


                </div>
                <div id="loginphoto" />
            </div>



            <p:remoteCommand name="addNewWindow"
                actionListener="#{userBean.addNewWindow}">
                <f:param name="windowname" />
            </p:remoteCommand>

            <p:remoteCommand name="updatewinstylprops"
                actionListener="#{userBean.updatewinstylprops}">
                <f:param name="windowid" />
                <f:param name="top" />
                <f:param name="left" />
                <f:param name="width" />
                <f:param name="height" />
            </p:remoteCommand>




        </h:form>
    </f:view>
</body>
</html>

THanks for help!

Community
  • 1
  • 1
Bardelman
  • 2,176
  • 7
  • 43
  • 70
  • I don't think you understand fully the solution to the question you referenced. Post a concise example of your working code here. The solution clearly states that you shouldn't include JQuery separately; Doing that doesn't explain the problem you're describing – kolossus Apr 28 '13 at 23:08
  • i've referenced 2 questions : the first one is about the problem of the schedual which is blocking other UI components using ajax and the second question is only to show my code where i used the schedual and i m not asking that question about jquery again in here. but ok , i ll post the code here too again :) – Bardelman Apr 28 '13 at 23:39
  • this schedual doesn't work : http://www.primefaces.org/showcase/ui/schedule.jsf BUT this one work :http://www.primefaces.org/showcase/ui/schedule.jsf – Bardelman May 04 '13 at 14:55

0 Answers0