If you can't get it to work in JSP, have you tried Facelets?  I can't speak for JSP, but I have many custom functions in facelets and have never had an issue using them.

BTW if you use #{}, your variable resolver would have to recognize JSP functions, and I am not sure if the myfaces JSF variable resolver does.

On 7/21/06, Marcus Schmidke <[EMAIL PROTECTED]> wrote:
Hello Dennis,

did you mean "only work with JSP" (so not at all with Facelets) or did you
mean "only work with JSP EL Syntax"?

I had used #{}. Now I tried ${}, which doesn't work either.

The xhtml file:
<ui:component 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:t="http://myfaces.apache.org/tomahawk"
    xmlns:le="http://www.prosystemsit.de/le"
      >

      <h:outputText value="${le:wert('test')}" />
</ui:component>

The Taglib file:
<!DOCTYPE facelet-taglib PUBLIC
  "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
  "http://java.sun.com/dtd/facelet-taglib_1_0.dtd ">
<facelet-taglib>
      <namespace>http://www.prosystemsit.de/le</namespace>
      <function>
            <function-name>wert</function-name>
            <function-class>
de.prosystemsit.leistungserfassung.controller.Functions</function-class>
            <function-signature>java.lang.String
wertInSpalte(java.lang.String)</function-signature>
      </function>
</facelet-taglib>


Marcus.





                      "Dennis Byrne"
                      <[EMAIL PROTECTED]         An:       "MyFaces Discussion" <[email protected]>
                      t>                       Kopie:
                                               Thema:    Re: User defined LE functions
                      21.07.2006 08:54
                      Bitte antworten
                      an "MyFaces
                      Discussion"





Are you using ${} or #{} ?  User defined functions only work for JSP EL.
Sorry.

Dennis Byrne

>-----Original Message-----
>From: Marcus Schmidke [mailto:[EMAIL PROTECTED]]
>Sent: Friday, July 21, 2006 02:16 AM
>To: [email protected]
>Subject: User defined LE functions
>
>
>Hello all,
>
>with Facelets and myFaces 1.1.3, I've got a problem writing a user defined
>EL function. I am certain I did everything as documented, but it doesn't
>work.
>
>Is there any general problem with user defined EL functions in myFaces
>(wrong version or something like that), or must I search deeper for the
>error I made?
>
>Regards,
>
>Marcus.
>_____________________________________________________________________
>prosystems IT GmbH
>Anwendungsentwicklung
>Postfach 31 51
>53021 Bonn (Germany)
>
>Tel: 0228 / 3366 - 3329, Fax: 0228 / 3366 - 73329
>mailto:[EMAIL PROTECTED] http://www.prosystemsIT.de
>Amtsgericht Bonn - HR B 13189
>
>
>
>_____________________________________________________________________
>prosystems IT GmbH
>Anwendungsentwicklung
>Postfach 31 51
>53021 Bonn (Germany)
>
>Tel: 0228 / 3366 - 3329, Fax: 0228 / 3366 - 73329
>mailto:[EMAIL PROTECTED] http://www.prosystemsIT.de
>Amtsgericht Bonn - HR B 13189
>
>





_____________________________________________________________________
prosystems IT GmbH
Anwendungsentwicklung
Postfach 31 51
53021 Bonn (Germany)

Tel: 0228 / 3366 - 3329, Fax: 0228 / 3366 - 73329
mailto:[EMAIL PROTECTED] http://www.prosystemsIT.de
Amtsgericht Bonn - HR B 13189



Reply via email to