📄 cartajax.java
字号:
/** * */package pagecode;import beans.ShoppingCart;import com.ibm.faces.component.html.HtmlScriptCollector;import javax.faces.component.html.HtmlForm;import javax.faces.component.html.HtmlPanelGrid;import com.ibm.faces.component.html.HtmlDataTableEx;import com.ibm.faces.component.UIColumnEx;import javax.faces.component.html.HtmlOutputText;import com.ibm.faces.component.html.HtmlAjaxRefreshRequest;import javax.faces.component.html.HtmlOutputLink;import javax.faces.component.html.HtmlInputHidden;import javax.faces.component.html.HtmlInputText;import com.ibm.faces.component.html.HtmlCommandExButton;import com.ibm.faces.component.html.HtmlAjaxExternalRequest;import com.ibm.faces.component.html.HtmlAjaxRefreshSubmit;import com.ibm.faces.component.html.HtmlPanelDialog;/** * @author ykats * */public class Cartajax extends PageCodeBase { protected ShoppingCart cart; protected HtmlScriptCollector scriptCollector1; protected HtmlForm form1; protected HtmlPanelGrid grid1; protected HtmlDataTableEx tableEx1; protected UIColumnEx columnEx1; protected HtmlOutputText text1; protected HtmlOutputText textName1; protected HtmlAjaxRefreshRequest showPopup; protected HtmlInputHidden itemid; protected HtmlOutputText text2; protected UIColumnEx columnEx2; protected HtmlOutputText textPrice1; protected HtmlOutputText text3; protected UIColumnEx columnEx3; protected HtmlInputText textQuantity1; protected HtmlCommandExButton button2; protected HtmlPanelGrid grid2; protected HtmlCommandExButton button3; protected HtmlPanelGrid totals; protected HtmlOutputText text4; protected HtmlPanelGrid grid5; protected HtmlOutputText textTotalPrice; protected HtmlOutputText text5; protected HtmlOutputText textTax1; protected HtmlOutputText text6; protected HtmlOutputText textShipping1; protected HtmlOutputText text7; protected HtmlOutputText textTotal1; protected HtmlAjaxExternalRequest showDetails; protected HtmlOutputText text8; protected HtmlAjaxRefreshSubmit refreshTotals; protected HtmlOutputLink link1; protected HtmlPanelGrid product; protected HtmlPanelDialog descriptionPopup; protected HtmlOutputText textDescription1d; /** * @managed-bean true */ protected ShoppingCart getCart() { if (cart == null) { cart = (ShoppingCart) getFacesContext().getApplication() .createValueBinding("#{cart}").getValue(getFacesContext()); } return cart; } /** * @managed-bean true */ protected void setCart(ShoppingCart cart) { this.cart = cart; } 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 HtmlPanelGrid getGrid1() { if (grid1 == null) { grid1 = (HtmlPanelGrid) findComponentInRoot("grid1"); } return grid1; } public String doButton1Action() { // Type Java code that runs when the component is clicked // TODO: Return outcome that corresponds to a navigation rule // return "recalc"; return "recalc"; } public String doLink1Action() { // Type Java code that runs when the component is clicked // TODO: Return outcome that corresponds to a navigation rule // return "recalc"; // return "detail"; return "detail"; } protected HtmlDataTableEx getTableEx1() { if (tableEx1 == null) { tableEx1 = (HtmlDataTableEx) findComponentInRoot("tableEx1"); } return tableEx1; } protected UIColumnEx getColumnEx1() { if (columnEx1 == null) { columnEx1 = (UIColumnEx) findComponentInRoot("columnEx1"); } return columnEx1; } protected HtmlOutputText getText1() { if (text1 == null) { text1 = (HtmlOutputText) findComponentInRoot("text1"); } return text1; } protected HtmlOutputText getTextName1() { if (textName1 == null) { textName1 = (HtmlOutputText) findComponentInRoot("textName1"); } return textName1; } protected HtmlAjaxRefreshRequest getShowPopup() { if (showPopup == null) { showPopup = (HtmlAjaxRefreshRequest) findComponentInRoot("showPopup"); } return showPopup; } protected HtmlInputHidden getItemid() { if (itemid == null) { itemid = (HtmlInputHidden) findComponentInRoot("itemid"); } return itemid; } protected HtmlOutputText getText2() { if (text2 == null) { text2 = (HtmlOutputText) findComponentInRoot("text2"); } return text2; } protected UIColumnEx getColumnEx2() { if (columnEx2 == null) { columnEx2 = (UIColumnEx) findComponentInRoot("columnEx2"); } return columnEx2; } protected HtmlOutputText getTextPrice1() { if (textPrice1 == null) { textPrice1 = (HtmlOutputText) findComponentInRoot("textPrice1"); } return textPrice1; } protected HtmlOutputText getText3() { if (text3 == null) { text3 = (HtmlOutputText) findComponentInRoot("text3"); } return text3; } protected UIColumnEx getColumnEx3() { if (columnEx3 == null) { columnEx3 = (UIColumnEx) findComponentInRoot("columnEx3"); } return columnEx3; } protected HtmlInputText getTextQuantity1() { if (textQuantity1 == null) { textQuantity1 = (HtmlInputText) findComponentInRoot("textQuantity1"); } return textQuantity1; } protected HtmlCommandExButton getButton2() { if (button2 == null) { button2 = (HtmlCommandExButton) findComponentInRoot("button2"); } return button2; } protected HtmlPanelGrid getGrid2() { if (grid2 == null) { grid2 = (HtmlPanelGrid) findComponentInRoot("grid2"); } return grid2; } protected HtmlCommandExButton getButton3() { if (button3 == null) { button3 = (HtmlCommandExButton) findComponentInRoot("button3"); } return button3; } protected HtmlPanelGrid getTotals() { if (totals == null) { totals = (HtmlPanelGrid) findComponentInRoot("totals"); } return totals; } protected HtmlOutputText getText4() { if (text4 == null) { text4 = (HtmlOutputText) findComponentInRoot("text4"); } return text4; } protected HtmlPanelGrid getGrid5() { if (grid5 == null) { grid5 = (HtmlPanelGrid) findComponentInRoot("grid5"); } return grid5; } protected HtmlOutputText getTextTotalPrice() { if (textTotalPrice == null) { textTotalPrice = (HtmlOutputText) findComponentInRoot("textTotalPrice"); } return textTotalPrice; } protected HtmlOutputText getText5() { if (text5 == null) { text5 = (HtmlOutputText) findComponentInRoot("text5"); } return text5; } protected HtmlOutputText getTextTax1() { if (textTax1 == null) { textTax1 = (HtmlOutputText) findComponentInRoot("textTax1"); } return textTax1; } protected HtmlOutputText getText6() { if (text6 == null) { text6 = (HtmlOutputText) findComponentInRoot("text6"); } return text6; } protected HtmlOutputText getTextShipping1() { if (textShipping1 == null) { textShipping1 = (HtmlOutputText) findComponentInRoot("textShipping1"); } return textShipping1; } protected HtmlOutputText getText7() { if (text7 == null) { text7 = (HtmlOutputText) findComponentInRoot("text7"); } return text7; } protected HtmlOutputText getTextTotal1() { if (textTotal1 == null) { textTotal1 = (HtmlOutputText) findComponentInRoot("textTotal1"); } return textTotal1; } protected HtmlAjaxExternalRequest getShowDetails() { if (showDetails == null) { showDetails = (HtmlAjaxExternalRequest) findComponentInRoot("showDetails"); } return showDetails; } protected HtmlOutputText getText8() { if (text8 == null) { text8 = (HtmlOutputText) findComponentInRoot("text8"); } return text8; } protected HtmlAjaxRefreshSubmit getRefreshTotals() { if (refreshTotals == null) { refreshTotals = (HtmlAjaxRefreshSubmit) findComponentInRoot("refreshTotals"); } return refreshTotals; } protected HtmlOutputLink getLink1() { if (link1 == null) { link1 = (HtmlOutputLink) findComponentInRoot("link1"); } return link1; } protected HtmlPanelGrid getProduct() { if (product == null) { product = (HtmlPanelGrid) findComponentInRoot("product"); } return product; } protected HtmlPanelDialog getDescriptionPopup() { if (descriptionPopup == null) { descriptionPopup = (HtmlPanelDialog) findComponentInRoot("descriptionPopup"); } return descriptionPopup; } protected HtmlOutputText getTextDescription1d() { if (textDescription1d == null) { textDescription1d = (HtmlOutputText) findComponentInRoot("textDescription1d"); } return textDescription1d; }
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -