Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Property not found message

 
Dirk Hausmanns
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

I'm very new to java. What I want to do is the following :

I created a field called newsletter in the DB. Cause I want learn to understand Java, I took over a field called female. This declares if the user is female or male. The field is set to BIT and can contain a NULL.

this works well. The only problem I have is, that it shows up with this error :

Caused by javax.el.ELException with message: "/layout/inc/community/profile/profileAbout.xhtml: Property 'newsletter' not found on type com.server.entity.application.User

I wrote this code to com.server.entity.application.User

private Boolean newsletter;

public void setNewsletter(Boolean newsletter)
{
this.newsletter = newsletter;
}

public Boolean getNewsletter()
{
return newsletter;
}


This is the code to display the field :

<s:div styleClass="clear margin15bot" />
<p class="blue bold">#{currentUserHome.instance.newsletter ? 'nein' : 'ja'}</p>
<hr class="strategyHR margin3NS" />
<p class="medBlueGrey">Newsletter abbonieren</p>


Hope somebody can help me with this issue.

Gr.

Dirk
 
Campbell Ritchie
Sheriff
Pie
Posts: 49751
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

That question is too difficult for “beginning”, so I shall move it. Not sure where, and it might be moved again. Let’s try HTML first.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic