- This topic has 4 replies, 3 voices, and was last updated 17 years, 4 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.
Riyad KallaMemberMoving to OT > Soft Dev
try and use either value or binding, but not both…
All 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.
I 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.
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