xml version encoding UTF-8 html xmlns http www w3 org 1999 xhtml xmlns

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:t="http://myfaces.apache.org/tomahawk">
<ui:composition template="/WEB-INF/template/default.xhtml">
<ui:param name="title" value="Security Plan Generator - Web Edition" />
<ui:define name="content">
<f:loadBundle basename="com.camayu.resources.errors" var="error_msg"/>
<a4j:form id="generator">
<t:div styleClass="chaptersItem" id="chaptersItem" forceId="true">
<a4j:repeat value="#{spgWebBean.chapterDetails}" var="chapterDetails">
<a4j:commandLink id="chapterLnk"
actionListener="#{spgWebBean.goToChapter}"
reRender="questionsContainer, chaptersItem"
oncomplete="setScrollableAreaHeight()"
styleClass="#{spgWebBean.currentChapter == chapterDetails.number ? 'currentChapter' : chapterDetails.verified ? 'verifiedChapter' : 'unvisitedChapter'}"
immediate="true">
<f:attribute name="chapter" value="#{chapterDetails.number}"/>
<h:outputText value="#{chapterDetails.title}" />
</a4j:commandLink>
<rich:componentControl for="panel" attachTo="chapterLnk" operation="show" event="onclick" rendered="#{!spgWebBean.dontShowChapterAlert}"/>
</a4j:repeat>
</t:div>
<t:div styleClass="questionsContainer" id="questionsContainer" forceId="true">
<t:div styleClass="questions" id="questions">
<a4j:repeat value="#{spgWebBean.currentQuestions}" var="question">
<t:div>
<h:panelGroup rendered="#{not empty question.tooltip}" style="position:absolute;right:8px;">
<img class="alignMiddle" id="tip${question.number}"
src="${request.contextPath}/images/blue_info.gif" />
<script type="text/javascript">
infoTip('tip${question.number}', 'Information', '${question.tooltip}');
</script>
</h:panelGroup>
<t:div styleClass="floatLeft">
<h:outputText value="#{question.fullNumber}" escape="false" />
<h:outputText rendered="#{question.mandatory}" style="color:red" value="*" escape="false"/>
</t:div>
<t:div styleClass="ml40#{not empty question.tooltip ? ' pr12' : ''}">
<h:outputText value="#{question.text}" escape="false" />
</t:div>
</t:div>
<t:div styleClass="spacer10"></t:div>
<t:div styleClass="ml40">
<t:div rendered="#{question.type == 'FreeText'}" >
<t:inputTextarea tabindex="72"
style="widthFull"
value="#{question.value}"
styleClass="height5em input_360" cols="80" rows="6"
disabled="#{question.disabled}">
</t:inputTextarea>
</t:div>
<t:div rendered="#{question.type == 'SimpleYesNo'}">
<h:selectOneRadio disabled="#{question.disabled}" value="#{question.value}">
<t:selectItems value="#{question.options}" var="option"
itemLabel="#{option.text}" itemValue="#{option.id}" />
<a4j:support event="onclick" reRender="questions"
actionListener="#{spgWebBean.checkDependencies}" />
</h:selectOneRadio>
</t:div>
<t:div rendered="#{question.type == 'RadioGroup'}">
<h:selectOneRadio layout="pageDirection" disabled="#{question.disabled}" value="#{question.value}">
<t:selectItems value="#{question.options}" var="option"
itemLabel="#{option.text}" itemValue="#{option.id}" />
<a4j:support event="onclick" reRender="questions"
actionListener="#{spgWebBean.checkDependencies}" />
</h:selectOneRadio>
</t:div>
<t:div rendered="#{question.type == 'CheckboxesList'}">
<h:selectManyCheckbox layout="pageDirection" disabled="#{question.disabled}" value="#{question.values}">
<t:selectItems value="#{question.options}" var="option"
itemLabel="#{option.text}" itemValue="#{option.id}" />
<a4j:support event="onclick" reRender="questions"
actionListener="#{spgWebBean.checkDependencies}" />
</h:selectManyCheckbox>
</t:div>
<h:outputText style="color:red"
rendered="#{not empty spgWebBean.chapterErrors[question.id].code}"
value="#{error_msg[spgWebBean.chapterErrors[question.id].code]}" />
</t:div>
<t:div styleClass="hSpacer"></t:div>
<t:div styleClass="spacer10"></t:div>
</a4j:repeat>
<t:div styleClass="floatLeft">
<t:commandButton value="reset" action="#{spgWebBean.reset}" immediate="true"/>
<t:commandButton value="save" action="#{spgWebBean.save}"/>
</t:div>
<t:div styleClass="floatRight">
<a4j:commandButton disabled="#{spgWebBean.currentChapter == 1}" value="&lt;&lt; previous" actionListener="#{spgWebBean.previous}"
reRender="questionsContainer, chaptersItem" oncomplete="setScrollableAreaHeight()"/>
<a4j:commandButton disabled="#{spgWebBean.lastChapter}" value="next &gt;&gt;" actionListener="#{spgWebBean.next}"
reRender="questionsContainer, chaptersItem" oncomplete="setScrollableAreaHeight()"/>
</t:div>
</t:div>
<t:div styleClass="spacer10"></t:div>
</t:div>
</a4j:form>
<a4j:form ajaxSingle="true">
<rich:modalPanel id="panel" width="580" height="220" resizeable="#{false}">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Chapter Navigation"></h:outputText>
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<a4j:commandButton id="hideBtn" image="/images/close.gif"
style="cursor:pointer;margin-right:10px;margin-top:2px;"
reRender="chaptersItem"
title="close" alt="close"/>
<rich:componentControl for="panel" attachTo="hideBtn"
operation="hide" event="onclick" />
</h:panelGroup>
</f:facet>
<t:div styleClass="pt10 floatLeft">
<h:graphicImage value="images/warning.png"/>
</t:div>
<t:div styleClass="modalText">
<h:outputText value="Moving between chapters using the navigation bar does not mark the chapter as complete.
To mark the chapter as complete use the next button."/>
</t:div>
<t:div styleClass="spacer10"></t:div>
<t:div styleClass="ml46">
<h:selectBooleanCheckbox id="boolCheckBox">
<a4j:support event="onclick" actionListener="#{spgWebBean.toggleChaptersAlert}"/>
</h:selectBooleanCheckbox>
<h:outputLabel for="boolCheckBox" value="Do not show this message again"/>
</t:div>
<a4j:commandButton value="Close" id="closePanelBtn" styleClass="floatRight"
reRender="chaptersItem"/>
<rich:componentControl for="panel" attachTo="closePanelBtn"
operation="hide" event="onclick"/>
</rich:modalPanel>
</a4j:form>
</ui:define>
</ui:composition>
</html>