add side commands

This commit is contained in:
Anton Romanov 2019-11-24 23:22:05 +04:00
parent ac6bd13c6c
commit 107ddb90ac

View File

@ -20,48 +20,53 @@
</style> </style>
<p:panel id="panel" header="Статья" style="margin-bottom:10px;"> <p:panel id="panel" header="Статья" style="margin-bottom:10px;">
<h:panelGrid columns="2" cellpadding="5"> <h:panelGrid columns="2" cellpadding="5">
<h:outputLabel for="name" value="Название:"/> <h:panelGrid columns="2" cellpadding="5">
<p:inputText id="name" required="true" value="#{paperView.paper.title}"/> <h:outputLabel for="name" value="Название:"/>
<p:inputText id="name" required="true" value="#{paperView.paper.title}"/>
<p:outputLabel for="@next" value="Статус:"/> <p:outputLabel for="@next" value="Статус:"/>
<p:panelGrid columns="2" id="paperStatus"> <p:panelGrid columns="2" id="paperStatus">
<p:selectOneMenu id="status" required="true" value="#{paperView.paper.status}" <p:selectOneMenu id="status" required="true" value="#{paperView.paper.status}"
converter="paperStatusConverter"> converter="paperStatusConverter">
<p:ajax update="mainForm:paperStatus" process="@this"/> <p:ajax update="mainForm:paperStatus" process="@this"/>
<f:selectItems value="#{paperView.paperStatuses}" <f:selectItems value="#{paperView.paperStatuses}"
var="status" var="status"
itemLabel="#{status.statusName}" itemLabel="#{status.statusName}"
itemValue="#{status}"/> itemValue="#{status}"/>
</p:selectOneMenu>
<ui:include src="paperStatusFragment.xhtml">
<ui:param name="paper" value="#{paperView.paper}"/>
<ui:param name="shortMode" value="true"/>
</ui:include>
</p:panelGrid>
<p:outputLabel for="@next" value="Тип:"/>
<p:selectOneMenu id="type" value="#{paperView.paper.type}"
converter="paperTypeConverter">
<f:selectItems value="#{paperView.paperTypes}"
var="type"
itemLabel="#{type.typeName}"
itemValue="#{type}"/>
</p:selectOneMenu> </p:selectOneMenu>
<ui:include src="paperStatusFragment.xhtml"> <p:outputLabel for="@next" value="Комментарий:"/>
<ui:param name="paper" value="#{paperView.paper}"/> <p:textEditor widgetVar="editor2" value="#{paperView.paper.comment}" height="300"
<ui:param name="shortMode" value="true"/> style="margin-bottom:10px" placeholder="Комментарий"/>
</ui:include>
<p:outputLabel for="@next" value="Авторы:"/>
<p:selectCheckboxMenu id="authors" value="#{paperView.paper.authors}" multiple="true"
converter="#{userConverter}">
<f:attribute name="collectionType" value="java.util.HashSet"/>
<f:selectItems value="#{paperView.authors}"
var="author"
itemLabel="#{author.userAbbreviate}"
itemValue="#{author}"/>
</p:selectCheckboxMenu>
<p:commandButton action="#{paperView.save}" value="Сохранить" ajax="true" process="@form"/>
</h:panelGrid>
<p:panelGrid columns="1">
<p:link href="/conference/conferenceList.xhtml" value="Статья участвует в конференции"/>
</p:panelGrid> </p:panelGrid>
<p:outputLabel for="@next" value="Тип:"/>
<p:selectOneMenu id="type" value="#{paperView.paper.type}"
converter="paperTypeConverter">
<f:selectItems value="#{paperView.paperTypes}"
var="type"
itemLabel="#{type.typeName}"
itemValue="#{type}"/>
</p:selectOneMenu>
<p:outputLabel for="@next" value="Комментарий:"/>
<p:textEditor widgetVar="editor2" value="#{paperView.paper.comment}" height="300"
style="margin-bottom:10px" placeholder="Комментарий"/>
<p:outputLabel for="@next" value="Авторы:"/>
<p:selectCheckboxMenu id="authors" value="#{paperView.paper.authors}" multiple="true"
converter="#{userConverter}">
<f:attribute name="collectionType" value="java.util.HashSet"/>
<f:selectItems value="#{paperView.authors}"
var="author"
itemLabel="#{author.userAbbreviate}"
itemValue="#{author}"/>
</p:selectCheckboxMenu>
</h:panelGrid> </h:panelGrid>
<p:commandButton action="#{paperView.save}" value="Сохранить" ajax="true" process="@form"/>
</p:panel> </p:panel>
</ui:define> </ui:define>
</ui:composition> </ui:composition>