Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
05. Jul 2008, 09:56 CET | Link

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?

 

'Why don't you try using logical logic this time. That's a plan that should work.'