views:

52

answers:

2

I've got a page that displays an entity, but before rendering the page I need to perform a lookup of the entity based on a parameter that is passed in. To do this, I'm trying to use a Seam Page Action declared in my pages.xml file to call the lookup action before rendering the page. My setup looks like this:

pages.xml:

<page view-id="/mypage.xhtml" action="#{mylookup.lookupEntity}"></page>

My action class:

@Name("myLookup")
@AutoCreate
public class MyLookup {

@RequestParameter
private String myParam;

...

public void lookupEntity() { ...}

...
}

Everything looks fine to me, but when I click on a link to take me to that page, my lookupEntity() action never gets called. I've added breakpoints and logging statements, and it's clear that it never gets called.

What is a typical cause for this? Is there someplace I should be looking for more info on why this failed?

+2  A: 

Simply because the called component name (#{mylookup.lookupEntity}) does not match component name (#{myLookup.lookupEntity}).

Arthur Ronald F D Garcia
+1, yes you need to change to `#{myLookup.lookupEntity}`
Shervin
That was just an example to show how I configured the action and pages.xml. It wasn't copy/paste code :)
Shadowman
@Shadowman Thanks for reply. Have you tried SeamTest ??? Where does mypage.xhtml file is placed ??? Which Seam version ??? Some additional info ???
Arthur Ronald F D Garcia