5 Replies Latest reply on Nov 13, 2006 7:29 PM by gavin.king

    Parameter in EL in s:link problem

    virgo47

      Hi

      I have a problem using EL with parameter in s:link tag:

      <s:link id="viewProject" value="#{proj.code}" action="#{projectManager.detail(proj)}"/>
      


      produces:
      /main.xhtml @45,93 action="#{projectManager.detail(proj)}" Error Parsing: #{projectManager.detail(proj)}

      But it works fine in booking demo's main page. What I missed? I tried to derive from booking, but also tried to start it from scratch and now I'm stuck and I tried to move on with this parameter. ;-)

      Thank you

      Virgo

        • 2. Re: Parameter in EL in s:link problem
          virgo47

          Thanks Gavin... addition to faces-config.xml helped. But I'm kinda confused now. My looks like this now:

          <?xml version='1.0' encoding='UTF-8'?>
          <!DOCTYPE faces-config PUBLIC
           "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
           "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
          
          <faces-config>
           <application>
           <view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>
           </application>
          
           <!-- A phase listener is needed by all Seam applications
           -->
           <lifecycle>
           <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
           </lifecycle>
          </faces-config>
          


          And the one from booking demo looks like this:
          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE faces-config
           PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
           "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
          
          <faces-config>
          
           <!-- Select one of the standard transaction models for the Seam application -->
          
           <lifecycle>
           <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
           </lifecycle>
          
          </faces-config>
          


          Why you don't need that view-handler? I can't notice difference between JSF 1.0 or 1.1 in header (tried both). I had no view-handler there and it worked fine but when I started to experiment with it (after your post) it suddenly stopped to process JSF at all (browser offers download and it was raw JSF) - I can't reproduce that EL exception. ;-)

          I'm glad it works now (and it even fixed my other problem), just little confused. I saw some JSF/EJB3 stuff before, but this all is overwhelming for me so far. ;-)

          • 3. Re: Parameter in EL in s:link problem
            gavin.king

            The booking demo uses Ajax4JSF, and Ajax4JSF has a special way to install the facelets viewhandler to avoid ordering problems (look in web.xml).

            • 4. Re: Parameter in EL in s:link problem
              virgo47

              Ah, now I see... I ripped the Ajax4JSF off for the time being (too many new things at once) - so that explains everything. I see that handler thingy in web.xml now. :-)

              Thanks a lot

              • 5. Re: Parameter in EL in s:link problem
                gavin.king

                np