JSF reference to it’s backing bean missing

Tools can be the bane of my existence sometimes…

IBM’s Rational Application Developer (RAD) handles the voodoo between your JSF JSP and the backing bean (pagecode). It maintains this reference with a commented line atop your JSP that looks something like this:

<%-- jsf:pagecode language="java" location="/JavaSource/pagecode/View.java" --%><%-- /jsf:pagecode --%>

This tells the IBM PageDesigner that the methods/members of that particular page reside in a java file called ‘View.java’…simple enough.

I went to use their tool to add a button on a different JSP (edit.jsp). When I clicked the ‘Quick Edit’ tab (which should create the action method for me in the backing bean), I could only see javascript methods available to me.


sure enough, I check the source of the JSP and wouldn’t you know it, RAD forgot to add:

<%-- jsf:pagecode language="java" location="/JavaSource/pagecode/Edit.java" --%><%-- /jsf:pagecode --%>

to the top of the page. There was no way for the Page Designer to figure out what backing bean to place the new method in.

Hope this helps anyone unfortunate enough to see this issue in their project.

File Upload, Portal, JSF and not being surprised…

I’m writing a portlet that allows a user to modify certain LDAP attributes.  It’s a nice little solution (if I do say so myself), wrapping IBM’s PUMA framework with something a little more durable, a little more generic and a lot less IBM.

The customer would like the user to upload their own picture.

“Yeah, shouldn’t be a problem…” I say, recalling the File Upload control on Rational Application Developer’s JSF palette…famous last thoughts.

IBM, in their wisdom and glory, have shipped some JSF components that don’t work with their Portal solution.  They’re available for use in a Portal project, they just don’t work… (bonus points to me for looking it up in the documentation rather than bugging the local IBM on-site consultant).  I guess that makes sense…

This means a trip to Apache and a chance to try the Commons File Upload component (apparently it works with Portal…I won’t get into why I find this entire thing so hilarious).