I have in my JSF:
<h:commandButton value="Add to Cart"
rendered="#{movieDisplayController.movie.available != 0}"
action="#{cartController.addMovie(movieDisplayController.movie, '2')}">
</h:commandButton>
The action
is underlined in red in eclipse (kepler JEE) and displays:
Method must have signature "String method(), String method(), String method(String), String method(String, String), String method(String, String, String), String method(String, String, String, String), String method(String, String, String, String, String), String method(String, String, String, String, String, String), String method(String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String)" but has signature "String method(Movie, Integer)"
The method is defined as :
public String addMovie(Movie movie, Integer quantity) {
//...
return null;
}
It runs correctly when I hit the button - is it a bug in eclipse or am I doing something wrong ?
EDIT: runs also correctly with :
action="#{cartController.addMovie(movieDisplayController.movie, 2)}">
and
action="#{cartController.addMovie(movieDisplayController.movie,
movieDisplayController.quantity)}">
too so reported