0

When I click commandbutton I get this error:

javax.el.PropertyNotFoundException: /registracija.xhtml @78,120 action="#{noviKorisnik.kreiraj()}": Target Unreachable, identifier 'noviKorisnik' resolved to null

<h:form>
    <h:commandButton value="Registriraj" action="#{noviKorisnik.kreiraj()}" />
</h:form>

Here is my java class

@ManagedBean
public class NoviKorisnik {
           ...
   public void kreiraj() { ... }
}

How can I solve this?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
MEGAMAN
  • 11
  • 3

1 Answers1

-1

The action attribute accepts a method-binding expression for a backing bean action method to invoke when this component is activated by the user. An action method must be a public method with no parameters that returns a String. The returned string represents the logical outcome of the action (eg. "success", "failure", etc. ) and is used by the JavaServer Faces MVC framework to determine which view to display next.

Dmitriy
  • 109
  • 4