This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes Error-Target Unreachable, identifier 'Sender' resolved to null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Error-Target Unreachable, identifier Watch "Error-Target Unreachable, identifier New topic
Author

Error-Target Unreachable, identifier 'Sender' resolved to null

Jenifer Rajakumar
Ranch Hand

Joined: Oct 31, 2013
Posts: 33
Hi

Iam new for development iam getting error -Target Unreachable, identifier 'Sender' resolved to null. Please solve my issue

My task was iam having two data-table, in first data-table above iam having one input filed, if i enter any name related to that name remaining columns wants to display, how much i know i created but iam getting error. please solve my issue.

senderIdentifier.xhtml



senderBean.java


Sender.java



Please solve my issue
Error
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

"Sender" is not defined as a JSF backing bean. This means that neither a faces-config.xml backing bean element was defined nor a JSF2 backing bean annotation.

Note that backing beans are instances, not classes, so by convention, their IDs should begin with a lower-case letter, not an upper-case letter. In particular, if you annotate a java class with the @ManagedBean annotation, the generated bean ID will automatically be converted from "Classname" to "classname" by JSF. Likewise. "senderBean" is not an appropriate name for a Class because class names should begin with an upper-case letter.

I do not recommend using actionListener. The POJO "action" element does the same thing for almost all purposes.


Customer surveys are for companies who didn't pay proper attention to begin with.
Jenifer Rajakumar
Ranch Hand

Joined: Oct 31, 2013
Posts: 33
Hi Thanks for reply,

I have changed my code


in datatable also


But Still same, See iam new so please point where iam doing error.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

Here's the standards-compliant way to do it:


This is equivalent to:


Because JSF will automatically name the bean after the class (with correction for upper-case to lower-case) if you do not explicitly provide the "name" option.

However, your last example, while not compliant, looks like it should have worked, so if you could post the stacktrace it would help.
Jenifer Rajakumar
Ranch Hand

Joined: Oct 31, 2013
Posts: 33
Hi

In datatable i want to give sender or Sender



Still iam getting same error.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

Still need latest stacktrace.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error-Target Unreachable, identifier 'Sender' resolved to null
 
Similar Threads
Primefaces row editing not working properly
how bean classes- Error Uncaught exception created in one of the service methods of the servlet
Error when I select a given data p:datatable
property not found on the managed bean
Get the selected row in datatable [PRIMEFACES]