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>
<p:panel id="panel" header="Статья" style="margin-bottom:10px;">
<h:panelGrid columns="2" cellpadding="5">
<h:outputLabel for="name" value="Название:"/>
<p:inputText id="name" required="true" value="#{paperView.paper.title}"/>
<h:panelGrid columns="2" cellpadding="5">
<h:outputLabel for="name" value="Название:"/>
<p:inputText id="name" required="true" value="#{paperView.paper.title}"/>
<p:outputLabel for="@next" value="Статус:"/>
<p:panelGrid columns="2" id="paperStatus">
<p:selectOneMenu id="status" required="true" value="#{paperView.paper.status}"
converter="paperStatusConverter">
<p:ajax update="mainForm:paperStatus" process="@this"/>
<f:selectItems value="#{paperView.paperStatuses}"
var="status"
itemLabel="#{status.statusName}"
itemValue="#{status}"/>
<p:outputLabel for="@next" value="Статус:"/>
<p:panelGrid columns="2" id="paperStatus">
<p:selectOneMenu id="status" required="true" value="#{paperView.paper.status}"
converter="paperStatusConverter">
<p:ajax update="mainForm:paperStatus" process="@this"/>
<f:selectItems value="#{paperView.paperStatuses}"
var="status"
itemLabel="#{status.statusName}"
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>
<ui:include src="paperStatusFragment.xhtml">
<ui:param name="paper" value="#{paperView.paper}"/>
<ui:param name="shortMode" value="true"/>
</ui:include>
<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>
<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: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>
<p:commandButton action="#{paperView.save}" value="Сохранить" ajax="true" process="@form"/>
</p:panel>
</ui:define>
</ui:composition>