1 Reply Latest reply on Dec 9, 2009 11:51 AM by Emir Calabuch

    Facelet component (custom tag) with SEAM-managed behaviour (for providing data)

    Ilya Dyoshin Novice

      Good day,


      currently I'm using facelets-templating for inputing mine data (i.e. search over database and returning entity as a result) and outputing (custom formatting with outputing entities' content).


      What I'd like to create is the custom tag-library for inputing such objects. But that tags would be using seam-managed controllers, which also should be packaged inside of this library. So the tag-library becomes SEAM Managed.


      Did anyone have done something similar? or this is not reachable by Facelets and SEAM?


      Best regards,
      Ilya Dyoshin

        • 1. Re: Facelet component (custom tag) with SEAM-managed behaviour (for providing data)
          Emir Calabuch Newbie

          If you mean you want your custom tags to interact with Seam components, sure it can be done and most Seam UI tags already do that. The only catch is that your tag handlers cannot benefit from bijection (they are instanced by JSP/Facelets and not the Seam container and cannot be therefore managed by Seam). But you can get hold of your components via the Seam API.


          See the Seam UI source code for practical scenarios (for example the UIGraphicImage class in charge of rendering the <s:graphicImage> tag in org.jboss.seam.ui.graphicImage, which interacts with the Image and GraphicImageStore components in that same package), but basically this is how you retrieve your components via the API:


          MyComponent.instance()
          



          or:


          Component.getInstance(...)
          



          or even:


          Contexts.get...Context().get(...)