Java Reference
In-Depth Information
String journal = (String) it2.getValue();
String publisher = (String) it3.getValue();
String edition = (String) it4.getValue();
String title = (String) (it5.getValue());
String author = (String) (it6.getValue());
catalogSessionEJB.persistEntity(id, journal, publisher, edition,
title, author);
} catch (NamingException e) {
System.err.println(e.getMessage());
return "notpersisted";
}
return "persisted";
}
public String cb2_action1() {
// Add event code here...
try {
InitialContext context = new InitialContext();
int id = Integer.parseInt((String) it7.getValue());
CatalogSessionEJB catalogSessionEJB = (CatalogSessionEJB)
context.lookup("EJB3-JSF-EJB3Model-CatalogSessionEJB#model.
CatalogSessionEJB");
catalog = catalogSessionEJB.findEntity(id);
} catch (NamingException e) {
System.err.println(e.getMessage());
return "error";
}
return "catalogentry";
}
}
The JSF configuration file
The faces-config.xml that has the managed bean specified and the navigation
rules specified is listed below:
<?xml version="1.0" encoding="windows-1252"?>
<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
<application>
<default-render-kit-id>oracle.adf.rich
</default-render-kit-id>
 
Search WWH ::




Custom Search