Unknown @DataModel @Out name
mykey.asdf.asdf.de Mar 16, 2008 5:33 AMHello Guys
I moved my project from the seam-gen console version to the New->Seam Web Project
version (you know: Eclipse). Unfortunately this created some errors in my code. I was able to remove some of them, but this one is sticking around and I have no clue what the problem could be.
It is about one EntityBean (Subject
), one stateless session bean (SubjectAction
) and its Interface (SubjectFacade
). On SubjectAction Eclipse keeps displaying Unknown @DataModel/@Out name: subject
in the first row. Obviously it is referencing to my DataModel Selection (changing the varibale's name changes the error message).
@Name("subjManager") @Stateless public class SubjectAction implements SubjectFacade { @PersistenceContext EntityManager em; @In(required=false) @DataModelSelection private Subject subject; @Out(required=false) @DataModel(scope=ScopeType.PAGE) private List<Subject> subjList; @Factory("subjList") public void getSubjList(){ subjList = em.createQuery("from Subject").getResultList(); } ...
But I don't understand why it has difficulties to find subject
. First of all, it does not even have to know at compile time what it is (imho) and second, the EntityBean it is refering to is also called subject.
@Entity @Name("subject") public class Subject implements Serializable { private static final long serialVersionUID = 9174483825465006993L; @Id @GeneratedValue private long id; ...
I have no clue at all why this error occurs. Fact is that it is preventing me from using this component on my XHTML sheets (leads to the error Message that subjManager could not be created or similar):
<rich:dataTable value="#{subjList}" var="subj" > <f:facet name="header"> <rich:columnGroup> <rich:column><h:outputText value="Jahr" /></rich:column> <rich:column><h:outputText value="Klasse" /></rich:column> <rich:column><h:outputText value="Name" /></rich:column> <rich:column><h:outputText value="Lehrer" /></rich:column> <rich:column><h:outputText value="Funktionen" /></rich:column> </rich:columnGroup> </f:facet> <rich:columnGroup> <rich:column><h:outputText value="#{subj.year}" /></rich:column> <rich:column><h:outputText value="#{subj.parallel}" /></rich:column> <rich:column><h:outputText value="#{subj.name}" /></rich:column> <rich:column><h:outputText value="#{subj.teacher}" /></rich:column> <rich:column><s:link value="loeschen" action="#{subjManager.delete}" />  <s:link value="bearbeiten" action="#{subjManager.edit}" /></rich:column> </rich:columnGroup> </rich:dataTable>
Please help me. You are my last hope. I don't want to change back to the console version.