6 Replies Latest reply on May 16, 2008 1:19 PM by Roberto Morales

    Rich functions

    Roberto Morales Newbie

      Hi All.

      I have a problem with the functions included in last release of Richfaces, i dont have available the functions, i see in the example functions like rich:component, that can be used in EL expressions.

      Im working with version 3.2.0.SR1

      are there something more to do to have working those functions? or are there available in some other release?

      Thanks for your help.

        • 1. Re: Rich functions
          Ilya Shaikovsky Master

          It should be available in SR1. And these functions used at our livedemo.

          Please show us code snippet and generated HTML snippet with this functions.

          • 2. Re: Rich functions
            Roberto Morales Newbie

            i cant show you an HTML code snippet because if i cant even run the page.

            When i try run the page i got this error:

            cuentas/wpAprovisionamiento.jsp(42,45) The function component cannot be located with the specified prefix

            here you have a code snippet of the page

            <?xml version="1.0" encoding="UTF-8"?>
            <jsp:root version="1.2" xmlns:a4j="http://richfaces.org/a4j"
             <jsp:directive.page contentType="text/html;charset=UTF-8"
             pageEncoding="UTF-8" />
             <ui:page id="page1">
             <ui:html id="html1">
             <ui:head id="head1">
             <ui:body id="body1">
            <rich:toolBar id="toolbarSolicitud" height="26" itemSeparator="line">
             <rich:toolBarGroup itemSeparator="none">
             <h:outputLabel value="Tienda: " style="font-weight:bold" />
             <h:outputText id="tienda" binding="#{wpAprovisionamiento.tienda} #{rich:component('tienda')}"
             <jsp:directive.include file="/fragments/spp2/cuentas/pfInformacionCliente.jspf" />
             <jsp:directive.include file="/fragments/spp2/cuentas/pfSuscripcion.jspf" />

            in my page i was trying to use the same function in code snippet for hide and show a modal panel like the example in richfaces demo site.

            Thanks for your help.

            • 3. Re: Rich functions
              Ilya Shaikovsky Master

              what does this mean?

              <h:outputText id="tienda" binding="#{wpAprovisionamiento.tienda} #{rich:component('tienda')}"

              • 4. Re: Rich functions
                Roberto Morales Newbie

                that doesnt mean nothing it is only for give you an example of how im using the function. for now i remove the use of the function from my code and i use the old way to hide or show the modalPanel (Richfaces.hideModalPanel('mp')). The example isnt very good.

                if you need a more real code snippet i can modify some part of my code and put here.

                Thanks for your help.

                • 5. Re: Rich functions
                  Ilya Shaikovsky Master

                  yes please post real snippet and we will check if it right.

                  • 6. Re: Rich functions
                    Roberto Morales Newbie


                    here you have some code snippet taked of one of the fragments in my pages.

                    Isnt a javascript error, the error that im getting is because the function component isnt available in the tag libraries included.

                    this information was taked from the manifest file inside one of richfaces' jar

                    Manifest-Version: 1.0
                    Archiver-Version: Plexus Archiver
                    Created-By: Apache Maven
                    Built-By: asmirnov
                    Build-Jdk: 1.5.0_11
                    Specification-Title: Java Server Faces AJAX framework API
                    Specification-Version: 3.2.0.SR1
                    Implementation-Title: Java Server Faces AJAX framework API
                    Implementation-Version: 3.2.0.SR1
                    Implementation-Vendor-Id: org.richfaces.framework
                    mode: development

                    as you can see, im using 3.2.0 SR1

                    <?xml version="1.0" encoding="UTF-8"?>
                    <div style="with:100%" xmlns:a4j="http://richfaces.org/a4j"
                     <h:commandButton value="Eliminar" id="deleteSusc" onclick="if (confirm('Esta seguro(a) que desea eliminar esta suscripcion?')){#{rich:component('mp')}.show()};return false;"/>
                     <a4j:region renderRegionOnly="true" id="suscripcionAll">
                     <rich:modalPanel id="mp" width="450" height="150">
                     <f:facet name="header">
                     <h:outputText value="Eliminar Suscripcion"></h:outputText>
                     <f:facet name="controls">
                     <h:outputLink value="#" id="cerrar">X
                     <rich:componentControl for="mp" attachTo="cerrar"
                     operation="hide" event="onclick" />
                     <table width="100%">
                     <TD valign="top"><h:outputText
                     value="Motivo de Eliminacion Suscripcion: " /></TD>
                     <TD><h:inputTextarea id="ta_motivo"
                     binding="#{pfSuscripcion1.ta_motivo}" cols="40" rows="5" /></TD>
                     <td colspan="2" align="center"><a4j:commandButton
                     value="Aceptar" reRender="infoSuscripcionPanel,ta_motivo"
                     oncomplete="showMessages(#{PfEncabezado.hasMessages}, '#{PfEncabezado.messages}');if (#{!PfEncabezado.hasMessages}){Richfaces.hideModalPanel('mp')}"
                     </a4j:commandButton> <h:commandButton value="Cancelar" id="exit"
                     onclick="#{rich:component('mp')}.hide();return false;" /></td>