The problem can be in that parameters passed from menu are of String type, but your query requires a type of the entity identifier, e.g. Long. If so, you can convert the parameter right in the screen controller like this:
public class FooBrowse extends AbstractLookup {
@Override
public void init(Map<String, Object> params) {
String fooIdParam = (String) params.get("fooId");
if (fooIdParam != null) {
params.put("fooId", Long.valueOf(fooIdParam));
}
}
}
My query is:
select e from sample$Foo e where e.id = :param$fooId