Thoughts about coding and books

Identity ‘signupBean’ does not reference a MethodExpression instance

Problem itself is simple. JSF h:commandButton or h:commadLink is pressed and error below happens.

javax.el.ELException: /index.xhtml @12,78 action="#{signupBean}": Identity 'signupBean' does not reference a MethodExpression instance, returned type: com.project.beans.SignupBean

If you see something similar then you have typo in your code. In your commandButton/commandLink is missing bean method specification.

<h:commandButton value="Login with gmail" action="#{signupBean}"></h:commandButton>

must be replaced with

<h:commandButton value="Login with gmail" action="#{signupBean.signup}"></h:commandButton>

Full stack trace to follow  Read more about Identity ‘signupBean’ does not reference a MethodExpression instance

Get callback working in Scribe and OAuth

I was developing LinkedIn API and had some trouble getting callback working after getting user authentication from LinkedIn. I even had configured “OAuth Redirect URL:” in application settings, adding oauth_callback to redirect when asking user authorization did not help either. I kept getting OOB eg out-of-band style authentication where user must manually type in theRead more about Get callback working in Scribe and OAuth[…]

Ajax menu navigation in JSF with OpenFaces

Problem: Webpage must change body contents fast without reloading whole page when user clicks link in menu. Solution: It can be achieved using OpenFaces o:layeredPane component. In menu can be used commandLinks surrounded with form. Commandlinks include f:param which sends to server what contents must be displayed. When clicking link then browser sends ajax requestRead more about Ajax menu navigation in JSF with OpenFaces[…]

f:ajax not working in JSF

Problem is that in JavaServer Faces application ajax request are just not working. o:ajax in openfaces nor f:ajax in plain JSF 2.0 is not sending any requests to server. For testing can be used simple echo application. <h:form> <h:inputText value=”#{ajaxTestBean.testValue}” > <f:ajax event=”keyup” render=”text”/> </h:inputText> <h:outputText id=”text” value=”#{ajaxTestBean.testValue}” /> </h:form> Normally this should work withoutRead more about f:ajax not working in JSF[…]