fix template
This commit is contained in:
parent
6b90d7b0c0
commit
4c4c1b2015
@ -30,7 +30,7 @@ public class FacesUtil {
|
|||||||
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary, detail);
|
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary, detail);
|
||||||
FacesContext fc = FacesContext.getCurrentInstance();
|
FacesContext fc = FacesContext.getCurrentInstance();
|
||||||
fc.getExternalContext().getFlash().setKeepMessages(true);
|
fc.getExternalContext().getFlash().setKeepMessages(true);
|
||||||
fc.addMessage(null, message);
|
fc.addMessage("messages", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void showDangerMessage(String summary, String detail) {
|
public static void showDangerMessage(String summary, String detail) {
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
</f:facet>
|
</f:facet>
|
||||||
</p:menubar>
|
</p:menubar>
|
||||||
<div class="ui-fluid">
|
<div class="ui-fluid">
|
||||||
<p:growl id="messages"/>
|
<p:growl id="messages" for="messages"/>
|
||||||
<ui:insert name="content">Content</ui:insert>
|
<ui:insert name="content">Content</ui:insert>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,57 +17,97 @@
|
|||||||
border: none;
|
border: none;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#mainForm\:paperPanel > tbody > tr {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mainForm\:paperPanel > tbody > tr > td {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
</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">
|
<p:panelGrid cellpadding="5" id="paperPanel">
|
||||||
<h:panelGrid columns="2" cellpadding="5">
|
<p:row>
|
||||||
<h:outputLabel for="name" value="Название:"/>
|
<p:column>
|
||||||
<p:inputText id="name" required="true" value="#{paperView.paper.title}"/>
|
<h:outputLabel value="Название:"/>
|
||||||
|
</p:column>
|
||||||
<p:outputLabel for="@next" value="Статус:"/>
|
<p:column>
|
||||||
<p:panelGrid columns="2" id="paperStatus">
|
<p:inputText id="name" required="true" value="#{paperView.paper.title}"/>
|
||||||
<p:selectOneMenu id="status" required="true" value="#{paperView.paper.status}"
|
<p:message for="name"/>
|
||||||
converter="paperStatusConverter">
|
</p:column>
|
||||||
<p:ajax update="mainForm:paperStatus" process="@this"/>
|
<p:column>
|
||||||
<f:selectItems value="#{paperView.paperStatuses}"
|
<p:link href="/conference/conferenceList.xhtml" value="Статья участвует в конференции"/>
|
||||||
var="status"
|
</p:column>
|
||||||
itemLabel="#{status.statusName}"
|
</p:row>
|
||||||
itemValue="#{status}"/>
|
<p:row>
|
||||||
|
<p:column>
|
||||||
|
<p:outputLabel for="paperStatus" value="Статус:"/>
|
||||||
|
</p:column>
|
||||||
|
<p:column>
|
||||||
|
<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:column>
|
||||||
|
</p:row>
|
||||||
|
<p:row>
|
||||||
|
<p:column>
|
||||||
|
<p:outputLabel for="type" value="Тип:"/>
|
||||||
|
</p:column>
|
||||||
|
<p:column>
|
||||||
|
<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:column>
|
||||||
<ui:param name="paper" value="#{paperView.paper}"/>
|
</p:row>
|
||||||
<ui:param name="shortMode" value="true"/>
|
|
||||||
</ui:include>
|
|
||||||
</p:panelGrid>
|
|
||||||
|
|
||||||
<p:outputLabel for="@next" value="Тип:"/>
|
<p:row>
|
||||||
<p:selectOneMenu id="type" value="#{paperView.paper.type}"
|
<p:column>
|
||||||
converter="paperTypeConverter">
|
<p:outputLabel for="comment" value="Комментарий:"/>
|
||||||
<f:selectItems value="#{paperView.paperTypes}"
|
</p:column>
|
||||||
var="type"
|
<p:column>
|
||||||
itemLabel="#{type.typeName}"
|
<p:textEditor id="comment" widgetVar="editor2" value="#{paperView.paper.comment}" height="300"
|
||||||
itemValue="#{type}"/>
|
style="margin-bottom:10px" placeholder="Комментарий"/>
|
||||||
</p:selectOneMenu>
|
</p:column>
|
||||||
<p:outputLabel for="@next" value="Комментарий:"/>
|
</p:row>
|
||||||
<p:textEditor widgetVar="editor2" value="#{paperView.paper.comment}" height="300"
|
<p:row>
|
||||||
style="margin-bottom:10px" placeholder="Комментарий"/>
|
<p:column>
|
||||||
|
<p:outputLabel for="authors" value="Авторы:"/>
|
||||||
|
</p:column>
|
||||||
|
<p:column>
|
||||||
|
<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:column>
|
||||||
|
</p:row>
|
||||||
|
|
||||||
<p:outputLabel for="@next" value="Авторы:"/>
|
<p:row>
|
||||||
<p:selectCheckboxMenu id="authors" value="#{paperView.paper.authors}" multiple="true"
|
<p:column>
|
||||||
converter="#{userConverter}">
|
<p:commandButton action="#{paperView.save}" value="Сохранить" ajax="true" process="@form"
|
||||||
<f:attribute name="collectionType" value="java.util.HashSet"/>
|
update="messages @form"/>
|
||||||
<f:selectItems value="#{paperView.authors}"
|
</p:column>
|
||||||
var="author"
|
</p:row>
|
||||||
itemLabel="#{author.userAbbreviate}"
|
</p:panelGrid>
|
||||||
itemValue="#{author}"/>
|
|
||||||
</p:selectCheckboxMenu>
|
|
||||||
<p:commandButton action="#{paperView.save}" value="Сохранить" ajax="true" process="@form"
|
|
||||||
update="messages"/>
|
|
||||||
</h:panelGrid>
|
|
||||||
<p:panelGrid columns="1">
|
|
||||||
<p:link href="/conference/conferenceList.xhtml" value="Статья участвует в конференции"/>
|
|
||||||
</p:panelGrid>
|
|
||||||
</h:panelGrid>
|
|
||||||
</p:panel>
|
</p:panel>
|
||||||
</ui:define>
|
</ui:define>
|
||||||
</ui:composition>
|
</ui:composition>
|
||||||
|
Loading…
Reference in New Issue
Block a user