[jboss-cvs] jboss-seam/examples/wiki/view/plugins/faqBrowser ...
Christian Bauer
christian at hibernate.org
Thu Jan 17 06:58:17 EST 2008
User: cbauer
Date: 08/01/17 06:58:17
Added: examples/wiki/view/plugins/faqBrowser
faqQuestionForm.xhtml plugin.xhtml
faqControls.xhtml
Log:
Fixes for faq browser
Revision Changes Path
1.1 date: 2008/01/17 11:58:16; author: cbauer; state: Exp;jboss-seam/examples/wiki/view/plugins/faqBrowser/faqQuestionForm.xhtml
Index: faqQuestionForm.xhtml
===================================================================
<s:div id="faqQuestionFormContainer"
styleClass="faqQuestionFormContainer"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
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:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:wiki="http://jboss.com/products/seam/wiki">
<c:if test="#{faqQuestionHome.showForm}">
<div class="box">
<h:form id="faqQuestionForm">
<div class="form">
<ui:include src="../../includes/statusIndicator.xhtml">
<ui:param name="statusId" value="faqQuestionFormStatus"/>
</ui:include>
<div class="formHead">
<h:outputText value="#{messages['faqBrowser.label.NewFaqQuestion']}: #{faqQuestionHome.parentNode.name}"/>
</div>
<a:region>
<s:div styleClass="formFields formBorder">
<s:decorate id="nameDecorate" template="../../includes/formFieldDecorate.xhtml">
<ui:define name="label">#{messages['faqBrowser.label.QuestionTitle']}</ui:define>
<h:inputText id="faqQuestionName" tabindex="1" size="60" maxlength="255" required="true" value="#{faqQuestionHome.instance.name}"/>
</s:decorate>
<ui:include src="../../includes/wikiTextEditor.xhtml">
<ui:param name="textEditorId" value="faqQuestion"/>
<ui:param name="textPreviewId" value="faqQuestionPreview"/>
<ui:param name="namingContainer" value="faqQuestionPlugin\\\\:faqQuestionForm"/>
<ui:param name="statusId" value="faqQuestionFormStatus"/>
<ui:param name="label" value="#{messages['faqBrowser.label.QuestionText']}"/>
<ui:param name="valueBinding" value="#{faqQuestionHome.formContent}"/>
<ui:param name="valueMaxLength" value="32768"/>
<ui:param name="valueRequired" value="true"/>
<ui:param name="textEditorColumns" value="60"/>
<ui:param name="textEditorRows" value="20"/>
</ui:include>
<s:div styleClass="marginLeft">
<ui:include src="../../includes/wikiTextPreview.xhtml">
<ui:param name="textPreviewId" value="faqQuestionPreview"/>
<ui:param name="valueBinding" value="#{faqQuestionHome.instance.content}"/>
<ui:param name="enablePlugins" value="false"/>
<ui:param name="baseDocument" value="#{faqQuestionHome.instance}"/>
<ui:param name="baseDirectory" value="#{currentDirectory}"/>
</ui:include>
</s:div>
</s:div>
<div class="formControls">
<div class="entry">
<div class="label"> </div>
<div class="input">
<a:commandLink id="save" action="#{faqQuestionHome.persist}"
eventsQueue="ajaxEventQueue"
reRender="faqBrowserPluginContainer, messageBoxContainer"
status="faqQuestionFormStatus"
tabindex="1"
styleClass="button saveButton sessionEventTrigger">
<h:outputText styleClass="buttonLabel" value="#{messages['faqBrowser.button.SaveNoKey']}"/>
</a:commandLink>
<a:commandLink action="#{faqQuestionHome.cancel}"
reRender="faqBrowserPluginContainer, messageBoxContainer"
immediate="true"
status="faqQuestionFormStatus"
eventsQueue="ajaxEventQueue"
tabindex="1" styleClass="buttonNonpersistent sessionEventTrigger">
<h:outputText styleClass="buttonLabel" value="#{messages['faqBrowser.button.CancelNoKey']}"/>
</a:commandLink>
</div>
</div>
</div>
</a:region>
</div>
</h:form>
</div>
</c:if>
</s:div>
1.1 date: 2008/01/17 11:58:16; author: cbauer; state: Exp;jboss-seam/examples/wiki/view/plugins/faqBrowser/plugin.xhtml
Index: plugin.xhtml
===================================================================
<wiki:plugin id="faqBrowserPlugin"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:wiki="http://jboss.com/products/seam/wiki"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:s="http://jboss.com/products/seam/taglib">
<s:div id="faqBrowserPluginContainer">
<ui:include src="faqControls.xhtml"/>
<ui:include src="faqQuestionForm.xhtml"/>
</s:div>
</wiki:plugin>
1.1 date: 2008/01/17 11:58:16; author: cbauer; state: Exp;jboss-seam/examples/wiki/view/plugins/faqBrowser/faqControls.xhtml
Index: faqControls.xhtml
===================================================================
<s:div id="faqControlsContainer"
styleClass="faqControlsContainer"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:wiki="http://jboss.com/products/seam/wiki"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:s="http://jboss.com/products/seam/taglib"
rendered="#{not faqQuestionHome.showForm}">
<h:form id="faqsSelectorForm">
<s:div styleClass="faqBrowserPanel">
<h:panelGrid columns="5"
columnClasses="categoryLabel, categoryMenu, questionsControl, categoryLink, status"
cellpadding="0" cellspacing="0" border="0">
<s:span>
<h:outputText value="#{messages['faqBrowser.label.Category']}:"/>
</s:span>
<s:span>
<h:selectOneMenu value="#{faqBrowser.selectedDir}"
converter="#{nestedSetNodeWrapperRestrictedEntityConverter}"
styleClass="ajaxSupport" tabindex="1">
<s:selectItems value="#{faqBrowser.tree.wrappedChildren}"
var="faqsDir"
label="#{wiki:repeatString(' · ',faqsDir.level-1)}#{wiki:truncateString(faqsDir.wrappedNode.name, 40, '...')}"/>
<a:support event="onchange" status="faqsSelectorFormStatus"
action="#{faqBrowser.showQuestions}"
reRender="faqQuestions, faqQuestionsControl, faqCategoryLink, messageBoxContainer"/>
</h:selectOneMenu>
</s:span>
<s:span id="faqQuestionsControl">
<a:commandLink action="#{faqBrowser.showQuestions}" tabindex="1"
reRender="faqQuestions, faqQuestionsControl, faqCategoryLink, messageBoxContainer"
status="faqsSelectorFormStatus"
rendered="#{not faqBrowser.directorySelected}">
<h:graphicImage value="/themes/#{preferences.get('Wiki').themeName}/img/down.gif" width="18" height="18"/>
</a:commandLink>
<a:commandLink action="#{faqBrowser.hideQuestions}" tabindex="1"
reRender="faqQuestions, faqQuestionsControl, faqCategoryLink, messageBoxContainer"
status="faqsSelectorFormStatus"
rendered="#{faqBrowser.directorySelected}">
<h:graphicImage value="/themes/#{preferences.get('Wiki').themeName}/img/up.gif" width="18" height="18"/>
</a:commandLink>
</s:span>
<s:span id="faqCategoryLink" styleClass="undecoratedLink">
<s:fragment rendered="#{faqBrowser.directorySelected}">
<h:outputLink value="#{wiki:renderWikiURL(currentDocument)}/Category/#{faqBrowser.selectedDir.wrappedNode.wikiname}">
<h:outputText value="Link"/>
</h:outputLink>
</s:fragment>
</s:span>
<s:span>
<ui:include src="../../includes/statusIndicator.xhtml">
<ui:param name="statusId" value="faqsSelectorFormStatus"/>
</ui:include>
</s:span>
</h:panelGrid>
</s:div>
<s:div id="faqQuestions">
<s:div styleClass="faqQuestionPanel" rendered="#{faqBrowser.directorySelected}">
<h:panelGrid columns="2" styleClass="header" columnClasses="categoryDescription, newQuestionButton"
cellpadding="0" cellspacing="0" border="0">
<h:outputText value="#{faqBrowser.selectedDir.wrappedNode.description}"/>
<s:fragment rendered="#{s:hasPermission('Node', 'create', faqBrowser.selectedDir.wrappedNode)}">
<a:commandLink action="#{faqQuestionHome.newQuestion()}"
reRender="faqBrowserPluginContainer, messageBoxContainer"
status="faqsSelectorFormStatus"
accesskey="#{messages['faqBrowser.button.NewQuestion.accesskey']}"
tabindex="1" styleClass="buttonNonpersistent">
<h:outputText styleClass="buttonLabel" escape="false" value="#{messages['faqBrowser.button.NewQuestion']}"/>
</a:commandLink>
</s:fragment>
</h:panelGrid>
<h:dataTable value="#{faqBrowser.questions}" var="q" rendered="#{not empty faqBrowser.questions}"
styleClass="faqQuestionList"
columnClasses="defaultColumn alignLeft minorPadding wrapWhitespace, twentyPercentColumn alignLeft minorPadding smallFont"
rowClasses="rowOdd, rowEven"
cellpadding="0" cellspacing="0" border="0">
<h:column>
<h:outputLink value="#{wiki:renderURL(q)}">
<h:outputText value="#{q.name}"/>
</h:outputLink>
</h:column>
<h:column>
<s:fragment rendered="#{!empty q.lastModifiedOn and !empty q.lastModifiedBy}">
<h:outputText value="#{messages['faqBrowser.label.Updated']}: "/>
<h:outputText value="#{q.lastModifiedOn}">
<f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
</h:outputText>
(<s:span styleClass="undecoratedLink">
<s:link view="/userInfo_#{skin}.xhtml" propagation="none">
<f:param name="userId" value="#{q.lastModifiedBy.id}"/>
<h:outputText value="#{q.lastModifiedBy.username}"/>
</s:link>
</s:span>)
</s:fragment>
</h:column>
</h:dataTable>
<s:div styleClass="noQuestions" rendered="#{empty faqBrowser.questions}">
<h:outputText value="#{messages['faqBrowser.label.NoQuestionsInCategory']}"/>
</s:div>
</s:div>
</s:div>
</h:form>
</s:div>
More information about the jboss-cvs-commits
mailing list