I want to implement this JSF page with pagination and sorting. Unfortunately Netbeans shows me error when getComponent() is used:
cannot find symbol
symbol: method getComponent()
location: variable event of type java.awt.event.ActionEvent
I tried to import the dependency java.awt.event.ActionEvent but there is no change. This is the code where getComponent() is used.
public void page(ActionEvent event) {
page(((Integer) ((UICommand) event.getComponent()).getValue() - 1) * rowsPerPage);
}
What dependencies are needed in order to use getComponent()? Can I replace the this Java method with similar method?
Best wishes
You imported wrong
ActionEvent, You need to importSee here