0% found this document useful (0 votes)
40 views4 pages

Suggestion Box

This document describes an XHTML page that implements a suggestion box component. It allows a user to search for and select a funcionario UIS. The suggestion box uses Ajax to query matching funcionarios and allows selecting one to populate an input field. Source code documentation is also provided through toggleable tabs.

Uploaded by

hruiz175272
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views4 pages

Suggestion Box

This document describes an XHTML page that implements a suggestion box component. It allows a user to search for and select a funcionario UIS. The suggestion box uses Ajax to query matching funcionarios and allows selecting one to populate an input field. Source code documentation is also provided through toggleable tabs.

Uploaded by

hruiz175272
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

suggestionBox.

xhtml

<!DOCTYPE composition PUBLIC "‐//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1‐transitional.dtd">
<ui:composition 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:rich="http://richfaces.org/rich"
xmlns:a="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jstl/core"
template="/plantillas/principalEstandar.xhtml">

<a:queue requestDelay="1000" ignoreDupResponce="true" />
<ui:define name="navegacion">
<s:link value="#{FormatoWeb.getMensaje('inicio',true)}"
styleClass="etiquetaNavegacion" action="inicio" />
<h:outputText value=" > " />
<h:outputText>#{FormatoWeb.getMensaje('consultar', true)} Componentes de Vista</h:outputText>
</ui:define>

<ui:define name="body">

<rich:panel>
<h:messages id="mensajes" infoClass="messageExito"
errorClass="message" warnClass="messageAdvertencia" />

<h:form>
<div align="center">
<h:panelGrid columns="1" width="100%">
<rich:toolBar />

<rich:spacer height="10" />

<a:outputPanel>
<s:decorate id="tituloGeneral"
template="/plantillas/titulo.xhtml">
<ui:define name="label"> Componentes de Vista <br></br> SuggestionBox </ui:define>
</s:decorate>
</a:outputPanel>
</h:panelGrid>
</div>

Page 1
suggestionBox.xhtml

<div align="right">
<h:outputText value="Humberto Ruiz" />
<br />
<h:outputText value="Version:1.0‐Marzo 2014 " />
</div>

<div align="center">
<rich:panel>
<h:panelGrid columns="3">

<s:decorate template="/plantillas/etiquetaNegrita.xhtml">
<ui:define name="label">
<h:outputText value="Funcionario UIS: " />
</ui:define>
</s:decorate>

<rich:spacer width="10" />

<s:decorate id="dcrEstudiante"
template="/plantillas/edicion.xhtml">

<h:panelGroup>
<h:panelGrid columns="2" border="0" cellpadding="0"
cellspacing="0">
<h:inputText id="inpTextoFuncionario" required="true"
style="width:580px;" styleClass="comboGrande" />
<h:graphicImage value="/imagenes/arrow.png"
onclick="#{rich:component('sugFuncionario')}.callSuggestion(true)"
alt="" />
</h:panelGrid>

<rich:suggestionbox id="sugFuncionario" width="600"
nothingLabel="No existen funcionarios con este criterio"
usingSuggestObjects="false" requestDelay="300"
suggestionAction="#{suggestionBoxEJB.criteriosUsuarios}"
var="funcionarioUis" for="inpTextoFuncionario" tokens=","
minChars="2">

Page 2
suggestionBox.xhtml

<h:column>
<h:outputText
value="#{funcionarioUis.codigo} ‐ #{funcionarioUis.nombreCompleto}" />

</h:column>

<a:support event="onselect" ajaxSingle="true"
reRender="outDatosEstudiante">

<f:setPropertyActionListener
target="#{suggestionBoxEJB.funcionario}"
value="#{funcionario}" />

</a:support>
</rich:suggestionbox>
</h:panelGroup>
</s:decorate>

</h:panelGrid>

</rich:panel>
</div>

<rich:spacer height="10" />
<div align="center">
<s:button value="Regresar" action="regresar" />
</div>

</h:form>

<rich:spacer height="20"/>

<rich:simpleTogglePanel width="100%" label="ver Código Fuente" switchType="client" opened="false">
<rich:tabPanel>
<rich:tab label="FileUpload.xhtml">
<div align="center">
<object data="fileUpload.pdf"
style="width: 800px; height: 500px;" type="application/pdf">

Page 3
suggestionBox.xhtml

</object>
</div>
</rich:tab>
<rich:tab label="FileUploadEJB.java">
<div align="center">
<object data="FileUploadEJB.pdf"
style="width: 800px; height: 500px;" type="application/pdf">
</object>
</div>
</rich:tab>
<rich:tab label="File.java">
<div align="center">
<object data="File.pdf"
style="width: 800px; height: 500px;" type="application/pdf">
</object>
</div>
</rich:tab>
</rich:tabPanel>
</rich:simpleTogglePanel>
</rich:panel>

</ui:define>

</ui:composition>

Page 4

You might also like