jsf initial
@ -0,0 +1,27 @@
|
||||
package ru.ulstu.index.controller;
|
||||
|
||||
import ru.ulstu.index.model.Section;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.faces.view.ViewScoped;
|
||||
import javax.inject.Named;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Named
|
||||
@ViewScoped
|
||||
public class IndexView {
|
||||
private List<Section> sections = new ArrayList<>();
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
sections.add(new Section("Статьи", "papers.jpg"));
|
||||
sections.add(new Section("Гранты", "grants.jpg"));
|
||||
sections.add(new Section("Проекты", "projects.jpg"));
|
||||
sections.add(new Section("Проекты", "projects.jpg"));
|
||||
}
|
||||
|
||||
public List<Section> getSections() {
|
||||
return sections;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package ru.ulstu.index.model;
|
||||
|
||||
public class Section {
|
||||
private String title;
|
||||
private String image;
|
||||
|
||||
public Section(String title, String image) {
|
||||
this.title = title;
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
||||
|
||||
<h:head>
|
||||
<title>Fuzzy logic</title>
|
||||
<h:outputStylesheet name="css/style.css"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
</h:head>
|
||||
|
||||
<h:body>
|
||||
<div class="ui-g">
|
||||
<div class="ui-g-2"></div>
|
||||
<div class="ui-g-8">
|
||||
<div class="ui-fluid">
|
||||
<ui:insert name="content">Content</ui:insert>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h:body>
|
||||
</html>
|
@ -0,0 +1,7 @@
|
||||
.ui-picklist-list-wrapper {
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
.ui-picklist-list {
|
||||
width: 100% !important;
|
||||
}
|
After Width: | Height: | Size: 307 B |
After Width: | Height: | Size: 174 B |
After Width: | Height: | Size: 254 B |
After Width: | Height: | Size: 597 B |
After Width: | Height: | Size: 539 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 356 KiB |
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://primefaces.org/ui"
|
||||
xmlns:h="http://xmlns.jcp.org/jsf/html">
|
||||
<ui:composition template="/basicTemplate.xhtml">
|
||||
<ui:define name="content">
|
||||
<p:dataGrid id="sections" var="section" value="#{indexView.sections}" columns="3" layout="grid"
|
||||
style="text-align:center">
|
||||
<p:panel id="pnl" header="#{section.title}" style="text-align:center;">
|
||||
<h:panelGrid columns="1" style="width:100%;">
|
||||
<p:graphicImage style="width:100%" name="img/main/#{section.image}"/>
|
||||
</h:panelGrid>
|
||||
</p:panel>
|
||||
</p:dataGrid>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
</html>
|