5 Replies Latest reply on Dec 20, 2007 11:58 AM by Pete Muir

    seam events

    Sven Mueller Newbie


      i'm having problems with seam events definied in components.xml. if a certain events occurs a method with a string as an argument shall be called.


       <event type="say">
       <action execute="#{exampleListener.saySomething}"/>

      public class Example {
       public void saySomething() {
       FacesMessages.instance().add("Hello World");
       Events.instance().raiseEvent("say", "Hello World");

      public class ExampleListener {
       public void saySomething(String text) {

      this example does'nt work because seam tries to find a method named 'saySomething' without any argument. but how can i define that a method with an argument (e.g. string) shall be executed? is this possible via components.xml?