maia/.svn/pristine/7a/7a7c127b2d7ba15d78a6bf8fb73...

27 lines
1.5 KiB
Plaintext
Executable File

<ui:component xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:comp="http://java.sun.com/jsf/composite"
xmlns:h="http://java.sun.com/jsf/html">
<comp:interface shortDescription="Componente para subir documentos a Alfresco">
<comp:attribute name="value" shortDescription="Etiqueta a mostrar en el boton de descarga" />
<comp:attribute name="controller" shortDescription="Controlador de Pentaho" />
<comp:attribute name="showCmb" shortDescription="Muestra el combo de formatos" default="true"/>
</comp:interface>
<comp:implementation>
<div id="#{cc.clientId}">
<h:panelGrid>
<p:selectOneMenu value="#{cc.attrs.controller.pentahoController.type}" var="p" style="width:60px" panelStyle="width:60px" rendered="#{cc.attrs.showCmb}">
<f:selectItems value="#{cc.attrs.controller.pentahoController.lcontent}" var="id" itemLabel="#{id.nombre}" itemValue="#{id.extension}" />
</p:selectOneMenu>
<p:commandButton id="idReport" value="#{cc.attrs.value}" actionListener="#{cc.attrs.controller.generarReporte()}" ajax="false">
<p:fileDownload value="#{cc.attrs.controller.pentahoController.streamedContent}" />
</p:commandButton>
</h:panelGrid>
</div>
</comp:implementation>
</ui:component>