- This topic has 4 replies, 3 voices, and was last updated 17 years, 10 months ago by
Riyad Kalla.
-
AuthorPosts
-
MichaelcfordMemberSo I did the tutorals, thought I understood it all but.
I did a very basic datatable using hibernate and it fails, I missied somthing.Error:
javax.servlet.ServletException: An exception occurred processing JSP page /listnames.jsp at line 3027:
28: <body>
29: <f:view>
30: <h:dataTable border=”1″ id=”JsfTable” rows=”10″
31: value=”#{Index.names}”
32: var=”idx” binding=”#{Index.data}”>
33: <h:column id=”column1″>JSF Table:
<body>
<f:view>
<h:dataTable border=”1″ id=”JsfTable” rows=”10″
value=”#{Index.names}”
var=”idx” binding=”#{Index.data}”>
<h:column id=”column1″>
<f:facet name=”header”>
<h:outputText value=”ID” />
</f:facet>
<h:outputText value=”#{idx.id}” />
</h:column>
<h:column id=”column2″>
<f:facet name=”header”>
<h:outputText value=”Name”></h:outputText>
</f:facet>
<h:outputText value=”#{idx.name}”/>
</h:column>
</h:dataTable>
<br>
</f:view>
</body>Managed Bean:
public class index {
public index() {}
private UIData data = null;
Collection names;//Property getters – setters
public void setData(UIData data)
{
this.data = data;
}public UIData getData()
{
return data;
}
public Collection getNames(){TestDAO dao = new TestDAO();
try {
names = dao.findAll();} catch (HibernateException e) {
System.err.println(“Entity retrieval failed.”);
e.printStackTrace();
} finally {
try {
dao.getSession().close();
} catch (Exception e) {
// do nothing
}
}
return names;
}
public void setBooks(Collection names) {
this.names = names;
}
}
——————————-
I see it call to the constructor, but then fails, I expected it to call getNames.
Worked struts for a while, but still not getting somthing here.Any help would be wonderful.
September 4, 2007 at 7:56 pm #275044
Riyad KallaMemberMoving to OT > Soft Dev
try and use either value or binding, but not both…
September 8, 2007 at 7:21 pm #275279All I saw was that MyEclipse 6 supported JSF 1.1 but I did not see JSF 1.2. Did I miss something and if not is there a short answer to why JSF 1.2 is not supported.
September 9, 2007 at 3:31 pm #275296I created a new project and saw that I could use JSF 1.2. Since I upgraded to MyEclipse 6.0 and kept the projects from my previous version, is there a way for me to see what jsf settings I used in an existing project, or does it just use whatever jsf jar files are in my build properties. Since I want to use JSF 1.2 if my original project specified JSF 1.1 do I need to do anything other than make sure the new JSF 1.2 jar files are in my classpath.
September 11, 2007 at 9:53 am #275385
Riyad KallaMemberMyEclipse does support JSF 1.2, but it’s part of the Java EE 5 spec now, so any Java EE 5-spec project will automatically use JSF 1.2. If you want to use JSF 1.2, you should make sure your project is a Java EE 5 project.
-
AuthorPosts