Author: tkuprevich
Date: 2008-04-14 09:52:31 -0400 (Mon, 14 Apr 2008)
New Revision: 7798
Modified:
trunk/test-applications/jsp/src/main/java/panelMenu/PanelMenu.java
Log:
Modified: trunk/test-applications/jsp/src/main/java/panelMenu/PanelMenu.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/panelMenu/PanelMenu.java 2008-04-14 13:43:43
UTC (rev 7797)
+++ trunk/test-applications/jsp/src/main/java/panelMenu/PanelMenu.java 2008-04-14 13:52:31
UTC (rev 7798)
@@ -1,9 +1,17 @@
package panelMenu;
import util.icon.Icon;
+import org.richfaces.component.html.HtmlPanelMenu;
+import com.sun.facelets.FaceletContext;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
public class PanelMenu {
+ private HtmlPanelMenu myPanelMenu;
+ private String bindingStatus;
private Icon icon;
private String width;
private String mode;
@@ -18,8 +26,10 @@
private String inputText;
private boolean disabled;
private boolean expandSingle;
-
+
public PanelMenu() {
+ myPanelMenu = new HtmlPanelMenu();
+ bindingStatus = "Ready";
width = "500px";
mode = "none";
expandMode = "none";
@@ -39,31 +49,52 @@
icon.setCollapsedGroup(icon.iconAjaxProcess);
icon.setDisabledGroup(icon.iconAjaxStoped);
}
-
+
+ public void panelAction(ActionEvent e) {
+ FacesContext context = FacesContext.getCurrentInstance();
+ if (context != null) {
+ System.out.println("=============");
+ System.out.println(myPanelMenu.getClientId(context));
+ System.out.println("=============");
+ bindingStatus = "Passed";
+ } else {
+ bindingStatus = "Failed";
+ }
+
+ }
+
public boolean isDisabled() {
return disabled;
}
+
public String getWidth() {
return width;
}
+
public void setWidth(String width) {
this.width = width;
}
+
public void setDisabled(boolean disabled) {
this.disabled = disabled;
}
+
public boolean isExpandSingle() {
return expandSingle;
}
+
public void setExpandSingle(boolean expandSingle) {
this.expandSingle = expandSingle;
}
+
public String getAlign() {
return align;
}
+
public void setAlign(String align) {
this.align = align;
}
+
public boolean isRendered() {
return rendered;
}
@@ -75,30 +106,39 @@
public Icon getIcon() {
return icon;
}
+
public void setIcon(Icon icon) {
this.icon = icon;
}
+
public String getIconGroupPosition() {
return iconGroupPosition;
}
+
public void setIconGroupPosition(String iconGroupPosition) {
this.iconGroupPosition = iconGroupPosition;
}
+
public String getIconGroupTopPosition() {
return iconGroupTopPosition;
}
+
public void setIconGroupTopPosition(String iconGroupTopPosition) {
this.iconGroupTopPosition = iconGroupTopPosition;
}
+
public String getIconItemPosition() {
return iconItemPosition;
}
+
public void setIconItemPosition(String iconItemPosition) {
this.iconItemPosition = iconItemPosition;
}
+
public String getIconItemTopPosition() {
return iconItemTopPosition;
}
+
public void setIconItemTopPosition(String iconItemTopPosition) {
this.iconItemTopPosition = iconItemTopPosition;
}
@@ -106,7 +146,7 @@
public String getMode() {
return mode;
}
-
+
public void setMode(String mode) {
this.mode = mode;
}
@@ -135,14 +175,14 @@
this.inputText = inputText;
}
- public void bTest1(){
+ public void bTest1() {
icon.setCollapsed(icon.iconCollapse);
icon.setExpanded(icon.iconExpand);
icon.setItem(icon.iconItem);
icon.setIcon(icon.iconFileManager);
icon.setCollapsedGroup(icon.iconAjaxProcess);
icon.setDisabledGroup(icon.iconAjaxStoped);
-
+
setWidth("400px");
setAlign("right");
setDisabled(false);
@@ -156,14 +196,14 @@
setTabIndex("3");
}
- public void bTest2(){
+ public void bTest2() {
icon.setCollapsed(icon.iconExpand);
icon.setExpanded(icon.iconCollapse);
icon.setItem(icon.iconHeader);
icon.setIcon(icon.iconFileManagerReject);
icon.setCollapsedGroup(icon.iconAjaxStoped);
icon.setDisabledGroup(icon.iconAjaxProcess);
-
+
setWidth("250px");
setAlign("bottom");
setDisabled(false);
@@ -174,17 +214,17 @@
setIconItemPosition("right");
setIconItemTopPosition("left");
setMode("server");
- setTabIndex("2");
+ setTabIndex("2");
}
- public void bTest3(){
+ public void bTest3() {
icon.setCollapsed(icon.iconCollapse);
icon.setExpanded(icon.iconExpand);
icon.setItem(icon.iconItem);
icon.setIcon(icon.iconFileManager);
icon.setCollapsedGroup(icon.iconAjaxProcess);
icon.setDisabledGroup(icon.iconAjaxStoped);
-
+
setWidth("400px");
setAlign("middle");
setDisabled(false);
@@ -195,18 +235,18 @@
setIconItemPosition("right");
setIconItemTopPosition("left");
setMode("none");
- setTabIndex("2");
-
+ setTabIndex("2");
+
}
- public void bTest4(){
+ public void bTest4() {
icon.setCollapsed(icon.iconExpand);
icon.setExpanded(icon.iconCollapse);
icon.setItem(icon.iconHeader);
icon.setIcon(icon.iconFileManagerReject);
icon.setCollapsedGroup(icon.iconAjaxStoped);
icon.setDisabledGroup(icon.iconAjaxProcess);
-
+
setWidth("250px");
setAlign("top");
setDisabled(true);
@@ -217,18 +257,18 @@
setIconItemPosition("left");
setIconItemTopPosition("left");
setMode("ajax");
- setTabIndex("2");
-
+ setTabIndex("2");
+
}
- public void bTest5(){
+ public void bTest5() {
icon.setCollapsed(icon.iconCollapse);
icon.setExpanded(icon.iconExpand);
icon.setItem(icon.iconItem);
icon.setIcon(icon.iconFileManager);
icon.setCollapsedGroup(icon.iconAjaxProcess);
icon.setDisabledGroup(icon.iconAjaxStoped);
-
+
setWidth("250px");
setAlign("right");
setDisabled(false);
@@ -239,7 +279,15 @@
setIconItemPosition("right");
setIconItemTopPosition("right");
setMode("none");
- setTabIndex("2");
+ setTabIndex("2");
}
+
+ public HtmlPanelMenu getMyPanelMenu() {
+ return myPanelMenu;
+ }
+
+ public void setMyPanelMenu(HtmlPanelMenu myPanelMenu) {
+ this.myPanelMenu = myPanelMenu;
+ }
}
\ No newline at end of file
Show replies by date