1 Reply Latest reply on May 7, 2009 5:15 AM by nathandennis

    Create Annotation and s:link

    nathandennis

      i'm having an issue with @Create annotation on a backing bean and using s:link to redirect to a page backed by that bean. it would seam that when s:link's view attribute is directed at a page backed by a bean with @Create annotation,, the create method is executed before that page is accessed... before the redirect or any method on the bean is called.


      is there a way to prevent this and have the bean still execute the method with create when the page is directly accessed?


      this is using seam 2.0.1.ga


      some code


      index.xhtml


      <s:link value="my workspace home" view="/home.xhtml"   propagation="end"/> 
      



      home.xhtml


      <s:link view="/timeline/timelinebegin.xhtml" styleClass="leftnavlink"
                 value="create timeline" propagation="none" rendered="#{homeAction.timelinesw == false}">
                 <f:param name="timelineuserid" value="#{identity.username}" />
               </s:link> 
      


      just a simple conditional render


      HomeAction.java


      @Stateful
      @Name("homeAction")
      @Scope(ScopeType.EVENT)
      public class HomeAction implements HomeLocal {
      
      @Create
      public void homePageInit() {
              log.info("in homeACtion create");
      
      



      when index.html is accessed... i can see the Create fire off in the log. boo on that.. how to stop it?