Commit 8eaa981c by Petri Jarvisalo

wizard

1 parent a6f97792
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="MoyaWeb">
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
......
.ui-widget,.ui-widget .ui-widget,.ui-button-text {
.ui-widget,.ui-widget .ui-widget,.ui-button-text, .ui-wizard-step-title {
font-size: 90% !important;
}
......
......@@ -9,8 +9,9 @@
</f:metadata>
<ui:define name="content">
<h1>Create tournament</h1>
<h:form>
<p:wizard widgetVar="wiz" flowListener="#{createWizard.onFlowProcess}">
<p:wizard widgetVar="wiz" flowListener="#{tournamentCreateView.onFlowProcess}">
<p:tab id="selectGame" title="Select a game">
......@@ -18,21 +19,75 @@
<h:messages errorClass="error" />
Select a game
<p:selectOneMenu>
<f:selectItem itemLabel="" />
<f:selectItem itemLabel="spurdo spärde" />
<f:selectItem itemLabel="cockmaster" />
</p:selectOneMenu>
<h:outputText value="or" />
<p:button />
<h2>Create new game</h2>
<h:selectBooleanCheckbox value="#{createWizard.skip}" />
<h:panelGrid columns="2">
<h:outputText value="Name" />
<h:outputText value="Description" />
<p:inputText />
<p:inputText />
<h:outputText value="Upload image" />
<h:outputText value="" />
<p:fileUpload mode="simple" />
</h:panelGrid>
</p:panel>
</p:tab>
<p:tab id="selectRuleset" title="Select a ruleset">
<p:panel header="Select a ruleset">
<h:messages errorClass="error" />
Select a ruleset
<p:selectOneMenu>
<f:selectItem itemLabel="" />
<f:selectItem itemLabel="Pro-rules" />
<f:selectItem itemLabel="N00b-rules" />
</p:selectOneMenu>
<br />
<h2>Create new ruleset</h2>
<h:outputText value="Rule Name" />
<br />
<p:inputText />
<br />
<h:outputText value="Description" />
<br />
<p:inputTextarea />
</p:panel>
</p:tab>
<p:tab id="selectRegTimes" title="Set registration times">
<p:panel header="Select registration times">
<h:messages errorClass="error" />
<h2>Registration</h2>
<h:panelGrid columns="2">
<h:outputText value="Opens" />
<h:outputText value="Closees" />
<p:calendar stepHour="1" stepMinute="10" pattern="dd.MM.yyyy hh:mm" />
<p:calendar stepHour="1" stepMinute="10" pattern="dd.MM.yyyy hh:mm" />
</h:panelGrid>
<h2>Event Start time</h2>
<h:panelGrid>
<h:outputText value="Start time" />
<p:calendar stepHour="1" stepMinute="10" pattern="dd.MM.yyyy hh:mm" />
</h:panelGrid>
</p:panel>
<div style="float: right;">
<p:commandButton icon="apply" value="Create event" />
</div>
</p:tab>
</p:wizard>
</h:form>
......
package fi.codecrew.moya.web.cdiview.tournaments;
import java.io.Serializable;
import fi.codecrew.moya.model.Role;
import fi.codecrew.moya.web.cdiview.GenericCDIView;
import javax.ejb.EJB;
import javax.enterprise.context.ConversationScoped;
import javax.faces.event.ActionEvent;
import javax.inject.Named;
import org.primefaces.event.FlowEvent;
@Named
@ConversationScoped
public class TournamentCreateView implements Serializable {
/**
*
*/
private static final long serialVersionUID = 2547358764980373797L;
// called on finish
public void save(ActionEvent actionEvent) {
}
public String onFlowProcess(FlowEvent event) {
return event.getNewStep();
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!