Java Reference
In-Depth Information
Managed bean for the Edition JSF page
In the view.backing.Edition managed bean class, the commandButton1_action()
method is invoked when the Submit button is clicked. In the commandButton1_
action() method, retrieve the Input Text values, create an InitialContext
object and lookup the session bean via its remote interface, and create and persist a
Edition entity object. The Edition managed bean is listed as follows:
package view.backing;
import model.*;
import javax.faces.component.html.HtmlCommandButton;
import javax.faces.component.html.HtmlForm;
import javax.faces.component.html.HtmlInputText;
import javax.faces.component.html.HtmlOutputFormat;
import javax.faces.component.html.HtmlOutputLabel;
import javax.faces.component.html.HtmlPanelGrid;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class Edition {
private HtmlForm form1;
private HtmlOutputFormat outputFormat1;
private HtmlPanelGrid panelGrid1;
private HtmlOutputLabel outputLabel1;
private HtmlInputText inputText1;
private HtmlOutputLabel outputLabel2;
private HtmlInputText inputText2;
private HtmlOutputLabel outputLabel3;
private HtmlInputText inputText3;
private HtmlOutputLabel outputLabel4;
private HtmlInputText inputText4;
private HtmlCommandButton commandButton1;
public void setForm1(HtmlForm form1) {
this.form1 = form1;
public HtmlForm getForm1() {
return form1;
public void setOutputFormat1(HtmlOutputFormat outputFormat1) {
this.outputFormat1 = outputFormat1;
public HtmlOutputFormat getOutputFormat1() {
return outputFormat1;
Search WWH ::

Custom Search