当我调用print方法时,jsf inputtext什么都不返回

时间:2013-09-17 12:19:24

标签: jsf-2 primefaces

为什么,当我调用print方法过滤器返回null时?

 <ui:define>
  <h:form>
   <div>
    <div>
     <span>
       <h:form>
           <p:panelgrid>
           ...
            <p:outputLabel value="Исполнитель-инженер :"/>    
            <h:inputText id="Eng" value="#{issueMoscowBean.changeIssue.engineerInf}"/>
            ...
            close tags

并打印方法

   @Named
   @Scope("session")
   public class IssueMoscowBean implements Serializable {

...

   public void saveOpen() throws CloneNotSupportedException {
   if (listOpenI.contains(current)) {
     System.out.println("CURRENT IN " + current.getEngineerInf());
     listOpenI.set(listOpenI.indexOf(current), changeIssue);
     System.out.println("Change IN " + changeIssue.getEngineerInf());
...
}

控制台输出是: CURRENT IN null 改变为空

<ui:composition template="/templates/layout.xhtml"
            xmlns="http://www.w3.org/1999/xhtml"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:p="http://primefaces.org/ui"
            xmlns:c="http://java.sun.com/jsp/jstl/core"
            >
<ui:define name="content">
    <style>
        .colStyle1 { width: 25% !important;

        }
        .colStyle2 { width: 85% !important;
        }
    </style>
    <h:form id="form">
        <div style="width:88%; margin:auto !important; text-align: center;">
            <p:tabMenu  activeIndex="2" style=" width:100%; font-size: 14px !important; margin:0px auto !important;  ">  
                <p:menuitem  value="#{issueMoscowBean.getAllI()}" url="/modules/core/views/all.xhtml" onclick="#{issueMoscowBean.setFirstOpen()}"/>  
                <p:menuitem value="#{issueMoscowBean.getNewI()}" url="/modules/core/views/new.xhtml" />  
                <p:menuitem value="#{issueMoscowBean.getOpenI()}" url="#" />  
                <p:menuitem value="#{issueMoscowBean.getSetI()}" url="/modules/core/views/set.xhtml"/>  
                <p:menuitem value="#{issueMoscowBean.getExecI()}" url="/modules/core/views/execute.xhtml"/>  
                <p:menuitem value="#{issueMoscowBean.getClI()}" url="/modules/core/views/close.xhtml"/>  
                <p:menuitem value="#{issueMoscowBean.getRetI()}" url="/modules/core/views/return.xhtml"/>  
            </p:tabMenu>  
            <br/> 
            <br/>



            <p:panelGrid style="padding-top: 0">                 
                <p:selectOneMenu value="#{issueMoscowBean.param}" style="width: 20% !important; height: 100px">  
                    <f:selectItem itemLabel="Выбрать критерий" itemValue="10" />  
                    <f:selectItem itemLabel="По номеру заявки" itemValue="0" />  
                    <f:selectItem itemLabel="По серийному номеру устройства" itemValue="1" />  
                    <f:selectItem itemLabel="По ID регистраиции в ПС" itemValue="2" />  
                    <f:selectItem itemLabel="По контактному лицу банка-клиента" itemValue="3" />  
                </p:selectOneMenu>  
                <h:inputText id="myFilter_text" value="#{issueMoscowBean.filter}" style="float: left;width: auto !important"/>
                <p:commandButton value="Поиск" update="@all" ajax="true" style="float: left;width: auto !important"/>                   
            </p:panelGrid>


            <div style="width: 100%;padding-bottom: 5%;height: 75%">

                <span style="float: left; width: 25%">
                    <p:dataTable id="dataTable" var="mem" value="#{issueMoscowBean.listOpenI}" widgetVar="Заявки"  
                                 style="width:100% !important; text-align: left; width: 100%;height: 100% !important; overflow-y: auto;overflow-x: auto;font-family: Cambria;background-color: white" 

                                 selection="#{issueMoscowBean.current}" selectionMode="single" rowKey="#{mem.docId}" rowStyleClass="#{mem.status eq 'Новая' ? 'new':
                                              null}">

                        <p:ajax event="rowSelect"  update=":form:issueDetailForm:display" />  
                        <p:column  filterMatchMode="contains" sortBy="#{mem.docId}" headerText="Список всех заявок" style="font-family: Cambria">  
                            <h:outputText value="Время получения наряда:#{mem.taskRetrieved}"   title="View" style="font-size: 15px !important;"/>
                            <br/>
                            <h:outputText value="№ серийный устройства:#{mem.atmSerial}"  title="View" style="font-size: 15px !important;"/>
                            <br/>
                            <h:outputText value="Город:#{mem.city}"  title="View" style="font-size: 15px !important;"/>
                        </p:column>
                    </p:dataTable>  
                </span>
                <span style="float: left;width: 75%;height: available">
                    <h:form id="issueDetailForm" rendered="#{issueMoscowBean.openIsEmptyTAble()}" >
                        <p:panelGrid id="display"  columns="2" columnClasses="colStyle1,colStyle2"  style="margin:0 auto;width: 100%;" >  
                            <f:facet name="header">
                                <p:outputPanel>
                                    <h:outputText value="Просмотр данных заявки"/>
                                </p:outputPanel>
                            </f:facet>
                            <h:outputText  value="№ документа ССС :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.docId}"/>

                            <h:outputText value="№ наряда :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.naryadRecId}"/>

                            <h:outputText value="Тип наряда :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.naryadType}"/>

                            <h:outputText value="TransmasterID :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.transmasterID}"/>

                            <h:outputText value="Модель устройства :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.atmModel}"/>

                            <h:outputText value="№ серийный устройства:"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.atmSerial}"/>

                            <h:outputText value="Районный центр :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.rc}"/>

                            <h:outputText value="Область :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.oblast}"/>

                            <h:outputText value="Город :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.city}"/>

                            <h:outputText value="Адрес :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.adress}"/>

                            <h:outputText value="Название организации установки:"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.org}"/>

                            <h:outputText value="Время сбоя :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.issueCreated}"/>

                            <h:outputText value="Код ошибки :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.errorCode}"/>

                            <h:outputText value="MSTATUS_MDATA :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.mstatus_mdata}"/>

                            <h:outputText value="№ инцидента ITSM :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.incidentNumber}"/>

                            <h:outputText value="Дата инцидента в ITSM :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.incidentCreated}"/>

                            <h:outputText value="Дата наряда в ITSM :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.naryadCreated}"/>

                            <h:outputText value="Тип сбоя в ITSM :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.srbCode}"/>

                            <h:outputText value="Описание для ССС:"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.sssDescription}"/>

                            <h:outputText value="Cтатус сейфа :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.safeStatus}"/>

                            <h:outputText value="Код закрытия :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.closeStstus}"/>

                            <h:outputText value="Время получения наряда :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.taskRetrieved}"/>

                            <h:outputText value="Время последнего обновления :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.taskLastUpdated}"/>

                            <h:outputText value="Источник последнего обновления :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.taskLastUpdatedBy}"/>

                            <p:outputLabel value="Тип обслуживания :">
                                <p:message  for="LevelService" id="wrongTypeService" />
                            </p:outputLabel>
                            <p:selectOneMenu id="LevelService" value="#{issueMoscowBean.changeIssue.taskLevelService}">  
                                <f:selectItem itemLabel="ПСО" itemValue="1" />  
                                <f:selectItem itemLabel="Разовое" itemValue="2" />  
                                <p:ajax event="blur" update="wrongTypeService"/>
                            </p:selectOneMenu> 

                            <p:outputLabel value="Номер договора :">
                                <p:message  for="NumIssue" id="wrongNumIssue" />
                            </p:outputLabel>
                            <h:inputText id="NumIssue" value="#{issueMoscowBean.changeIssue.numIssue}" size="100" />
                            <p:outputLabel  value="Дата начала обслуживания :"/>
                            <p:calendar id="DateBegin"  value="#{issueMoscowBean.tempDate4}" locale="ru"   pattern="MM/dd/yyyy HH:mm:ss" />

                            <p:outputLabel value="Время устранения неисправности :"/>
                            <h:inputText id="Time" value="#{issueMoscowBean.changeIssue.sla}" size="100" />


                            <p:outputLabel value="Исполнитель-инженер :"/>    
                            <h:inputText id="Eng" value="#{issueMoscowBean.changeIssue.engineerInf}"/>


                            <p:outputLabel value="Дата и время передачи заявки инженеру :"/>
                            <p:calendar id="SendEng"  value="#{issueMoscowBean.tempDate5}" locale="ru"   pattern="MM/dd/yyyy HH:mm:ss" />


                            <p:outputLabel value="Тип работ :"></p:outputLabel>
                            <p:selectOneMenu value="#{issueMoscowBean.changeIssue.taskWorkValue}" style="width: 100%">   
                                <f:selectItem itemLabel="Ремонт" itemValue="1" />  
                                <f:selectItem itemLabel="Профилактика" itemValue="2" />  
                                <f:selectItem itemLabel="Апгрейд" itemValue="2" />  
                                <f:selectItem itemLabel="Запуск в эксплуатацию" itemValue="2" />  
                            </p:selectOneMenu> 

                            <p:outputLabel value="Номер заявки вендора :"/>                                  
                            <h:inputText id="NumVendor" value="#{issueMoscowBean.changeIssue.numIssueVendor}" size="100" />


                            <h:outputText value="Cтатус :"></h:outputText>
                            <h:outputText value="#{issueMoscowBean.changeIssue.status} " />


                            <f:facet name="footer">       
                                <p:commandButton value="Отменить изменения"  update="issueDetailForm" process="@this"  action="#{issueMoscowBean.back}" immediate="true" />
                                <p:commandButton value="Cохранить изменения"  update="issueDetailForm" process="@this"  action="#{issueMoscowBean.saveOpen}" immediate="true" />
                                <p:commandButton value="Назначить заявку" update=":form:dataTable, :growl" oncomplete="issueDialog2.show()"  actionListener="#{issueMoscowBean.setI()}"/>
                                <p:commandButton value="Отменить Заявку"  update=":form:issueDetailForm:display" process="@this"  action="#{issueMoscowBean.setShowForm(1)}" immediate="true" />      
                                <p:panelGrid id="display2" columns="2"   columnClasses="colStyle1,colStyle2" rendered="#{issueMoscowBean.showForm}">   
                                    <h:outputText value="Опишите причину отмены :"></h:outputText>
                                    <p:inputTextarea value="#{issueMoscowBean.changeIssue.closeComment}" cols="10"/>                                                              
                                    <p:commandButton value="Отправить"      update=":form:dataTable" process="@this"  action="#{issueMoscowBean.returnIOpen()}" />
                                    <p:commandButton value="Отмена"  update=":form:issueDetailForm:display" process="@this"  action="#{issueMoscowBean.setShowForm(0)}"  immediate="true" />                                                                       
                                </p:panelGrid> 
                            </f:facet>

                        </p:panelGrid> 
                    </h:form>
                </span>
            </div>
        </div>
    </h:form>







    <p:growl id="growl" showDetail="true" life="5000" />
   </ui:define>
</ui:composition>

0 个答案:

没有答案