📄 passdata.java
字号:
/**
*
*/
package pagecode.passData;
import pagecode.PageCodeBase;
import com.ibm.samples.passData.customerBean;
import com.ibm.faces.component.html.HtmlScriptCollector;
import javax.faces.component.html.HtmlForm;
import com.ibm.faces.component.html.HtmlCommandExButton;
import javax.faces.component.html.HtmlInputText;
/**
* @author nan
*
*/
public class PassData extends PageCodeBase {
protected customerBean customerBean;
protected HtmlScriptCollector scriptCollector1;
protected HtmlForm form1;
protected HtmlCommandExButton button1;
protected HtmlInputText text1;
protected HtmlInputText text2;
protected HtmlInputText text3;
protected HtmlInputText text5;
protected HtmlInputText text8;
protected HtmlInputText text9;
protected HtmlCommandExButton button2;
/*
* ####################################################################
* The following method was not generated by the JSF tools. You must implement it yourself.
* #################################################################
*/
public String passDataForwardAction() {
// Type Java code that runs when the component is clicked
// the following code accesses the session scope variable and modifies it
// the same can be done with a request scope variable.
String sessionTextVar = (String)getSessionScope().get("sessionText");
sessionTextVar = sessionTextVar + " (ADDED)";
getSessionScope().put("sessionText", sessionTextVar);
// return string used by navigation rules to move to next page
return "resultPageForward";
}
public String passDataRedirectAction() {
// Type Java code that runs when the component is clicked
// the following code accesses the session scope variable and modifies it
// the same can be done with a request scope variable.
String sessionTextVar = (String)getSessionScope().get("sessionText");
sessionTextVar = sessionTextVar + " (ADDED)";
getSessionScope().put("sessionText", sessionTextVar);
// return string used by navigation rules to move to next page
return "resultPageRedirect";
}
/**
* @managed-bean true
*/
public customerBean getCustomerBean() {
if (customerBean == null) {
customerBean = (customerBean) getFacesContext().getApplication()
.createValueBinding("#{customerBean}").getValue(
getFacesContext());
}
return customerBean;
}
/**
* @managed-bean true
*/
public void setCustomerBean(customerBean customerBean) {
this.customerBean = customerBean;
}
protected HtmlScriptCollector getScriptCollector1() {
if (scriptCollector1 == null) {
scriptCollector1 = (HtmlScriptCollector) findComponentInRoot("scriptCollector1");
}
return scriptCollector1;
}
protected HtmlForm getForm1() {
if (form1 == null) {
form1 = (HtmlForm) findComponentInRoot("form1");
}
return form1;
}
protected HtmlCommandExButton getButton1() {
if (button1 == null) {
button1 = (HtmlCommandExButton) findComponentInRoot("button1");
}
return button1;
}
protected HtmlInputText getText1() {
if (text1 == null) {
text1 = (HtmlInputText) findComponentInRoot("text1");
}
return text1;
}
protected HtmlInputText getText2() {
if (text2 == null) {
text2 = (HtmlInputText) findComponentInRoot("text2");
}
return text2;
}
protected HtmlInputText getText3() {
if (text3 == null) {
text3 = (HtmlInputText) findComponentInRoot("text3");
}
return text3;
}
protected HtmlInputText getText5() {
if (text5 == null) {
text5 = (HtmlInputText) findComponentInRoot("text5");
}
return text5;
}
protected HtmlInputText getText8() {
if (text8 == null) {
text8 = (HtmlInputText) findComponentInRoot("text8");
}
return text8;
}
protected HtmlInputText getText9() {
if (text9 == null) {
text9 = (HtmlInputText) findComponentInRoot("text9");
}
return text9;
}
protected HtmlCommandExButton getButton2() {
if (button2 == null) {
button2 = (HtmlCommandExButton) findComponentInRoot("button2");
}
return button2;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -