I need advise on how to debug the MEP admin screens. It does not appear my
jsftemplate handler method is ever getting called. I'm trying to track down
the problem. I've looked for advise on the jsftemplate project site but have
not found any helpful information. What do you suggest?
I'm using NB 6.1. I created a maven2 project. I defined a couple of
screens using the GF jdbcConnectionPool.jsf and JdbcHandlers.java as the model.
I created a UserHandlers.java class with a single annotated method, getMepUserInfo.
As in jdbcConnectionPool.jsf right after the setResourceBundle stmt method
getJDBCConnectionPoolMaps is called, I instead call getMepUserInfo. The code
compiles cleanly and the war deploys and runs without exceptions (i.e. the defined
screen components display successfully). I have the following jsftemplating files
in my local maven repository and they get pulled into the war file.
jsf-api-1.2_07.jar
admin.jar jsf-impl-1.2_07.jar
admin-en.jar jsftemplating.jar
admin-jsf.jar jsftemplating-dt.jar
jsftemplating-dynafaces-0.1.jar
In my web.xml file I set com.sun.jsftemplating.DEBUG to true. I though I would see
debugging information in the server.log file but didn't. I added print stmts to
my method getMepUserInfo but see no output to server.log either.
I found on the jsftemplating site that a UserHandlers.map file should get generated
at build time but I don't see one. I looked for a JdbcHandlers.map file in the
adminGUI_war but did not find one. Not sure how to interpert this.
The only method in UserHandlers.java
@Handler(id="getMepUserInfo",
input={
@HandlerInput(name="selectedRows", type=List.class)},
output={
@HandlerOutput(name="result", type=java.util.List.class)}
)
public static void getMepUserInfo(HandlerContext handlerCtx) {
System.out.println("Entered getUserInfo");
List<Map> selectedList = (List)handlerCtx.getInputValue("selectedRows");
}
The call to getMepUserInfo in userAccountsGeneral.jsf
<sun:page id="page1">
<!beforeCreate
setResourceBundle(key="i18n" bundle="com.sun.enterprise.tools.admingui.resources.Strings");
setResourceBundle(key="msg" bundle="com.sun.i18n.adminResources")
getMepUserInfo(selectedRows="$attribute{selectedRows}" result=>$attribute{listOfRows} );
setPageSessionAttribute(key="editLink" value="/userAccts/userEdit.jsf");
setPageSessionAttribute(key="createLink" value="userNew.jsf");
setPageSessionAttribute(key="listPageLink" value="/userAccts/userAccountsGeneral.jsf");
setPageSessionAttribute(key="resourceType" value="userAccountsGeneral");
/>