I am trying to invoke a managed bean method called getNebulizerModelName
in the action
attribute of a <h:commandLink>
in my facelet page, so that i can tell the implicit NavigationHandler where to go next according to the faces-config.xml navigation rules. But i get the depicted error above. Method is there and it complies to the rules stated in the tag library documentation. It's worth noticing that other methods from the same managed bean are found and invoked just fine as you can see in the code below. I have searched relevant posts for about an hour now. I have tried cleaning, building again, restarting the server, closing and opening the IDE. I am using:
- GlasshFish 4.1
- Java EE 7
- jsf 2.1
- mojarra 2.3
- NetBeans 8.2
Facelet page:
<h:form>
<ul class="catGridList">
<ui:repeat value="#{productManager.nebulizers}" var="nebulizer">
<li class="catGridListItem">
<h:commandLink action="#{productManager.nebulizerModelName}">
<h:graphicImage class="catGridListImg" library="img" name="#{nebulizer.imageSrc}"/>
</h:commandLink>
</li>
</ui:repeat>
</ul>
</h:form>
Managed Bean Class:
@ManagedBean(name="productManager")
@SessionScoped
public class ProductManager implements Serializable {
private static final long serialVersionUID = 5874124596321L;
private final Logger logger = Logger.getLogger("xaris.web.ProductManager");
private List<Nebulizer> nebulizers;
private Nebulizer nebulizer;
private String nebulizerModelName;
@EJB
private RequestBean request;
public List<Nebulizer> getNebulizers() {
try {
this.nebulizers = request.getNebulizers();
}catch(Exception ex) {
logger.warning("Could not get nebulizers");
}
return nebulizers;
}
public String getNebulizerModelName() {
try {
nebulizerModelName = request.getNebulizerModelName();
} catch(Exception ex) {
ogger.warning("Could not get specific model name.");
}
switch(nebulizerModelName) {
case "Flo Eolo":
nebulizerModelName = "flo_eolo";
break;
case "Flo Miko":
nebulizerModelName = "flo_miko";
break;
default:
nebulizerModelName = "";
break;
}
return nebulizerModelName;
}
}
Any suggestions?