JBoss Rich Faces SVN: r1625 - in trunk/samples/richfaces-demo/src/main: resources/org/richfaces/demo/common and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ishabalov
Date: 2007-07-13 22:08:04 -0400 (Fri, 13 Jul 2007)
New Revision: 1625
Added:
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentDescriptor.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
trunk/samples/richfaces-demo/src/main/webapp/css/common.css
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
Log:
Added components grouping
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentDescriptor.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentDescriptor.java 2007-07-13 18:45:48 UTC (rev 1624)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentDescriptor.java 2007-07-14 02:08:04 UTC (rev 1625)
@@ -5,6 +5,7 @@
public class ComponentDescriptor {
private String id;
private String name;
+ private String group;
private String captionImage;
private String iconImage;
private String devGuideLocation;
@@ -89,4 +90,12 @@
return fc.getExternalContext().getRequestContextPath()+getDemoLocation();
}
+ public String getGroup() {
+ return group;
+ }
+
+ public void setGroup(String group) {
+ this.group = group;
+ }
+
}
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2007-07-13 18:45:48 UTC (rev 1624)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/ComponentNavigator.java 2007-07-14 02:08:04 UTC (rev 1625)
@@ -17,6 +17,7 @@
public class ComponentNavigator {
private List components = null;
private ComponentDescriptor currentComponent;
+ private List componentGroups = null;
public ComponentDescriptor getCurrentComponent() {
String id = getComponentParam();
@@ -53,6 +54,53 @@
this.currentComponent = currentComponent;
}
+ public List getComponentGroups() {
+ return componentGroups;
+ }
+ public void setComponentGroups(List componentGroups) {
+ this.componentGroups = componentGroups;
+ }
+
+ private List getFilteredComponents(String group) {
+ List ret = new ArrayList();
+ Iterator it = getComponents().iterator();
+ while (it.hasNext()) {
+ ComponentDescriptor desc = (ComponentDescriptor) it.next();
+ if (desc.getGroup().equals(group)) {
+ ret.add(desc);
+ }
+ }
+ return ret;
+ }
+
+ public List getRichDragDropComponents() {
+ return getFilteredComponents("richDragDrop");
+ }
+ public List getRichDataIterators() {
+ return getFilteredComponents("richDataIterators");
+ }
+ public List getRichMenu() {
+ return getFilteredComponents("richMenu");
+ }
+ public List getRichInputs() {
+ return getFilteredComponents("richInputs");
+ }
+ public List getRichOutputs() {
+ return getFilteredComponents("richOutputs");
+ }
+ public List getAjaxSupport() {
+ return getFilteredComponents("ajaxSupport");
+ }
+ public List getAjaxResources() {
+ return getFilteredComponents("ajaxResources");
+ }
+ public List getAjaxOutput() {
+ return getFilteredComponents("ajaxOutput");
+ }
+ public List getAjaxMisc() {
+ return getFilteredComponents("ajaxMisc");
+ }
+
public List getComponents() {
if (components==null) {
loadComponents();
@@ -91,6 +139,7 @@
desc.setId(e.getKey().toString().trim());
StringTokenizer toc = new StringTokenizer(e.getValue().toString(),",");
// #id=name,captionImage,iconImage,devGuideLocation,tldDocLocation,javaDocLocation
+ desc.setGroup(toc.nextToken().trim());
desc.setName(toc.nextToken().trim());
desc.setIconImage(toc.nextToken().trim());
desc.setCaptionImage(toc.nextToken().trim());
@@ -104,7 +153,7 @@
public int compare(Object o1, Object o2) {
ComponentDescriptor d1 = (ComponentDescriptor)o1;
ComponentDescriptor d2 = (ComponentDescriptor)o2;
- return d1.getId().compareTo(d2.getId());
+ return d1.getName().compareTo(d2.getName());
}});
setComponents(temp);
setCurrentComponent((ComponentDescriptor) temp.get(0));
Modified: trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
===================================================================
--- trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2007-07-13 18:45:48 UTC (rev 1624)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2007-07-14 02:08:04 UTC (rev 1625)
@@ -1,24 +1,58 @@
# list of components in comma-separated format
#id=name,iconImage,captionImage,devGuideLocation,tldDocLocation,javaDocLocation
-panel= Panel, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
-separator= Separator, /images/ico_separator.gif, /images/cn_separator.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/separator.jsf
-spacer= Spacer, /images/ico_spacer.gif, /images/cn_spacer.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/spacer.jsf
-tabPanel= Tab Panel, /images/ico_tabpanel.gif, /images/cn_tabpanel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/tabPanel.jsf
-inputNumberSlider= Input Number Slider, /images/ico_slider.gif, /images/cn_slider.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/inputNumberSlider.jsf
-inputNumberSpinner= Input Number Spinner, /images/ico_spinner.gif, /images/cn_spinner.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/inputNumberSpinner.jsf
-dataFilterSlider= Data Filter Slider, /images/ico_DataFilterSlider.gif, /images/cn_DataFilterSlider.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dataFilterSlider.jsf
-dataTable= Data Table, /images/ico_DataTable.gif, /images/cn_DataTable.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dataTable.jsf
-gmap= Google Map, /images/ico_GoogleMap.gif, /images/cn_GoogleMap.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/gmap.jsf
-paint2d= Paint2D, /images/ico_Paint2D.gif, /images/cn_Paint2D.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/paint2D.jsf
-toolBar= Tool Bar, /images/ico_ToolBar.gif, /images/cn_ToolBar.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/toolBar.jsf
-simpleTogglePanel= Simple Toggle Panel, /images/ico_SimpleTogglePanel.gif, /images/cn_SimpleTogglePanel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/simpleTogglePanel.jsf
-dragIndicator= Drag Indicator, /images/ico_DragIndicator.gif, /images/cn_DragIndicator.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dragSupport.jsf
-dragSupport= Drag Support, /images/ico_DragSupport.gif, /images/cn_DragSupport.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dragSupport.jsf
-dropSupport= Drop Support, /images/ico_DropSupport.gif, /images/cn_DropSupport.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dragSupport.jsf
-panelBar= Panel Bar, /images/ico_PanelBar.gif, /images/cn_PanelBar.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panelBar.jsf
-tree= Tree, /images/ico_Tree.gif, /images/cn_tree.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/tree.jsf
-modalPanel= Modal Panel, /images/ico_ModalPanel.gif, /images/cn_ModalPanel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/modalPanel.jsf
-togglePanel= Toggle Panel, /images/ico_TogglePanel.gif, /images/cn_TogglePanel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/togglePanel.jsf
-suggestionBox= Suggestion Box, /images/ico_SuggestionBox.gif, /images/cn_SuggestionBox.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/suggestionBox.jsf
-dataTableScroller= Data Table Scroller, /images/ico_DataTableScroller.gif, /images/cn_DataTableScroller.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dataTableScroller.jsf
-dropDownMenu= Drop Down Menu, /images/ico_dropDownMenu.gif, /images/cn_DropDownMenu.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dropDownMenu.jsf
+panel= richOutputs, Panel, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+separator= richOutputs, Separator, /images/ico_separator.gif, /images/cn_separator.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/separator.jsf
+spacer= richOutputs, Spacer, /images/ico_spacer.gif, /images/cn_spacer.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/spacer.jsf
+tabPanel= richOutputs, Tab Panel, /images/ico_tabpanel.gif, /images/cn_tabpanel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/tabPanel.jsf
+inputNumberSlider= richInputs, Input Number Slider, /images/ico_slider.gif, /images/cn_slider.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/inputNumberSlider.jsf
+inputNumberSpinner= richInputs, Input Number Spinner, /images/ico_spinner.gif, /images/cn_spinner.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/inputNumberSpinner.jsf
+dataFilterSlider= richDataIterators, Data Filter Slider, /images/ico_DataFilterSlider.gif, /images/cn_DataFilterSlider.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dataFilterSlider.jsf
+dataTable= richDataIterators, Data Table, /images/ico_DataTable.gif, /images/cn_DataTable.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dataTable.jsf
+column= richDataIterators, Column, /images/ico_DataTable.gif, /images/cn_DataTable.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dataTable.jsf
+columnGroup= richDataIterators, Column Group, /images/ico_DataTable.gif, /images/cn_DataTable.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dataTable.jsf
+dataDefinitionList= richDataIterators, Data Definition List, /images/ico_DataTable.gif, /images/cn_DataTable.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dataTable.jsf
+dataGrid= richDataIterators, Data Grid, /images/ico_DataTable.gif, /images/cn_DataTable.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dataTable.jsf
+dataList= richDataIterators, Data List, /images/ico_DataTable.gif, /images/cn_DataTable.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dataTable.jsf
+dataOrderedList= richDataIterators, Data Ordered List, /images/ico_DataTable.gif, /images/cn_DataTable.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dataTable.jsf
+gmap= richOutputs, Google Map, /images/ico_GoogleMap.gif, /images/cn_GoogleMap.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/gmap.jsf
+paint2d= richOutputs, Paint2D, /images/ico_Paint2D.gif, /images/cn_Paint2D.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/paint2D.jsf
+toolBar= richOutputs, Tool Bar, /images/ico_ToolBar.gif, /images/cn_ToolBar.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/toolBar.jsf
+simpleTogglePanel= richOutputs, Simple Toggle Panel, /images/ico_SimpleTogglePanel.gif, /images/cn_SimpleTogglePanel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/simpleTogglePanel.jsf
+dragIndicator= richDragDrop, Drag Indicator, /images/ico_DragIndicator.gif, /images/cn_DragIndicator.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dragSupport.jsf
+dragSupport= richDragDrop, Drag Support, /images/ico_DragSupport.gif, /images/cn_DragSupport.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dragSupport.jsf
+dropSupport= richDragDrop, Drop Support, /images/ico_DropSupport.gif, /images/cn_DropSupport.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dragSupport.jsf
+dndParam= richDragDrop, Drag-Drop Parameter, /images/ico_DropSupport.gif, /images/cn_DropSupport.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dragSupport.jsf
+panelBar= richOutputs, Panel Bar, /images/ico_PanelBar.gif, /images/cn_PanelBar.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panelBar.jsf
+tree= richOutputs, Tree, /images/ico_Tree.gif, /images/cn_tree.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/tree.jsf
+modalPanel= richOutputs, Modal Panel, /images/ico_ModalPanel.gif, /images/cn_ModalPanel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/modalPanel.jsf
+togglePanel= richOutputs, Toggle Panel, /images/ico_TogglePanel.gif, /images/cn_TogglePanel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/togglePanel.jsf
+suggestionBox= richInputs, Suggestion Box, /images/ico_SuggestionBox.gif, /images/cn_SuggestionBox.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/suggestionBox.jsf
+dataTableScroller= richDataIterators, Data Table Scroller, /images/ico_DataTableScroller.gif, /images/cn_DataTableScroller.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dataTableScroller.jsf
+dropDownMenu= richMenu, Drop Down Menu, /images/ico_dropDownMenu.gif, /images/cn_DropDownMenu.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dropDownMenu.jsf
+menuGroup= richMenu, Menu Group, /images/ico_dropDownMenu.gif, /images/cn_DropDownMenu.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dropDownMenu.jsf
+menuItem= richMenu, Menu Item, /images/ico_dropDownMenu.gif, /images/cn_DropDownMenu.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dropDownMenu.jsf
+menuSeparator= richMenu, Menu Separator, /images/ico_dropDownMenu.gif, /images/cn_DropDownMenu.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/dropDownMenu.jsf
+actionparam= ajaxSupport, Action Parameter, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+commandButton= ajaxSupport, Command Button, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+commandLink= ajaxSupport, Command Link, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+form= ajaxSupport, Ajax Form, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+support= ajaxSupport, Ajax Support, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+jsFunction= ajaxSupport, JavaScript Function, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+poll= ajaxSupport, Poll, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+push= ajaxSupport, Push, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+status= ajaxSupport, Status, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+ajaxListener= ajaxSupport, Ajax Listener, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+region= ajaxSupport, Ajax Region, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+loadBundle= ajaxResources, Bundle, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+loadScript= ajaxResources, Script, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+loadStyle= ajaxResources, Style, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+keepAlive= ajaxResources, Keep Alive, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+include= ajaxOutput, Include, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+mediaOutput= ajaxOutput, Media Output, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+outputPanel= ajaxOutput, Output Panel, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+include= ajaxOutput, Include, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+repeat= richDataIterators, Repeat, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+htmlCommandLink= ajaxMisc, Html Command Link, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+log= ajaxMisc, Log, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+page= ajaxMisc, Ajax Page, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
+portlet= ajaxMisc, Ajax Portlet, /images/ico_panel.gif, /images/cn_panel.gif, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..., /richfaces/panel.jsf
Modified: trunk/samples/richfaces-demo/src/main/webapp/css/common.css
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/css/common.css 2007-07-13 18:45:48 UTC (rev 1624)
+++ trunk/samples/richfaces-demo/src/main/webapp/css/common.css 2007-07-14 02:08:04 UTC (rev 1625)
@@ -142,7 +142,7 @@
background-position : left;
background-repeat : repeat-y;
background-color : transparent;
- padding : 10px 10px 10px 12px;
+ padding : 0px 0px 0px 0px;
}
.panel_menu div{
background-color : transparent;
Added: trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml (rev 0)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-group.xhtml 2007-07-14 02:08:04 UTC (rev 1625)
@@ -0,0 +1,27 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich">
+<ui:composition>
+<table border="0" cellpadding="3" cellspacing="1">
+ <tbody>
+ <a4j:repeat var="component" value="#{components}">
+ <tr class="#{component.current?'active':'unactive'}" onmouseover="this.className='active'" onmouseout="this.className='#{component.current?'active':'unactive'}'">
+ <td class="ico"><h:graphicImage value="#{component.iconImage}" width="16" height="16" alt="" border="0" /></td>
+ <td class="text" style="padding:0px 0px 0px 10px" width="100%">
+ <h:outputLink style="display:block;height:20px" value="#{component.contextRelativeDemoLocation}">
+ <span style="display:block;">
+ #{component.name}
+ </span>
+ <f:param value="#{component.id}" name="c"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ </a4j:repeat>
+ </tbody>
+</table>
+</ui:composition>
+</html>
+
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2007-07-13 18:45:48 UTC (rev 1624)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2007-07-14 02:08:04 UTC (rev 1625)
@@ -6,23 +6,53 @@
xmlns:rich="http://richfaces.ajax4jsf.org/rich">
<ui:composition>
<rich:panel styleClass="panel_menu">
- <table border="0" cellpadding="3" cellspacing="1">
- <tbody>
- <a4j:repeat var="component" value="#{componentNavigator.components}">
- <tr class="#{component.current?'active':'unactive'}" onmouseover="this.className='active'" onmouseout="this.className='#{component.current?'active':'unactive'}'">
- <td class="ico"><h:graphicImage value="#{component.iconImage}" width="16" height="16" alt="" border="0" /></td>
- <td class="text" style="padding:0px 0px 0px 10px" width="100%">
- <h:outputLink style="display:block;height:20px" value="#{component.contextRelativeDemoLocation}">
- <span style="display:block;">
- #{component.name}
- </span>
- <f:param value="#{component.id}" name="c"/>
- </h:outputLink>
- </td>
- </tr>
- </a4j:repeat>
- </tbody>
- </table>
+<rich:panelBar selectedPanel="#{componentNavigator.currentComponent.group}" height="500" width="100%">
+ <rich:panelBarItem id="ajaxSupport" label="Ajax Support">
+ <ui:include src="/templates/include/components-group.xhtml" >
+ <ui:param name="components" value="#{componentNavigator.ajaxSupport}" />
+ </ui:include>
+ </rich:panelBarItem>
+ <rich:panelBarItem id="ajaxResources" label="Resources/Beans Handling">
+ <ui:include src="/templates/include/components-group.xhtml" >
+ <ui:param name="components" value="#{componentNavigator.ajaxResources}" />
+ </ui:include>
+ </rich:panelBarItem>
+ <rich:panelBarItem id="ajaxOutput" label="Ajax Output">
+ <ui:include src="/templates/include/components-group.xhtml" >
+ <ui:param name="components" value="#{componentNavigator.ajaxOutput}" />
+ </ui:include>
+ </rich:panelBarItem>
+ <rich:panelBarItem id="ajaxMisc" label="Ajax Miscellaneous">
+ <ui:include src="/templates/include/components-group.xhtml" >
+ <ui:param name="components" value="#{componentNavigator.ajaxMisc}" />
+ </ui:include>
+ </rich:panelBarItem>
+ <rich:panelBarItem id="richDataIterators" label="Data Iteration">
+ <ui:include src="/templates/include/components-group.xhtml" >
+ <ui:param name="components" value="#{componentNavigator.richDataIterators}" />
+ </ui:include>
+ </rich:panelBarItem>
+ <rich:panelBarItem id="richDragDrop" label="Drag-Drop Support">
+ <ui:include src="/templates/include/components-group.xhtml" >
+ <ui:param name="components" value="#{componentNavigator.richDragDropComponents}" />
+ </ui:include>
+ </rich:panelBarItem>
+ <rich:panelBarItem id="richMenu" label="Rich Menu">
+ <ui:include src="/templates/include/components-group.xhtml" >
+ <ui:param name="components" value="#{componentNavigator.richMenu}" />
+ </ui:include>
+ </rich:panelBarItem>
+ <rich:panelBarItem id="richOutputs" label="Rich Output">
+ <ui:include src="/templates/include/components-group.xhtml" >
+ <ui:param name="components" value="#{componentNavigator.richOutputs}" />
+ </ui:include>
+ </rich:panelBarItem>
+ <rich:panelBarItem id="richInputs" label="Rich Input">
+ <ui:include src="/templates/include/components-group.xhtml" >
+ <ui:param name="components" value="#{componentNavigator.richInputs}" />
+ </ui:include>
+ </rich:panelBarItem>
+</rich:panelBar>
</rich:panel>
</ui:composition>
</html>
17 years, 6 months
JBoss Rich Faces SVN: r1624 - branches/3.0.2/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-07-13 14:45:48 -0400 (Fri, 13 Jul 2007)
New Revision: 1624
Modified:
branches/3.0.2/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
mouseover fix
Modified: branches/3.0.2/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- branches/3.0.2/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-07-13 17:44:11 UTC (rev 1623)
+++ branches/3.0.2/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-07-13 18:45:48 UTC (rev 1624)
@@ -2,34 +2,6 @@
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false;
-// If NS -- that is, !IE -- then set up for mouse capture
-//if (!IE) document.captureEvents(Event.MOUSEMOVE)
-
-// Temporary variables to hold mouse x-y pos.s
-//var cursorX = 0;
-//var cursorY = 0;
-
-// Main function to retrieve mouse x-y pos.s
-/*
-function getMouseXY(e) {
-if (IE) { // grab the x-y pos.s if browser is IE
-cursorX = event.clientX + document.body.scrollLeft;
-cursorY = event.clientY + document.body.scrollTop;
-} else { // grab the x-y pos.s if browser is NS
-cursorX = e.pageX;
-cursorY = e.pageY;
-}
-// catch possible negative values in NS4
-if (cursorX < 0){cursorX = 0;}
-if (cursorY < 0){cursorY = 0;}
-// show the position values in the form named Show
-// in the text fields named MouseX and MouseY
-return true;
-}
-
-// Set-up to use getMouseXY function onMouseMove
-document.onmousemove = getMouseXY;
-*/
ToolTip = Class.create();
ToolTip.prototype = {
@@ -64,6 +36,7 @@
this.toolTip.style.visibility = 'visible';
this.toolTip.style.display = "none";
this.parentAttached = false;
+ this.hintParentElement = null;
if(IE){
var toolTipZindex = parseInt(this.toolTip.style.zIndex);
new Insertion.Before(this.toolTip,
@@ -73,8 +46,7 @@
this.iframe = $(this.id + 'iframe');
}
-
- Event.observe(document.getElementsByTagName("body")[0], "mousemove", this.attachOnLoadEvents.bindAsEventListener(this), true);
+ if(!this.disabled) Event.observe(document.getElementsByTagName("body")[0], "mousemove", this.attachOnLoadEvents.bindAsEventListener(this), true);
},
attachOnLoadEvents: function(){
if(!this.parentAttached){
@@ -88,63 +60,90 @@
},
attachParentEvents: function(){
if(this.followMouse){
- Event.observe(this.parent, this.event, this.doShow.bindAsEventListener(this), false);
+ Event.observe(this.parent, 'mousemove', this.doShow.bindAsEventListener(this), false);
} else {
Event.observe(this.parent, this.event, this.doShow.bindAsEventListener(this), false);
}
- /*
- if(this.mode == 'ajax'){
- Event.observe(this.parent, this.event, this.evecuteAjax.bindAsEventListener(this), false);
- }
- */
Event.observe(this.parent, "mouseout", this.doHide.bindAsEventListener(this), false);
+
+ Event.observe(this.toolTip, 'mouseout', this.leaveHint.bindAsEventListener(this), false)
+
},
+
+ detectAncestorNode: function(leaf, element) {
+ // Return true if "element" is "leaf" or one of its parents
+ var node = leaf;
+ while (node != null && node != element)
+ node = node.parentNode;
+ return (node != null);
+ },
+
+
+ leaveHint: function(e) {
+
+ var hintNotLeft = false;
+
+ // detect mouse move from hint to owner
+ // if mouse entered the just the owner hintNotLeft is set true
+ hintNotLeft = this.detectAncestorNode(e.toElement,this.hintParentElement);
+ hintNotLeft = hintNotLeft || this.detectAncestorNode(e.relatedTarget,this.hintParentElement);
+
+ if (!hintNotLeft)
+ this.doHide(e);
+ },
+
+
+
+
doShow: function(e){
- if (IE) { // grab the x-y pos.s if browser is IE
- cursorX = e.clientX + document.body.scrollLeft;
- cursorY = e.clientY + document.body.scrollTop;
- } else { // grab the x-y pos.s if browser is NS
- cursorX = e.pageX;
- cursorY = e.pageY;
+
+ if (e.target)
+ this.hintParentElement = e.target;
+ if (e.srcElement)
+ this.hintParentElement = e.srcElement;
+
+ posX = e.clientX + document.body.scrollLeft;
+ posY = e.clientY + document.body.scrollTop;
+
+ if(this.mode == 'ajax'){
+ var event = e;
+ eval(this.ajaxExecuteString);
+// this.toolTip = $(this.id);
+// this.setToolTipPosition();
+// if(this.iframe){
+// this.iframe.style.top = parseInt(this.toolTip.style.top) - this.toolTipBorderHeight;
+// this.iframe.style.left = parseInt(this.toolTip.style.left) - this.toolTipBorderWidth;
+// this.iframe.style.display = "block";
+// }
+// this.toolTip.style.display = "block";
}
- // catch possible negative values in NS4
- if (cursorX < 0){cursorX = 0;}
- if (cursorY < 0){cursorY = 0;}
-
- this.setToolTipPosition(e, cursorX, cursorY);
+
+ this.setToolTipPosition(e, posX, posY);
+
+
+
+ this.toolTip.style.display = "block";
if(this.iframe){
this.iframe.style.top = parseInt(this.toolTip.style.top) - this.toolTipBorderHeight;
this.iframe.style.left = parseInt(this.toolTip.style.left) - this.toolTipBorderWidth;
this.iframe.style.display = "block";
}
- this.toolTip.style.display = "block";
+ },
+
+ doHide: function(e){
+ var fakeEvent = false;
+ fakeEvent = this.detectAncestorNode(e.toElement,this.toolTip);
+ fakeEvent = fakeEvent || this.detectAncestorNode(e.relatedTarget,this.toolTip);
+
- //
- //Event.stopObserving(this.parent, this.event, this.doShow.bindAsEventListener(this), false);
- if(this.mode == 'ajax'){
- var event = e;
- eval(this.ajaxExecuteString);
-
-
- this.toolTip = $(this.id);
- this.setToolTipPosition();
+ if (!fakeEvent) {
+ this.toolTip.style.display = "none";
if(this.iframe){
- this.iframe.style.top = parseInt(this.toolTip.style.top) - this.toolTipBorderHeight;
- this.iframe.style.left = parseInt(this.toolTip.style.left) - this.toolTipBorderWidth;
- this.iframe.style.display = "block";
+ this.iframe.style.display = "none";
}
- this.toolTip.style.display = "block";
+ this.hintParentElement = null;
}
-
- },
-
- doHide: function(e){
- this.toolTip.style.display = "none";
- if(this.iframe){
- this.iframe.style.display = "none";
- }
- //Event.observe(this.parent, this.event, this.doShow.bindAsEventListener(this), false);
},
doEnable: function(){
@@ -224,11 +223,4 @@
}
return [wWidth,wHeight];
}
- /*
- evecuteAjax: function (e){
- var event = e;
- eval(this.ajaxExecuteString);
- }
- */
-
}
\ No newline at end of file
17 years, 6 months
JBoss Rich Faces SVN: r1623 - in trunk: framework/api and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-07-13 13:44:11 -0400 (Fri, 13 Jul 2007)
New Revision: 1623
Added:
trunk/framework/api-parent/
trunk/framework/api-parent/pom.xml
trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/event/ISimpleToggle2Listener.java
trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/event/SimpleToggle2Event.java
Modified:
trunk/framework/api/pom.xml
trunk/framework/pom.xml
trunk/sandbox/api/pom.xml
trunk/sandbox/samples/pom.xml
trunk/sandbox/samples/tooltip-sample/pom.xml
trunk/sandbox/ui/pom.xml
trunk/sandbox/ui/tooltip/pom.xml
trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/image/AbstractToolTipCornerImage.java
Log:
Latest sandbox updates
Modified: trunk/framework/api/pom.xml
===================================================================
--- trunk/framework/api/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
+++ trunk/framework/api/pom.xml 2007-07-13 17:44:11 UTC (rev 1623)
@@ -1,68 +1,14 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <artifactId>framework</artifactId>
- <groupId>org.richfaces</groupId>
- <version>3.1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>api</artifactId>
- <name>Java Server Faces AJAX framework API</name>
- <properties>
- <jsfVersion>1.1</jsfVersion>
- </properties>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- <version>1.1.12</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- </dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <version>1.7.0</version>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_03</version>
- </dependency>
- </dependencies>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>api-parent</artifactId>
+ <groupId>org.richfaces.framework</groupId>
+ <version>3.1.0-SNAPSHOT</version>
+ <relativePath>../api-parent/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>api</artifactId>
+ <name>Java Server Faces AJAX framework API</name>
</project>
\ No newline at end of file
Added: trunk/framework/api-parent/pom.xml
===================================================================
--- trunk/framework/api-parent/pom.xml (rev 0)
+++ trunk/framework/api-parent/pom.xml 2007-07-13 17:44:11 UTC (rev 1623)
@@ -0,0 +1,69 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>framework</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.framework</groupId>
+ <packaging>pom</packaging>
+ <artifactId>api-parent</artifactId>
+ <name>Java Server Faces AJAX framework API Dependencies</name>
+ <properties>
+ <jsfVersion>1.1</jsfVersion>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.12</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_03</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Modified: trunk/framework/pom.xml
===================================================================
--- trunk/framework/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
+++ trunk/framework/pom.xml 2007-07-13 17:44:11 UTC (rev 1623)
@@ -1,21 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <artifactId>root</artifactId>
- <groupId>org.richfaces</groupId>
- <version>3.1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
- <artifactId>framework</artifactId>
- <packaging>pom</packaging>
- <name>Java Server Faces AJAX framework</name>
- <dependencies />
- <build>
- </build>
- <modules>
- <module>api</module>
- <module>impl</module>
- <module>test</module>
- </modules>
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>root</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>framework</artifactId>
+ <packaging>pom</packaging>
+ <name>Java Server Faces AJAX framework</name>
+ <dependencies />
+ <build>
+ </build>
+ <modules>
+ <module>api-parent</module>
+ <module>api</module>
+ <module>impl</module>
+ <module>test</module>
+ </modules>
</project>
\ No newline at end of file
Modified: trunk/sandbox/api/pom.xml
===================================================================
--- trunk/sandbox/api/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
+++ trunk/sandbox/api/pom.xml 2007-07-13 17:44:11 UTC (rev 1623)
@@ -2,71 +2,22 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>sandbox</artifactId>
- <groupId>org.richfaces</groupId>
+ <artifactId>api-parent</artifactId>
+ <groupId>org.richfaces.framework</groupId>
<version>3.1.0-SNAPSHOT</version>
+ <relativePath>../../framework/api-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.sandbox</groupId>
<artifactId>api</artifactId>
- <name>Richfaces Sandbox API</name>
- <properties>
- <jsfVersion>1.1</jsfVersion>
- </properties>
+ <name>Richfaces Sandbox API</name>
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- <version>1.1.12</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- </dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <version>1.7.0</version>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_03</version>
- </dependency>
- <dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>api</artifactId>
<version>${project.version}</version>
</dependency>
- </dependencies></project>
\ No newline at end of file
+ </dependencies>
+
+
+</project>
\ No newline at end of file
Modified: trunk/sandbox/samples/pom.xml
===================================================================
--- trunk/sandbox/samples/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
+++ trunk/sandbox/samples/pom.xml 2007-07-13 17:44:11 UTC (rev 1623)
@@ -19,6 +19,6 @@
<module>simpleTogglePanel2-sample</module>
<module>panelmenu-sample</module>
- <!--module>tooltip-sample</module-->
+ <module>tooltip-sample</module>
</modules>
</project>
\ No newline at end of file
Modified: trunk/sandbox/samples/tooltip-sample/pom.xml
===================================================================
--- trunk/sandbox/samples/tooltip-sample/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
+++ trunk/sandbox/samples/tooltip-sample/pom.xml 2007-07-13 17:44:11 UTC (rev 1623)
@@ -1,7 +1,7 @@
<?xml version="1.0"?><project>
<parent>
- <artifactId>richfaces-samples</artifactId>
- <groupId>org.richfaces</groupId>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -11,12 +11,7 @@
<name>tooltip-sample Maven Webapp</name>
<dependencies>
<dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces</groupId>
+ <groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>tooltip</artifactId>
<version>${project.version}</version>
</dependency>
Modified: trunk/sandbox/ui/pom.xml
===================================================================
--- trunk/sandbox/ui/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
+++ trunk/sandbox/ui/pom.xml 2007-07-13 17:44:11 UTC (rev 1623)
@@ -15,6 +15,7 @@
<module>calendar</module>
<module>panelmenu</module>
<module>panel2</module>
+ <module>tooltip</module>
<!--module>scrollable-grid</module-->
<module>simpleTogglePanel2</module>
</modules>
Added: trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/event/ISimpleToggle2Listener.java
===================================================================
--- trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/event/ISimpleToggle2Listener.java (rev 0)
+++ trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/event/ISimpleToggle2Listener.java 2007-07-13 17:44:11 UTC (rev 1623)
@@ -0,0 +1,38 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * Created on 11.07.2006
+ */
+package org.richfaces.event;
+
+import javax.faces.event.FacesListener;
+
+/**
+ * @author igels
+ */
+
+//TODO by nick - denis - add addToggleListener method to component
+public interface ISimpleToggle2Listener extends FacesListener {
+
+ public void processToggle(SimpleToggle2Event event);
+
+}
\ No newline at end of file
Added: trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/event/SimpleToggle2Event.java
===================================================================
--- trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/event/SimpleToggle2Event.java (rev 0)
+++ trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/event/SimpleToggle2Event.java 2007-07-13 17:44:11 UTC (rev 1623)
@@ -0,0 +1,76 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * Created on 11.07.2006
+ */
+package org.richfaces.event;
+
+import javax.faces.component.UIComponent;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.FacesListener;
+
+/**
+ * @author igels
+ */
+public class SimpleToggle2Event extends ActionEvent {
+
+ private static final long serialVersionUID = 5582624805941635421L;
+ private boolean _opened;
+
+ /**
+ * @param source
+ * @param opened
+ */
+ public SimpleToggle2Event(UIComponent source, boolean opened) {
+ super(source);
+ this._opened = opened;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
+ */
+ public boolean isAppropriateListener(FacesListener listener) {
+ return listener instanceof ISimpleToggle2Listener;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
+ */
+ public void processListener(FacesListener listener) {
+ ((ISimpleToggle2Listener) listener).processToggle(this);
+ }
+
+ /**
+ * @return Returns the _state.
+ */
+ public boolean isIsOpen() {
+ return _opened;
+ }
+
+ /**
+ *
+ * @param opened The state to set
+ */
+ public void setIsOpen(boolean opened) {
+ this._opened = opened;
+ }
+}
\ No newline at end of file
Modified: trunk/sandbox/ui/tooltip/pom.xml
===================================================================
--- trunk/sandbox/ui/tooltip/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
+++ trunk/sandbox/ui/tooltip/pom.xml 2007-07-13 17:44:11 UTC (rev 1623)
@@ -1,11 +1,11 @@
<?xml version="1.0"?><project>
<parent>
<artifactId>ui</artifactId>
- <groupId>org.richfaces</groupId>
+ <groupId>org.richfaces.sandbox</groupId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
+ <groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>tooltip</artifactId>
<name>tooltip</name>
<build>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>1.1.1-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -35,9 +35,9 @@
</build>
<dependencies>
<dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>common</artifactId>
- <version>3.1.0-SNAPSHOT</version>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>impl</artifactId>
+ <version>${project.version}</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml
===================================================================
--- trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml 2007-07-13 16:42:27 UTC (rev 1622)
+++ trunk/sandbox/ui/tooltip/src/main/config/component/toolTip.xml 2007-07-13 17:44:11 UTC (rev 1623)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
<components>
<component>
@@ -14,7 +14,7 @@
<tag>
<name>toolTip</name>
<classname>org.richfaces.taglib.ToolTipTag</classname>
- <superclass>org.ajax4jsf.framework.taglib.HtmlComponentTagBase</superclass>
+ <superclass>org.ajax4jsf.webapp.taglib.HtmlComponentTagBase</superclass>
</tag>
Modified: trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
--- trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-07-13 16:42:27 UTC (rev 1622)
+++ trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-07-13 17:44:11 UTC (rev 1623)
@@ -7,7 +7,7 @@
import javax.faces.context.ResponseWriter;
import org.ajax4jsf.renderkit.AjaxComponentRendererBase;
-import org.ajax4jsf.framework.skin.Skin;
+import org.richfaces.skin.Skin;
import org.richfaces.component.UIToolTip;
import org.richfaces.renderkit.html.image.cornerimages.BottomLeftToolTipCornerImage;
import org.richfaces.renderkit.html.image.cornerimages.BottomRightToolTipCornerImage;
Modified: trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/image/AbstractToolTipCornerImage.java
===================================================================
--- trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/image/AbstractToolTipCornerImage.java 2007-07-13 16:42:27 UTC (rev 1622)
+++ trunk/sandbox/ui/tooltip/src/main/java/org/richfaces/renderkit/html/image/AbstractToolTipCornerImage.java 2007-07-13 17:44:11 UTC (rev 1623)
@@ -18,15 +18,15 @@
import javax.faces.context.FacesContext;
import javax.imageio.ImageIO;
-import org.ajax4jsf.framework.resource.GifRenderer;
-import org.ajax4jsf.framework.resource.InternetResourceBuilder;
-import org.ajax4jsf.framework.resource.Java2Dresource;
-import org.ajax4jsf.framework.resource.JpegRenderer;
-import org.ajax4jsf.framework.resource.ResourceContext;
-import org.ajax4jsf.framework.skin.Skin;
-import org.ajax4jsf.framework.skin.SkinFactory;
-import org.ajax4jsf.framework.util.HtmlColor;
-import org.ajax4jsf.framework.util.HtmlDimensions;
+import org.ajax4jsf.resource.GifRenderer;
+import org.ajax4jsf.resource.InternetResourceBuilder;
+import org.ajax4jsf.resource.Java2Dresource;
+import org.ajax4jsf.resource.JpegRenderer;
+import org.ajax4jsf.resource.ResourceContext;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+import org.ajax4jsf.util.HtmlColor;
+import org.ajax4jsf.util.HtmlDimensions;
public abstract class AbstractToolTipCornerImage extends Java2Dresource{
17 years, 6 months
JBoss Rich Faces SVN: r1622 - in trunk/sandbox: api and 24 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-07-13 12:42:27 -0400 (Fri, 13 Jul 2007)
New Revision: 1622
Added:
trunk/sandbox/ui/pom.xml
trunk/sandbox/ui/tooltip/
Removed:
trunk/sandbox/tooltip/
Modified:
trunk/sandbox/api/
trunk/sandbox/api/pom.xml
trunk/sandbox/api/src/main/java/org/richfaces/model/DataModelCache.java
trunk/sandbox/api/src/main/java/org/richfaces/model/GridDataModel.java
trunk/sandbox/api/src/main/java/org/richfaces/model/ScrollableGridRange.java
trunk/sandbox/pom.xml
trunk/sandbox/samples/calendar-sample/pom.xml
trunk/sandbox/samples/panel2-sample/pom.xml
trunk/sandbox/samples/panelmenu-sample/pom.xml
trunk/sandbox/samples/pom.xml
trunk/sandbox/samples/simpleTogglePanel2-sample/pom.xml
trunk/sandbox/ui/calendar/pom.xml
trunk/sandbox/ui/calendar/src/main/config/component/calendar.xml
trunk/sandbox/ui/panel2/pom.xml
trunk/sandbox/ui/panel2/src/main/config/component/panel2.xml
trunk/sandbox/ui/panel2/src/main/templates/panel2.jspx
trunk/sandbox/ui/panelmenu/pom.xml
trunk/sandbox/ui/panelmenu/src/main/config/component/panelMenu.xml
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/gradientimages/PanelMenuGroupGradient.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/gradientimages/PanelMenuItemGradient.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java
trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java
trunk/sandbox/ui/panelmenu/src/test/java/org/richfaces/component/PanelMenuComponentTest.java
trunk/sandbox/ui/scrollable-grid/pom.xml
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java
trunk/sandbox/ui/simpleTogglePanel2/pom.xml
trunk/sandbox/ui/simpleTogglePanel2/src/main/config/component/simpleTogglePanel2.xml
trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/component/UISimpleTogglePanel2.java
Log:
Sandbox ready to build
Property changes on: trunk/sandbox/api
___________________________________________________________________
Name: svn:ignore
+ target
Modified: trunk/sandbox/api/pom.xml
===================================================================
--- trunk/sandbox/api/pom.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/api/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,68 +1,72 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <artifactId>sandbox</artifactId>
- <groupId>org.richfaces</groupId>
- <version>3.1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.sandbox</groupId>
- <artifactId>api</artifactId>
- <name>Java Server Faces AJAX framework API</name>
- <properties>
- <jsfVersion>1.1</jsfVersion>
- </properties>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- <version>1.1.12</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- </dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <version>1.7.0</version>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_03</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>sandbox</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.sandbox</groupId>
+ <artifactId>api</artifactId>
+ <name>Richfaces Sandbox API</name>
+ <properties>
+ <jsfVersion>1.1</jsfVersion>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.12</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_03</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies></project>
\ No newline at end of file
Modified: trunk/sandbox/api/src/main/java/org/richfaces/model/DataModelCache.java
===================================================================
--- trunk/sandbox/api/src/main/java/org/richfaces/model/DataModelCache.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/api/src/main/java/org/richfaces/model/DataModelCache.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -11,9 +11,9 @@
import javax.faces.context.FacesContext;
import javax.faces.model.DataModelListener;
-import org.ajax4jsf.ajax.repeat.DataVisitor;
-import org.ajax4jsf.ajax.repeat.Range;
-import org.ajax4jsf.ajax.repeat.SerializableDataModel;
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.Range;
+import org.ajax4jsf.model.SerializableDataModel;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/sandbox/api/src/main/java/org/richfaces/model/GridDataModel.java
===================================================================
--- trunk/sandbox/api/src/main/java/org/richfaces/model/GridDataModel.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/api/src/main/java/org/richfaces/model/GridDataModel.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -11,9 +11,9 @@
import javax.faces.context.FacesContext;
-import org.ajax4jsf.ajax.repeat.DataVisitor;
-import org.ajax4jsf.ajax.repeat.ExtendedDataModel;
-import org.ajax4jsf.ajax.repeat.Range;
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.ExtendedDataModel;
+import org.ajax4jsf.model.Range;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/sandbox/api/src/main/java/org/richfaces/model/ScrollableGridRange.java
===================================================================
--- trunk/sandbox/api/src/main/java/org/richfaces/model/ScrollableGridRange.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/api/src/main/java/org/richfaces/model/ScrollableGridRange.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -12,7 +12,7 @@
import java.io.Serializable;
-import org.ajax4jsf.ajax.repeat.Range;
+import org.ajax4jsf.model.Range;
Modified: trunk/sandbox/pom.xml
===================================================================
--- trunk/sandbox/pom.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,265 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
- <artifactId>sandbox-parent</artifactId>
- <packaging>pom</packaging>
- <name>RichFaces Components</name>
- <version>1.0.0-SNAPSHOT</version>
- <url>http://richfaces.ajax4jsf.org</url>
- <properties>
- <!-- -->
- </properties>
- <!--
- <url>http://labs.jboss.com/jbossrichfaces</url>
- -->
- <licenses>
- <license>
- <name>LGPL 2.1</name>
- <url>http://www.gnu.org/licenses/lgpl.html</url>
- <distribution>repo</distribution>
- <comments>
- GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
- </comments>
- </license>
- </licenses>
- <issueManagement>
- <system>JIRA</system>
- <url>http://jira.jboss.org/jira/browse/RF</url>
- </issueManagement>
- <developers>
- <developer>
- <id>alexsmirnov</id>
- <name>Alexander Smirnov</name>
- <email>alexsmirnov(a)exadel.com</email>
- <organization>Exadel Inc.</organization>
- <organizationUrl>http://www.exadel.com</organizationUrl>
- <roles>
- <role>architect</role>
- <role>developer</role>
- </roles>
- <timezone>-3</timezone>
- </developer>
- <developer>
- <id>ishabalov</id>
- <name>Igor Shabalov</name>
- <email>ishabalov(a)exadel.com</email>
- <organization>Exadel Inc.</organization>
- <organizationUrl>http://www.exadel.com</organizationUrl>
- <roles>
- <role>architect</role>
- <role>developer</role>
- </roles>
- <timezone>+8</timezone>
- </developer>
- <developer>
- <id>sergeysmirnov</id>
- <name>Sergey Smirnov</name>
- <email>sergeysmirnov(a)exadel.com</email>
- <organization>Exadel Inc.</organization>
- <organizationUrl>http://www.exadel.com</organizationUrl>
- <roles>
- <role>architect</role>
- <role>developer</role>
- </roles>
- <timezone>+8</timezone>
- </developer>
- <developer>
- <id>nbelayevsky</id>
- <name>Nik Belyaevsky</name>
- <email>nbelayevsky(a)exadel.com</email>
- <organization>Exadel Inc.</organization>
- <organizationUrl>http://www.exadel.com</organizationUrl>
- <roles>
- <role>architect</role>
- <role>developer</role>
- </roles>
- <timezone>-2</timezone>
- </developer>
- </developers>
- <distributionManagement>
- <downloadUrl>
- http://labs.jboss.com/portal/jbossrichfaces/downloads
-
- </downloadUrl>
- <repository>
- <id>release-repository</id>
- <uniqueVersion>false</uniqueVersion>
-
- <url>${releaseRepository}</url>
- </repository>
- <snapshotRepository>
- <id>snap-repository</id>
- <uniqueVersion>true</uniqueVersion>
- <url>${snapshotRepository}</url>
- </snapshotRepository>
- </distributionManagement>
- <scm>
- <connection>
- scm:svn:http://anonsvn.jboss.org/repos/richfaces/
- </connection>
- <developerConnection>
- scm:svn:https://svn.jboss.org/repos/richfaces/
- </developerConnection>
- <url>http://anonsvn.jboss.org/repos/richfaces/</url>
- </scm>
-
-
- <pluginRepositories>
- <pluginRepository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>daily</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.jboss.org</id>
- <name>Jboss Repository for Maven Snapshots</name>
- <url>http://snapshots.jboss.com/</url>
- </pluginRepository>
- </pluginRepositories>
- <repositories>
-
- <repository>
- <releases/>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- <id>maven-repository.dev.java.net</id>
- <name>Java.net Repository for Maven</name>
- <url>
- https://maven-repository.dev.java.net/nonav/repository
- </url>
- <layout>legacy</layout>
- </repository>
- <repository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.jboss.org</id>
- <name>Jboss Repository for Maven Snapshots</name>
- <url>http://snapshots.jboss.com/</url>
- </repository>
-
-
-
- </repositories>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-source</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.1_02</version>
- <exclusions>
- <!-- No longer presented in any repo -->
- <exclusion>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet.jsp.jstl</groupId>
- <artifactId>jstl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>1.1_02</version>
- <scope>runtime</scope>
- <exclusions>
- <!-- No longer presented in any repo -->
- <exclusion>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.servlet.jsp.jstl</groupId>
- <artifactId>jstl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>ajax4jsf</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>test</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- <version>1.1.11</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>el-impl</groupId>
- <artifactId>el-impl</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2</version>
- </dependency>
- </dependencies>
- <modules>
- <module>scrollable-grid</module>
- <module>panel2</module>
- <module>simpleTogglePanel2</module>
- <module>panelmenu</module>
- <module>calendar</module>
- <module>tooltip</module>
- </modules>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>root</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>sandbox</artifactId>
+ <packaging>pom</packaging>
+ <name>RichFaces Sandbox Components</name>
+ <url>http://richfaces.ajax4jsf.org/sandbox</url>
+ <properties>
+ <!-- -->
+ </properties>
+ <!--
+ <url>http://labs.jboss.com/jbossrichfaces</url>
+ -->
+ <modules>
+ <module>api</module>
+ <module>ui</module>
+ <module>samples</module>
+ </modules>
+</project>
Modified: trunk/sandbox/samples/calendar-sample/pom.xml
===================================================================
--- trunk/sandbox/samples/calendar-sample/pom.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/samples/calendar-sample/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,22 +1,16 @@
<?xml version="1.0"?><project>
<parent>
- <artifactId>richfaces-samples</artifactId>
- <groupId>org.richfaces</groupId>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
<artifactId>calendar-sample</artifactId>
<packaging>war</packaging>
<name>calendar-sample Maven Webapp</name>
<dependencies>
<dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces</groupId>
+ <groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>calendar</artifactId>
<version>${project.version}</version>
</dependency>
Modified: trunk/sandbox/samples/panel2-sample/pom.xml
===================================================================
--- trunk/sandbox/samples/panel2-sample/pom.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/samples/panel2-sample/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,7 +1,7 @@
<?xml version="1.0"?><project>
<parent>
- <artifactId>richfaces-samples</artifactId>
- <groupId>org.richfaces</groupId>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
<version>3.1.0-SNAPSHOT</version>
</parent>
@@ -13,14 +13,14 @@
<dependencies>
<dependency>
- <groupId>org.richfaces</groupId>
+ <groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>panel2</artifactId>
- <version>3.1.0-SNAPSHOT</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.richfaces</groupId>
- <artifactId>richfaces</artifactId>
- <version>3.1.0-SNAPSHOT</version>
+ <artifactId>skins</artifactId>
+ <version>${project.version}</version>
</dependency>
</dependencies>
Modified: trunk/sandbox/samples/panelmenu-sample/pom.xml
===================================================================
--- trunk/sandbox/samples/panelmenu-sample/pom.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/samples/panelmenu-sample/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,7 +1,7 @@
<?xml version="1.0"?><project>
<parent>
- <artifactId>richfaces-samples</artifactId>
- <groupId>org.richfaces</groupId>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -11,12 +11,7 @@
<name>panelmenu-sample Maven Webapp</name>
<dependencies>
<dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces</groupId>
+ <groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>panelmenu</artifactId>
<version>${project.version}</version>
</dependency>
Modified: trunk/sandbox/samples/pom.xml
===================================================================
--- trunk/sandbox/samples/pom.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/samples/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,303 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
- <artifactId>sandbox-samples</artifactId>
- <packaging>pom</packaging>
- <name>RichFaces Components Examples</name>
- <version>1.0.0-SNAPSHOT</version>
- <url>http://labs.jboss.com/jbossrichfaces/samples</url>
- <properties>
- <!-- -->
- </properties>
- <!-- Profile to run jetty, so the tomcat jars are included in the bundle. They are not included by default -->
- <build>
- <plugins>
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-plugin</artifactId>
- <version>6.1.1</version>
- <configuration>
- <scanIntervalSeconds>10</scanIntervalSeconds>
- <connectors>
- <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
- <port>8080</port>
- <maxIdleTime>60000</maxIdleTime>
- </connector>
- </connectors>
- </configuration>
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>samples</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.sandbox</groupId>
+ <artifactId>samples</artifactId>
+ <packaging>pom</packaging>
+ <name>RichFaces Sandbox Components Examples</name>
+ <modules>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- <executions>
- <execution>
- <id>surefire-it</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skip>false</skip>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>ajax4jsf</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- <version>1.1.12</version>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>el-impl</groupId>
- <artifactId>el-impl</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
-
- <scm>
- <connection>
- scm:svn:http://anonsvn.jboss.org/repos/richfaces/
- </connection>
- <developerConnection>
- scm:svn:https://svn.jboss.org/repos/richfaces/
- </developerConnection>
- <url>http://anonsvn.jboss.org/repos/richfaces/</url>
- </scm>
-
- <distributionManagement>
- <downloadUrl>http://labs.jboss.com/portal/jbossrichfaces/downloads</downloadUrl>
- <repository>
- <id>release-repository</id>
- <uniqueVersion>false</uniqueVersion>
- <url>${releaseRepository}</url>
- </repository>
- <snapshotRepository>
- <id>snap-repository</id>
- <uniqueVersion>true</uniqueVersion>
- <url>${snapshotRepository}</url>
- </snapshotRepository>
- </distributionManagement>
- <pluginRepositories>
- <pluginRepository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.jboss.org</id>
- <name>Jboss Repository for Maven Snapshots</name>
- <url>http://snapshots.jboss.com/</url>
- </pluginRepository>
- </pluginRepositories>
- <repositories>
- <repository>
- <releases/>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- <id>maven-repository.dev.java.net</id>
- <name>Java.net Repository for Maven</name>
- <url>
- https://maven-repository.dev.java.net/nonav/repository
- </url>
- <layout>legacy</layout>
- </repository>
- <repository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.jboss.org</id>
- <name>Jboss Repository for Maven Snapshots</name>
- <url>http://snapshots.jboss.com/</url>
- </repository>
- </repositories>
- <profiles>
- <profile>
- <id>jsf12</id>
- <build>
- <defaultGoal>jetty:run</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_03</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>1.2_03</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>myfaces</id>
- <properties>
- <myfaces>1.1.5</myfaces>
- <tomahawk>1.1.5</tomahawk>
- </properties>
- <build>
- <plugins/>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>ajax4jsf</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <exclusions>
- <exclusion>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.myfaces.core</groupId>
- <artifactId>myfaces-api</artifactId>
- <version>${myfaces}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.myfaces.core</groupId>
- <artifactId>myfaces-impl</artifactId>
- <version>${myfaces}</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>jsf-facelets</id>
- <dependencies>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_03</version>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>1.2_03</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- <version>1.1.11</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>el-impl</groupId>
- <artifactId>el-impl</artifactId>
- <version>1.0</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.0</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
- <modules>
- <module>scrollable-grid-demo</module>
- <module>panel2-sample</module>
- <module>simpleTogglePanel2-sample</module>
- <module>panelmenu-sample</module>
- <module>calendar-sample</module>
- <module>tooltip-sample</module>
- </modules>
+ <module>calendar-sample</module>
+ <!--module>scrollable-grid-demo</module-->
+ <module>panel2-sample</module>
+ <module>simpleTogglePanel2-sample</module>
+ <module>panelmenu-sample</module>
+
+ <!--module>tooltip-sample</module-->
+ </modules>
</project>
\ No newline at end of file
Modified: trunk/sandbox/samples/simpleTogglePanel2-sample/pom.xml
===================================================================
--- trunk/sandbox/samples/simpleTogglePanel2-sample/pom.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/samples/simpleTogglePanel2-sample/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,7 +1,7 @@
<?xml version="1.0"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>richfaces-samples</artifactId>
- <groupId>org.richfaces</groupId>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -14,15 +14,10 @@
</build>
<dependencies>
<dependency>
- <groupId>org.richfaces</groupId>
+ <groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>simpleTogglePanel2</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>common</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>skins</artifactId>
Modified: trunk/sandbox/ui/calendar/pom.xml
===================================================================
--- trunk/sandbox/ui/calendar/pom.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/calendar/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -2,11 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>ui</artifactId>
- <groupId>org.richfaces</groupId>
+ <groupId>org.richfaces.sandbox</groupId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
+ <groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>calendar</artifactId>
<name>Calendar</name>
<build>
@@ -44,9 +44,9 @@
</build>
<dependencies>
<dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>common</artifactId>
- <version>3.1.0-SNAPSHOT</version>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>impl</artifactId>
+ <version>${project.version}</version>
</dependency>
</dependencies>
</project>
Modified: trunk/sandbox/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/sandbox/ui/calendar/src/main/config/component/calendar.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/calendar/src/main/config/component/calendar.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -18,7 +18,7 @@
<name>calendar</name>
<classname>org.richfaces.taglib.CalendarTag</classname>
<superclass>
- org.ajax4jsf.framework.taglib.HtmlComponentTagBase
+ org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
</superclass>
</tag>
<!--
Modified: trunk/sandbox/ui/panel2/pom.xml
===================================================================
--- trunk/sandbox/ui/panel2/pom.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panel2/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>sandbox-parent</artifactId>
- <groupId>org.richfaces</groupId>
- <version>1.0.0-SNAPSHOT</version>
+ <artifactId>ui</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
+ <version>3.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
+ <groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>panel2</artifactId>
<name>Panel2</name>
<build>
@@ -44,9 +44,9 @@
</build>
<dependencies>
<dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>common</artifactId>
- <version>3.1.0-SNAPSHOT</version>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>impl</artifactId>
+ <version>${project.version}</version>
</dependency>
</dependencies>
</project>
Modified: trunk/sandbox/ui/panel2/src/main/config/component/panel2.xml
===================================================================
--- trunk/sandbox/ui/panel2/src/main/config/component/panel2.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panel2/src/main/config/component/panel2.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -23,7 +23,7 @@
<name>panel2</name>
<classname>org.richfaces.taglib.Panel2Tag</classname>
<superclass>
- org.ajax4jsf.framework.taglib.HtmlComponentTagBase
+ org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
</superclass>
<test>
<classname>org.richfaces.taglib.HtmlPanel2TagTest</classname>
Modified: trunk/sandbox/ui/panel2/src/main/templates/panel2.jspx
===================================================================
--- trunk/sandbox/ui/panel2/src/main/templates/panel2.jspx 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panel2/src/main/templates/panel2.jspx 2007-07-13 16:42:27 UTC (rev 1622)
@@ -6,7 +6,7 @@
xmlns:x=" http://jsf.exadel.com/vcp"
xmlns:u="http://jsf.exadel.com/util"
xmlns:h="http://jsf.exadel.com/header"
- baseclass="org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase"
+ baseclass="org.ajax4jsf.renderkit.HeaderResourcesRendererBase"
class="org.richfaces.renderkit.html.Panel2Renderer">
<f:clientid var="clientId"/>
Modified: trunk/sandbox/ui/panelmenu/pom.xml
===================================================================
--- trunk/sandbox/ui/panelmenu/pom.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,51 +1,50 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <artifactId>ui</artifactId>
- <groupId>org.richfaces</groupId>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>ui</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
<version>3.1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
- <artifactId>panelmenu</artifactId>
- <name>Panel menu</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.richfaces.cdk</groupId>
- <artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>generate-test-sources</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>generate-tests</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <library>
- <prefix>org.richfaces</prefix>
- <taglib>
- <shortName>panelmenu</shortName>
- </taglib>
- </library>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>common</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.sandbox.ui</groupId>
+ <artifactId>panelmenu</artifactId>
+ <name>Panel menu</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>generate-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>generate-tests</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces</prefix>
+ <taglib>
+ <shortName>panelmenu</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
Modified: trunk/sandbox/ui/panelmenu/src/main/config/component/panelMenu.xml
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/config/component/panelMenu.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/config/component/panelMenu.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,257 +1,257 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
-<components>
- <component>
- <name>org.richfaces.PanelMenu</name>
- <family>org.richfaces.PanelMenu</family>
- <description>Defines the menu on the page and the set of the child elements properties in layout.</description>
- <superclass>org.richfaces.component.UIPanelMenu</superclass>
- <classname>org.richfaces.component.html.HtmlPanelMenu</classname>
- <renderer generate="true" override="true">
- <name>org.richfaces.PanelMenuRenderer</name>
- <template>org/richfaces/htmlPanelMenu.jspx</template>
- </renderer>
- <tag>
- <name>panelMenu</name>
- <classname>org.richfaces.taglib.PanelMenuTag</classname>
- <superclass>org.ajax4jsf.framework.taglib.HtmlComponentTagBase</superclass>
- </tag>
- <property>
- <name>event</name>
- <classname>java.lang.String</classname>
- <description>
- Defines the event on the representation element that
- triggers the submenu's expand/collapse. (default=onclick)
- </description>
- <defaultvalue><![CDATA["onclick"]]></defaultvalue>
- </property>
- <property>
- <name>mode</name>
- <classname>java.lang.String</classname>
- <description>
- Set the submission mode for all panel menu items on the panel
- menu except ones where this attribute redefined. (ajax, server,(Default), none)
- </description>
- <defaultvalue><![CDATA["server"]]></defaultvalue>
- </property>
- <property>
- <name>width</name>
- <classname>java.lang.String</classname>
- <description>Set minimal width for the menu.</description>
- <defaultvalue><![CDATA["100%"]]></defaultvalue>
- </property>
- <property>
- <name>expandMode</name>
- <classname>java.lang.String</classname>
- <description>
- Set the submission mode for all panel menu groups after
- expand/collapse except ones where this attribute redefined. (ajax, server, none(Default))
- </description>
- <defaultvalue><![CDATA["none"]]></defaultvalue>
- </property>
- <property>
- <name>expandSingle</name>
- <classname>boolean</classname>
- <description>
- Whether only one panel menu node on top level can be opened at a time.
- If the value of this attribute is true, the previously opened
- node on the top level is closed. If the value is false, the node is left opened. The default value is false.
- </description>
- <defaultvalue>false</defaultvalue>
- </property>
- <property>
- <name>iconItem</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the enabled item state</description>
- <defaultvalue><![CDATA["grid"]]></defaultvalue>
- </property>
- <property>
- <name>iconDisabledItem</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the disabled item state</description>
- <defaultvalue><![CDATA["grid"]]></defaultvalue>
- </property>
- <property>
- <name>iconTopItem</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the enabled top item state</description>
- <defaultvalue><![CDATA["grid"]]></defaultvalue>
- </property>
- <property>
- <name>iconTopDisabledItem</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the disabled top item state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconExpandedGroup</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the expanded Group state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconCollapsedGroup</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the collapsed Group state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconDisabledGroup</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the disabled group state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconExpandedTopGroup</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the expanded top group state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconCollapsedTopGroup</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the collapsed top group state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconTopDisableGroup</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the disabled top Group state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconItemPosition</name>
- <classname>java.lang.String</classname>
- <description>Position of the icon (left, right none (default) ) for the item icon</description>
- <defaultvalue><![CDATA["left"]]></defaultvalue>
- </property>
- <property>
- <name>iconItemTopPosition</name>
- <classname>java.lang.String</classname>
- <description>Position of the icon (left, right none (default) ) for the top item icon</description>
- <defaultvalue><![CDATA["left"]]></defaultvalue>
- </property>
- <property>
- <name>iconGroupPosition</name>
- <classname>java.lang.String</classname>
- <description>Position of the icon (left, right none (default) ) for the group icon</description>
- <defaultvalue><![CDATA["left"]]></defaultvalue>
- </property>
- <property>
- <name>iconGroupTopPosition</name>
- <classname>java.lang.String</classname>
- <description>Position of the icon (left, right none (default) ) for the top group icon</description>
- <defaultvalue><![CDATA["left"]]></defaultvalue>
- </property>
- <property>
- <name>style</name>
- <classname>java.lang.String</classname>
- <description>The CSS style for the panel menu.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>styleClass</name>
- <classname>java.lang.String</classname>
- <description>The CSS class for the panel menu.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>groupStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>groupClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>topGroupStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>topGroupClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>itemStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>itemClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>topItemStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>topItemClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabledItemClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA["dr-pmenu-disabled-element rich-pmenu-disabled-element"]]></defaultvalue>
- </property>
- <property>
- <name>disabledItemStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabledGroupClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA["dr-pmenu-disabled-element rich-pmenu-disabled-element"]]></defaultvalue>
- </property>
- <property>
- <name>disabledGroupStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>hoveredItemClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA["dr-pmenu-hovered-element rich-pmenu-hovered-element"]]></defaultvalue>
- </property>
- <property>
- <name>hoveredItemStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>hoveredGroupStyle</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>hoveredGroupClass</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA["dr-pmenu-hovered-element rich-pmenu-hovered-element"]]></defaultvalue>
- </property>
- &ui_component_attributes;
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN" "https://ajax4jsf.dev.java.net/nonav/dtds/component-config.dtd" >
+<components>
+ <component>
+ <name>org.richfaces.PanelMenu</name>
+ <family>org.richfaces.PanelMenu</family>
+ <description>Defines the menu on the page and the set of the child elements properties in layout.</description>
+ <superclass>org.richfaces.component.UIPanelMenu</superclass>
+ <classname>org.richfaces.component.html.HtmlPanelMenu</classname>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.PanelMenuRenderer</name>
+ <template>org/richfaces/htmlPanelMenu.jspx</template>
+ </renderer>
+ <tag>
+ <name>panelMenu</name>
+ <classname>org.richfaces.taglib.PanelMenuTag</classname>
+ <superclass>org.ajax4jsf.webapp.taglib.HtmlComponentTagBase</superclass>
+ </tag>
+ <property>
+ <name>event</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Defines the event on the representation element that
+ triggers the submenu's expand/collapse. (default=onclick)
+ </description>
+ <defaultvalue><![CDATA["onclick"]]></defaultvalue>
+ </property>
+ <property>
+ <name>mode</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Set the submission mode for all panel menu items on the panel
+ menu except ones where this attribute redefined. (ajax, server,(Default), none)
+ </description>
+ <defaultvalue><![CDATA["server"]]></defaultvalue>
+ </property>
+ <property>
+ <name>width</name>
+ <classname>java.lang.String</classname>
+ <description>Set minimal width for the menu.</description>
+ <defaultvalue><![CDATA["100%"]]></defaultvalue>
+ </property>
+ <property>
+ <name>expandMode</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Set the submission mode for all panel menu groups after
+ expand/collapse except ones where this attribute redefined. (ajax, server, none(Default))
+ </description>
+ <defaultvalue><![CDATA["none"]]></defaultvalue>
+ </property>
+ <property>
+ <name>expandSingle</name>
+ <classname>boolean</classname>
+ <description>
+ Whether only one panel menu node on top level can be opened at a time.
+ If the value of this attribute is true, the previously opened
+ node on the top level is closed. If the value is false, the node is left opened. The default value is false.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>iconItem</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the enabled item state</description>
+ <defaultvalue><![CDATA["grid"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconDisabledItem</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled item state</description>
+ <defaultvalue><![CDATA["grid"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconTopItem</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the enabled top item state</description>
+ <defaultvalue><![CDATA["grid"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconTopDisabledItem</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled top item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconExpandedGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the expanded Group state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconCollapsedGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the collapsed Group state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconDisabledGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled group state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconExpandedTopGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the expanded top group state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconCollapsedTopGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the collapsed top group state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconTopDisableGroup</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled top Group state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconItemPosition</name>
+ <classname>java.lang.String</classname>
+ <description>Position of the icon (left, right none (default) ) for the item icon</description>
+ <defaultvalue><![CDATA["left"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconItemTopPosition</name>
+ <classname>java.lang.String</classname>
+ <description>Position of the icon (left, right none (default) ) for the top item icon</description>
+ <defaultvalue><![CDATA["left"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconGroupPosition</name>
+ <classname>java.lang.String</classname>
+ <description>Position of the icon (left, right none (default) ) for the group icon</description>
+ <defaultvalue><![CDATA["left"]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconGroupTopPosition</name>
+ <classname>java.lang.String</classname>
+ <description>Position of the icon (left, right none (default) ) for the top group icon</description>
+ <defaultvalue><![CDATA["left"]]></defaultvalue>
+ </property>
+ <property>
+ <name>style</name>
+ <classname>java.lang.String</classname>
+ <description>The CSS style for the panel menu.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>styleClass</name>
+ <classname>java.lang.String</classname>
+ <description>The CSS class for the panel menu.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>groupStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>groupClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topGroupStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topGroupClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>itemStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>itemClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topItemStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>topItemClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledItemClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA["dr-pmenu-disabled-element rich-pmenu-disabled-element"]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledItemStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledGroupClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA["dr-pmenu-disabled-element rich-pmenu-disabled-element"]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledGroupStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoveredItemClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA["dr-pmenu-hovered-element rich-pmenu-hovered-element"]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoveredItemStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoveredGroupStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoveredGroupClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA["dr-pmenu-hovered-element rich-pmenu-hovered-element"]]></defaultvalue>
+ </property>
+ &ui_component_attributes;
&html_events;
<property>
@@ -286,290 +286,290 @@
</property>
-
- <property>
- <name>onitemhover</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>ongroupcollapse</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>ongroupexpand</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabled</name>
- <classname>boolean</classname>
- <description>
- If true sets state of the item to disabled state. false is default.
- </description>
- <defaultvalue>false</defaultvalue>
- </property>
- </component>
-
- <component>
- <name>org.richfaces.PanelMenuGroup</name>
- <family>org.richfaces.PanelMenuGroup</family>
- <description>Defines expandable group of items inside the panel menu or other group.</description>
- <superclass>org.richfaces.component.UIPanelMenuGroup</superclass>
- <classname>org.richfaces.component.html.HtmlPanelMenuGroup</classname>
- <renderer generate="true" override="true">
- <name>org.richfaces.PanelMenuGroupRenderer</name>
- <template>org/richfaces/htmlPanelMenuGroup.jspx</template>
- </renderer>
- <tag>
- <name>panelMenuGroup</name>
- <classname>org.richfaces.taglib.PanelMenuGroupTag</classname>
- <superclass>org.ajax4jsf.framework.taglib.HtmlComponentTagBase</superclass>
- </tag>
- <property>
- <name>mode</name>
- <classname>java.lang.String</classname>
- <description>
- Set the submission mode for all panel menu groups after expand/collapse
- except ones where this attribute redefined. (ajax, server, none(Default))
- </description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconExpanded</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the expanded item state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconCollapsed</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the collapsed item state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
+
+ <property>
+ <name>onitemhover</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
+ <property>
+ <name>ongroupcollapse</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>ongroupexpand</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>
+ If true sets state of the item to disabled state. false is default.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ </component>
+
+ <component>
+ <name>org.richfaces.PanelMenuGroup</name>
+ <family>org.richfaces.PanelMenuGroup</family>
+ <description>Defines expandable group of items inside the panel menu or other group.</description>
+ <superclass>org.richfaces.component.UIPanelMenuGroup</superclass>
+ <classname>org.richfaces.component.html.HtmlPanelMenuGroup</classname>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.PanelMenuGroupRenderer</name>
+ <template>org/richfaces/htmlPanelMenuGroup.jspx</template>
+ </renderer>
+ <tag>
+ <name>panelMenuGroup</name>
+ <classname>org.richfaces.taglib.PanelMenuGroupTag</classname>
+ <superclass>org.ajax4jsf.webapp.taglib.HtmlComponentTagBase</superclass>
+ </tag>
<property>
+ <name>mode</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Set the submission mode for all panel menu groups after expand/collapse
+ except ones where this attribute redefined. (ajax, server, none(Default))
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconExpanded</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the expanded item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconCollapsed</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the collapsed item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
<name>expanded</name>
<classname>boolean</classname>
<description>If “true” group will be displayed expanded initially.</description>
<defaultvalue>false</defaultvalue>
</property>
- <property>
- <name>iconDisabled</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the disabled item state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabled</name>
- <classname>boolean</classname>
- <description>
- If “true” sets state of the item to disabled state. “false” is default.
- </description>
- <defaultvalue>false</defaultvalue>
- </property>
- <!--property>
- <name>value</name>
- <classname>java.lang.Object</classname>
- <description>Defines representation text for menuItem.</description>
- </property-->
- &listeners;
- <!--property>
- <name>action</name>
- <classname>java.lang.String</classname>
- <description>The action method binding expression.</description>
- </property-->
- <property>
- <name>target</name>
- <classname>java.lang.String</classname>
- <description>Target frame for action to execute.</description>
- </property>
- <property>
- <name>immediate</name>
- <classname>boolean</classname>
- <description>A flag indicating that this component value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until a Process Validations phase.
- </description>
- </property>
- &ui_component_attributes;
- &html_input_attributes;
- &html_input_events;
- &ui_input_attributes;
- &html_events;
- <property>
- <name>oncollapse</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>onexpand</name>
- <classname>java.lang.String</classname>
- <description></description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>hoverClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to hovered items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>hoverStyle</name>
- <classname>java.lang.String</classname>
- <description>CSS style rules to be applied to hovered items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabledClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to disabled items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabledStyle</name>
- <classname>java.lang.String</classname>
- <description>CSS style rules to be applied to disabled items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>styleClass</name>
- <classname>java.lang.String</classname>
- <description>Corresponds to the HTML class attribute.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>style</name>
- <classname>java.lang.String</classname>
- <description>CSS style(s) to be applied when this component is rendered.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to icon element.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconStyle</name>
- <classname>java.lang.String</classname>
- <description>CSS style rules to be applied</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
+ <property>
+ <name>iconDisabled</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>
+ If “true” sets state of the item to disabled state. “false” is default.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <!--property>
+ <name>value</name>
+ <classname>java.lang.Object</classname>
+ <description>Defines representation text for menuItem.</description>
+ </property-->
+ &listeners;
+ <!--property>
+ <name>action</name>
+ <classname>java.lang.String</classname>
+ <description>The action method binding expression.</description>
+ </property-->
+ <property>
+ <name>target</name>
+ <classname>java.lang.String</classname>
+ <description>Target frame for action to execute.</description>
+ </property>
+ <property>
+ <name>immediate</name>
+ <classname>boolean</classname>
+ <description>A flag indicating that this component value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until a Process Validations phase.
+ </description>
+ </property>
+ &ui_component_attributes;
+ &html_input_attributes;
+ &html_input_events;
+ &ui_input_attributes;
+ &html_events;
+ <property>
+ <name>oncollapse</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>onexpand</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoverClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to hovered items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoverStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied to hovered items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to disabled items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied to disabled items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>styleClass</name>
+ <classname>java.lang.String</classname>
+ <description>Corresponds to the HTML class attribute.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>style</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style(s) to be applied when this component is rendered.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to icon element.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
<name>label</name>
<classname>java.lang.String</classname>
<description>Displayed node's text</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
- </component>
-
- <component>
- <name>org.richfaces.PanelMenuItem</name>
- <family>org.richfaces.PanelMenuItem</family>
- <description>Defines single Item inside popup list.</description>
- <superclass>org.richfaces.component.UIPanelMenuItem</superclass>
- <classname>org.richfaces.component.html.HtmlPanelMenuItem</classname>
- <renderer generate="true" override="true">
- <name>org.richfaces.PanelMenuItemRenderer</name>
- <template>org/richfaces/htmlPanelMenuItem.jspx</template>
- </renderer>
- <tag>
- <name>panelMenuItem</name>
- <classname>org.richfaces.taglib.PanelMenuItemTag</classname>
- <superclass>org.ajax4jsf.framework.taglib.HtmlComponentTagBase</superclass>
- </tag>
- <property>
- <name>mode</name>
- <classname>java.lang.String</classname>
- <description>
- Set the submission mode (ajax,server(Default),none)
- </description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>icon</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon or the default one name to be displayed for the enabled item state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconDisabled</name>
- <classname>java.lang.String</classname>
- <description>Path to the icon to be displayed for the disabled item state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabled</name>
- <classname>boolean</classname>
- <description>
- If “true” sets state of the item to disabled state. “false” is default.
- </description>
- <defaultvalue>false</defaultvalue>
- </property>
- <property>
- <name>value</name>
- <classname>java.lang.Object</classname>
- <description>Defines representation text for menuItem.</description>
- </property>
- <property>
- <name>hoverClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to hovered items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>hoverStyle</name>
- <classname>java.lang.String</classname>
- <description>CSS style rules to be applied to hovered items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabledClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to disabled items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>disabledStyle</name>
- <classname>java.lang.String</classname>
- <description>CSS style rules to be applied to disabled items.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>styleClass</name>
- <classname>java.lang.String</classname>
- <description>Corresponds to the HTML class attribute.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>style</name>
- <classname>java.lang.String</classname>
- <description>CSS style(s) to be applied when this component is rendered.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconClass</name>
- <classname>java.lang.String</classname>
- <description>Class to be applied to icon element.</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- <property>
- <name>iconStyle</name>
- <classname>java.lang.String</classname>
- <description>CSS style rules to be applied</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
- </property>
- &ui_component_attributes;
- &ui_command_attributes;
- &html_style_attributes;
- &html_events;
- <property>
- <name>target</name>
- <classname>java.lang.String</classname>
- <description>Target frame for action to execute.</description>
- </property>
- </component>
+ </component>
+
+ <component>
+ <name>org.richfaces.PanelMenuItem</name>
+ <family>org.richfaces.PanelMenuItem</family>
+ <description>Defines single Item inside popup list.</description>
+ <superclass>org.richfaces.component.UIPanelMenuItem</superclass>
+ <classname>org.richfaces.component.html.HtmlPanelMenuItem</classname>
+ <renderer generate="true" override="true">
+ <name>org.richfaces.PanelMenuItemRenderer</name>
+ <template>org/richfaces/htmlPanelMenuItem.jspx</template>
+ </renderer>
+ <tag>
+ <name>panelMenuItem</name>
+ <classname>org.richfaces.taglib.PanelMenuItemTag</classname>
+ <superclass>org.ajax4jsf.webapp.taglib.HtmlComponentTagBase</superclass>
+ </tag>
+ <property>
+ <name>mode</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Set the submission mode (ajax,server(Default),none)
+ </description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>icon</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon or the default one name to be displayed for the enabled item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconDisabled</name>
+ <classname>java.lang.String</classname>
+ <description>Path to the icon to be displayed for the disabled item state</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>
+ If “true” sets state of the item to disabled state. “false” is default.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
+ <property>
+ <name>value</name>
+ <classname>java.lang.Object</classname>
+ <description>Defines representation text for menuItem.</description>
+ </property>
+ <property>
+ <name>hoverClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to hovered items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>hoverStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied to hovered items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to disabled items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>disabledStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied to disabled items.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>styleClass</name>
+ <classname>java.lang.String</classname>
+ <description>Corresponds to the HTML class attribute.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>style</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style(s) to be applied when this component is rendered.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconClass</name>
+ <classname>java.lang.String</classname>
+ <description>Class to be applied to icon element.</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>iconStyle</name>
+ <classname>java.lang.String</classname>
+ <description>CSS style rules to be applied</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ &ui_component_attributes;
+ &ui_command_attributes;
+ &html_style_attributes;
+ &html_events;
+ <property>
+ <name>target</name>
+ <classname>java.lang.String</classname>
+ <description>Target frame for action to execute.</description>
+ </property>
+ </component>
</components>
\ No newline at end of file
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRendererBase.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -30,8 +30,8 @@
import javax.faces.context.ResponseWriter;
import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
import org.ajax4jsf.renderkit.compiler.TemplateContext;
-import org.ajax4jsf.framework.skin.Skin;
-import org.ajax4jsf.framework.util.style.CSSFormat;
+import org.richfaces.skin.Skin;
+import org.ajax4jsf.util.style.CSSFormat;
import org.richfaces.component.UIPanelMenu;
import org.richfaces.component.UIPanelMenuGroup;
import org.richfaces.component.UIPanelMenuItem;
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,280 +1,280 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html;
-
-import java.io.IOException;
-import java.util.Map;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import javax.faces.convert.ConverterException;
-import javax.faces.event.ActionEvent;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
-import org.richfaces.component.UIPanelMenu;
-import org.richfaces.component.UIPanelMenuGroup;
-import org.richfaces.component.UISwitchablePanel;
-import org.richfaces.renderkit.PanelMenuRendererBase;
-
-public class PanelMenuGroupRenderer extends PanelMenuRendererBase {
-
- protected Class getComponentClass() {
- return UIPanelMenuGroup.class;
- }
-
- protected void doDecode(FacesContext context, UIComponent component) {
- String clientId = component.getClientId(context);
- Map requestMap =context.getExternalContext().getRequestParameterMap();
- UIPanelMenuGroup group = ((UIPanelMenuGroup)component);
-
- if(requestMap.containsKey("panelMenuState"+clientId)){
- Object property = requestMap.get("panelMenuState"+clientId);
- if (property.equals("opened")) {
- group.setSubmittedValue("true");
- } else if (property.equals("closed")) {
- group.setSubmittedValue("false");
- }
-
- }
- if(isSubmitted(context, component)){
- new ActionEvent(component).queue();
- if (UISwitchablePanel.AJAX_METHOD.equals(getItemMode(component))) {
- new AjaxEvent(component).queue();
- }
- }
- }
-
- public void insertImage(FacesContext context, UIComponent component, Object data)
- throws IOException {
-
- String from = (String)data;
- String align = "";
-
- UIPanelMenu panelMenu = findMenu(component);
- boolean isTopLevel = isTopLevel(component);
-
- if (isTopLevel){
- align = panelMenu.getIconGroupTopPosition();
- } else {
- align = panelMenu.getIconGroupPosition();
- }
-
- if (align.equalsIgnoreCase(from)){
- image(context,component, from + "Icon" + component.getClientId(context));
- } else {
- String iconType = PANEL_MENU_SPACER_ICON_NAME;
- String imageSrc = getIconByType(iconType, isTopLevel, context, component);
- drawIcon(context.getResponseWriter(), iconType, imageSrc, component, from + "Icon" + component.getClientId(context));
- }
- }
-
- private void image(FacesContext context, UIComponent component, String id )throws IOException {
- ResponseWriter writer = context.getResponseWriter();
-
- UIPanelMenu panelMenu = findMenu(component);
- if(panelMenu == null){
- return;
- }
- UIPanelMenuGroup panelMenuGroup = (UIPanelMenuGroup)component;
- boolean isTopLevel = isTopLevel(panelMenuGroup);
-
- boolean isOpened = isOpened(context,component);
-
-
- String defaultIconNodeClosed = null;
-
- if(isTopLevel){
- if(panelMenuGroup.isDisabled()){
- defaultIconNodeClosed = panelMenu.getIconTopDisableGroup();
- if(defaultIconNodeClosed == null || defaultIconNodeClosed.equals("")){
- defaultIconNodeClosed = panelMenu.getIconDisabledGroup();
- }
- } else {
- defaultIconNodeClosed = panelMenu.getIconCollapsedTopGroup();
- if(defaultIconNodeClosed == null || defaultIconNodeClosed.equals("")){
- defaultIconNodeClosed = panelMenu.getIconCollapsedGroup();
- }
- }
- } else {
- if(panelMenuGroup.isDisabled()){
- defaultIconNodeClosed = panelMenu.getIconDisabledGroup();
- } else {
- defaultIconNodeClosed = panelMenu.getIconCollapsedGroup();
- }
- }
-
- String defaultIconNodeOpened = null;
-
- if(isTopLevel){
- defaultIconNodeOpened = panelMenu.getIconExpandedTopGroup();
- if(defaultIconNodeOpened == null || defaultIconNodeOpened.equals("")){
- defaultIconNodeOpened = panelMenu.getIconExpandedGroup();
- }
- } else {
- defaultIconNodeOpened = panelMenu.getIconExpandedGroup();
- }
-
- String iconExpanded = "";
- String iconCollapsed = "";
-
- iconExpanded = panelMenuGroup.isDisabled() ? panelMenuGroup.getIconDisabled() : panelMenuGroup.getIconExpanded();
- iconCollapsed = panelMenuGroup.isDisabled() ? panelMenuGroup.getIconDisabled() : panelMenuGroup.getIconCollapsed();
-
- String icon = null;
- if(isOpened){
- if(iconExpanded != null && !iconExpanded.equals("")){
- if(iconExpanded.equals("none")){
- return;
- } else {
- icon = iconExpanded;
- }
- } else {
- icon = defaultIconNodeOpened;
- }
- } else {
- if(iconCollapsed!= null && !iconCollapsed.equals("")){
- if(iconCollapsed.equals("none")){
- return;
- } else {
- icon = iconCollapsed;
- }
- } else {
- icon = defaultIconNodeClosed;
- }
- }
-
- if ("".equals(icon))
- icon = "custom";
- String source = getIconByType(icon, isTopLevel, context, component);
- drawIcon(writer, icon, source, component, id);
- }
-
- public String getFullStyleClass(FacesContext context, UIComponent component) {
- StringBuffer classBuffer = new StringBuffer("");
- UIPanelMenuGroup group = (UIPanelMenuGroup)component;
- UIPanelMenu parentMenu = findMenu(group);
- if (!parentMenu.isDisabled() && !group.isDisabled()) {
- if (calculateLevel(group) == 0)
- classBuffer.append(parentMenu.getTopGroupClass() + " ");
- else
- classBuffer.append(parentMenu.getGroupClass() + " ");
- classBuffer.append(group.getStyleClass());
- } else
- classBuffer.append(parentMenu.getDisabledGroupClass() + " ")
- .append(group.getDisabledClass());
- return classBuffer.toString();
- }
-
- public String getFullStyle(FacesContext context, UIComponent component) {
- StringBuffer styleBuffer = new StringBuffer("");
- UIPanelMenuGroup group = (UIPanelMenuGroup)component;
- UIPanelMenu parentMenu = findMenu(group);
- if (!group.isDisabled()) {
- if (calculateLevel(group) == 0)
- styleBuffer.append(parentMenu.getTopGroupStyle() + "; ");
- else
- styleBuffer.append(parentMenu.getGroupStyle() + "; ");
- styleBuffer.append(group.getStyle());
- } else
- styleBuffer.append(parentMenu.getDisabledGroupStyle() + "; ")
- .append(group.getDisabledStyle());
- return styleBuffer.toString();
- }
-
- public void insertLabel(FacesContext context, UIComponent component) throws IOException {
- Object label = component.getAttributes().get("label");
- if (label!=null){
- context.getResponseWriter().write(label.toString());
- }
- }
-
- public Object getConvertedValue(FacesContext context,
- UIComponent component, Object submittedValue)
- throws ConverterException {
-
- UIPanelMenuGroup group = (UIPanelMenuGroup)component;
- if(group.getConverter() != null){
- return group.getConverter().getAsObject(context, component, (String)submittedValue);
- } else {
- return submittedValue;
- }
-
- }
-
- public boolean isOpened(FacesContext context, UIComponent component)throws IOException {
- UIPanelMenuGroup group = (UIPanelMenuGroup)component;
-
- Boolean value = (Boolean)group.getValue();
- if (value != null) {
- return value.booleanValue();
- } else {
- boolean isParentDisabled = isParentDisabled(component);
- if(component instanceof UIPanelMenuGroup){
- if( ((UIPanelMenuGroup)component).isExpanded() && !((UIPanelMenuGroup)component).isDisabled() && !isParentDisabled ){
- return true;
- } else {
- //check expanded attributes in children groups, if exists
- boolean isChildrenExpanded = isChildrenExpanded(component);
- return isChildrenExpanded && !isParentDisabled && !((UIPanelMenuGroup)component).isDisabled();// ? "opened" : "closed";
- }
- }
- }
- return false;
- }
-
- public String getLabelClass(FacesContext context, UIComponent component) {
- UIPanelMenuGroup group = (UIPanelMenuGroup)component;
- UIPanelMenu parentMenu = findMenu(group);
- if(!group.isDisabled() && !parentMenu.isDisabled()){
- if(isTopLevel(component)){
- return "rich-pmenu-group-self-label rich-pmenu-top-group-self-label";
- } else return "rich-pmenu-group-self-label";
- }
- return "";
- }
-
- public String getIconClass(FacesContext context, UIComponent component) {
- UIPanelMenuGroup group = (UIPanelMenuGroup)component;
- UIPanelMenu parentMenu = findMenu(group);
- if(!group.isDisabled() && !parentMenu.isDisabled()){
- if(isTopLevel(component)){
- return "rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon";
- } else return "rich-pmenu-group-self-icon";
- }
- return "";
- }
-
- public String getDivClass(FacesContext context, UIComponent component) {
- String result = "";
- if (isTopLevel(component))
- result = "dr-pmenu-group-div";
- return result;
- }
-
- public String getTableClass(FacesContext context, UIComponent component) {
- String result;
- if (isTopLevel(component))
- result = "dr-pmenu-top-group";
- else
- result = "dr-pmenu-group";
- return result;
- }
-}
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html;
+
+import java.io.IOException;
+import java.util.Map;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.convert.ConverterException;
+import javax.faces.event.ActionEvent;
+import org.ajax4jsf.event.AjaxEvent;
+import org.richfaces.component.UIPanelMenu;
+import org.richfaces.component.UIPanelMenuGroup;
+import org.richfaces.component.UISwitchablePanel;
+import org.richfaces.renderkit.PanelMenuRendererBase;
+
+public class PanelMenuGroupRenderer extends PanelMenuRendererBase {
+
+ protected Class getComponentClass() {
+ return UIPanelMenuGroup.class;
+ }
+
+ protected void doDecode(FacesContext context, UIComponent component) {
+ String clientId = component.getClientId(context);
+ Map requestMap =context.getExternalContext().getRequestParameterMap();
+ UIPanelMenuGroup group = ((UIPanelMenuGroup)component);
+
+ if(requestMap.containsKey("panelMenuState"+clientId)){
+ Object property = requestMap.get("panelMenuState"+clientId);
+ if (property.equals("opened")) {
+ group.setSubmittedValue("true");
+ } else if (property.equals("closed")) {
+ group.setSubmittedValue("false");
+ }
+
+ }
+ if(isSubmitted(context, component)){
+ new ActionEvent(component).queue();
+ if (UISwitchablePanel.AJAX_METHOD.equals(getItemMode(component))) {
+ new AjaxEvent(component).queue();
+ }
+ }
+ }
+
+ public void insertImage(FacesContext context, UIComponent component, Object data)
+ throws IOException {
+
+ String from = (String)data;
+ String align = "";
+
+ UIPanelMenu panelMenu = findMenu(component);
+ boolean isTopLevel = isTopLevel(component);
+
+ if (isTopLevel){
+ align = panelMenu.getIconGroupTopPosition();
+ } else {
+ align = panelMenu.getIconGroupPosition();
+ }
+
+ if (align.equalsIgnoreCase(from)){
+ image(context,component, from + "Icon" + component.getClientId(context));
+ } else {
+ String iconType = PANEL_MENU_SPACER_ICON_NAME;
+ String imageSrc = getIconByType(iconType, isTopLevel, context, component);
+ drawIcon(context.getResponseWriter(), iconType, imageSrc, component, from + "Icon" + component.getClientId(context));
+ }
+ }
+
+ private void image(FacesContext context, UIComponent component, String id )throws IOException {
+ ResponseWriter writer = context.getResponseWriter();
+
+ UIPanelMenu panelMenu = findMenu(component);
+ if(panelMenu == null){
+ return;
+ }
+ UIPanelMenuGroup panelMenuGroup = (UIPanelMenuGroup)component;
+ boolean isTopLevel = isTopLevel(panelMenuGroup);
+
+ boolean isOpened = isOpened(context,component);
+
+
+ String defaultIconNodeClosed = null;
+
+ if(isTopLevel){
+ if(panelMenuGroup.isDisabled()){
+ defaultIconNodeClosed = panelMenu.getIconTopDisableGroup();
+ if(defaultIconNodeClosed == null || defaultIconNodeClosed.equals("")){
+ defaultIconNodeClosed = panelMenu.getIconDisabledGroup();
+ }
+ } else {
+ defaultIconNodeClosed = panelMenu.getIconCollapsedTopGroup();
+ if(defaultIconNodeClosed == null || defaultIconNodeClosed.equals("")){
+ defaultIconNodeClosed = panelMenu.getIconCollapsedGroup();
+ }
+ }
+ } else {
+ if(panelMenuGroup.isDisabled()){
+ defaultIconNodeClosed = panelMenu.getIconDisabledGroup();
+ } else {
+ defaultIconNodeClosed = panelMenu.getIconCollapsedGroup();
+ }
+ }
+
+ String defaultIconNodeOpened = null;
+
+ if(isTopLevel){
+ defaultIconNodeOpened = panelMenu.getIconExpandedTopGroup();
+ if(defaultIconNodeOpened == null || defaultIconNodeOpened.equals("")){
+ defaultIconNodeOpened = panelMenu.getIconExpandedGroup();
+ }
+ } else {
+ defaultIconNodeOpened = panelMenu.getIconExpandedGroup();
+ }
+
+ String iconExpanded = "";
+ String iconCollapsed = "";
+
+ iconExpanded = panelMenuGroup.isDisabled() ? panelMenuGroup.getIconDisabled() : panelMenuGroup.getIconExpanded();
+ iconCollapsed = panelMenuGroup.isDisabled() ? panelMenuGroup.getIconDisabled() : panelMenuGroup.getIconCollapsed();
+
+ String icon = null;
+ if(isOpened){
+ if(iconExpanded != null && !iconExpanded.equals("")){
+ if(iconExpanded.equals("none")){
+ return;
+ } else {
+ icon = iconExpanded;
+ }
+ } else {
+ icon = defaultIconNodeOpened;
+ }
+ } else {
+ if(iconCollapsed!= null && !iconCollapsed.equals("")){
+ if(iconCollapsed.equals("none")){
+ return;
+ } else {
+ icon = iconCollapsed;
+ }
+ } else {
+ icon = defaultIconNodeClosed;
+ }
+ }
+
+ if ("".equals(icon))
+ icon = "custom";
+ String source = getIconByType(icon, isTopLevel, context, component);
+ drawIcon(writer, icon, source, component, id);
+ }
+
+ public String getFullStyleClass(FacesContext context, UIComponent component) {
+ StringBuffer classBuffer = new StringBuffer("");
+ UIPanelMenuGroup group = (UIPanelMenuGroup)component;
+ UIPanelMenu parentMenu = findMenu(group);
+ if (!parentMenu.isDisabled() && !group.isDisabled()) {
+ if (calculateLevel(group) == 0)
+ classBuffer.append(parentMenu.getTopGroupClass() + " ");
+ else
+ classBuffer.append(parentMenu.getGroupClass() + " ");
+ classBuffer.append(group.getStyleClass());
+ } else
+ classBuffer.append(parentMenu.getDisabledGroupClass() + " ")
+ .append(group.getDisabledClass());
+ return classBuffer.toString();
+ }
+
+ public String getFullStyle(FacesContext context, UIComponent component) {
+ StringBuffer styleBuffer = new StringBuffer("");
+ UIPanelMenuGroup group = (UIPanelMenuGroup)component;
+ UIPanelMenu parentMenu = findMenu(group);
+ if (!group.isDisabled()) {
+ if (calculateLevel(group) == 0)
+ styleBuffer.append(parentMenu.getTopGroupStyle() + "; ");
+ else
+ styleBuffer.append(parentMenu.getGroupStyle() + "; ");
+ styleBuffer.append(group.getStyle());
+ } else
+ styleBuffer.append(parentMenu.getDisabledGroupStyle() + "; ")
+ .append(group.getDisabledStyle());
+ return styleBuffer.toString();
+ }
+
+ public void insertLabel(FacesContext context, UIComponent component) throws IOException {
+ Object label = component.getAttributes().get("label");
+ if (label!=null){
+ context.getResponseWriter().write(label.toString());
+ }
+ }
+
+ public Object getConvertedValue(FacesContext context,
+ UIComponent component, Object submittedValue)
+ throws ConverterException {
+
+ UIPanelMenuGroup group = (UIPanelMenuGroup)component;
+ if(group.getConverter() != null){
+ return group.getConverter().getAsObject(context, component, (String)submittedValue);
+ } else {
+ return submittedValue;
+ }
+
+ }
+
+ public boolean isOpened(FacesContext context, UIComponent component)throws IOException {
+ UIPanelMenuGroup group = (UIPanelMenuGroup)component;
+
+ Boolean value = (Boolean)group.getValue();
+ if (value != null) {
+ return value.booleanValue();
+ } else {
+ boolean isParentDisabled = isParentDisabled(component);
+ if(component instanceof UIPanelMenuGroup){
+ if( ((UIPanelMenuGroup)component).isExpanded() && !((UIPanelMenuGroup)component).isDisabled() && !isParentDisabled ){
+ return true;
+ } else {
+ //check expanded attributes in children groups, if exists
+ boolean isChildrenExpanded = isChildrenExpanded(component);
+ return isChildrenExpanded && !isParentDisabled && !((UIPanelMenuGroup)component).isDisabled();// ? "opened" : "closed";
+ }
+ }
+ }
+ return false;
+ }
+
+ public String getLabelClass(FacesContext context, UIComponent component) {
+ UIPanelMenuGroup group = (UIPanelMenuGroup)component;
+ UIPanelMenu parentMenu = findMenu(group);
+ if(!group.isDisabled() && !parentMenu.isDisabled()){
+ if(isTopLevel(component)){
+ return "rich-pmenu-group-self-label rich-pmenu-top-group-self-label";
+ } else return "rich-pmenu-group-self-label";
+ }
+ return "";
+ }
+
+ public String getIconClass(FacesContext context, UIComponent component) {
+ UIPanelMenuGroup group = (UIPanelMenuGroup)component;
+ UIPanelMenu parentMenu = findMenu(group);
+ if(!group.isDisabled() && !parentMenu.isDisabled()){
+ if(isTopLevel(component)){
+ return "rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon";
+ } else return "rich-pmenu-group-self-icon";
+ }
+ return "";
+ }
+
+ public String getDivClass(FacesContext context, UIComponent component) {
+ String result = "";
+ if (isTopLevel(component))
+ result = "dr-pmenu-group-div";
+ return result;
+ }
+
+ public String getTableClass(FacesContext context, UIComponent component) {
+ String result;
+ if (isTopLevel(component))
+ result = "dr-pmenu-top-group";
+ else
+ result = "dr-pmenu-group";
+ return result;
+ }
+}
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,192 +1,192 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html;
-
-import java.io.IOException;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import javax.faces.event.ActionEvent;
-
-import org.ajax4jsf.framework.ajax.AjaxEvent;
-import org.richfaces.component.UIPanelMenu;
-import org.richfaces.component.UIPanelMenuItem;
-import org.richfaces.renderkit.PanelMenuRendererBase;
-
-public class PanelMenuItemRenderer extends PanelMenuRendererBase {
- protected Class getComponentClass() {
- return UIPanelMenuItem.class;
- }
-
- protected void doEncodeBegin(ResponseWriter writer, FacesContext context,UIComponent component) throws IOException {
-
- }
- protected void doDecode(FacesContext context, UIComponent component) {
- if(isSubmitted(context, component)) {
- new ActionEvent(component).queue();
- if ("ajax".equals(getItemMode(component))) {
- new AjaxEvent(component).queue();
- } else {
-
- }
- }
- }
-
- protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
-
- }
-
- /*
- public String getOnClick(FacesContext context, UIComponent component) {
- String clientId = component.getClientId(context);
- return ";PanelMenuStorage['" + clientId + "'].trigger(event);";
- }
- */
- public void insertImage(FacesContext context, UIComponent component, Object data) throws IOException {
- String from = (String)data;
- UIPanelMenu panelMenu = findMenu(component);
- if(panelMenu == null){
- return;
- }
- String align = "";
- UIPanelMenuItem panelMenuItem = (UIPanelMenuItem)component;
- boolean isTopLevel = isTopLevel(panelMenuItem);
-
- if (isTopLevel){
- align = panelMenu.getIconItemTopPosition();
- } else {
- align = panelMenu.getIconItemPosition();
- }
-
- if (align.equalsIgnoreCase(from)){
- image(context,component, from);
- } else {
- String iconType = PANEL_MENU_SPACER_ICON_NAME;
- String imageSrc = getIconByType(iconType, isTopLevel, context, component);
- drawIcon(context.getResponseWriter(), iconType, imageSrc, component, from + "Icon" + component.getClientId(context));
- }
- }
-
- private void image(FacesContext context, UIComponent component, String from)
- throws IOException{
-
- UIPanelMenu panelMenu = findMenu(component);
- ResponseWriter writer = context.getResponseWriter();
- boolean isTopLevel = isTopLevel(component);
- String source = null;
- String iconType = null;
- UIPanelMenuItem item = (UIPanelMenuItem)component;
-
- String defaultItemIcon = null;
- String customItemIcon = null;
-
- if(isTopLevel){
- if(item.isDisabled()){
- defaultItemIcon = panelMenu.getIconTopDisabledItem();
- } else {
- defaultItemIcon = panelMenu.getIconTopItem();
- }
- if(defaultItemIcon == null || defaultItemIcon.equals("")){
- if(item.isDisabled()){
- defaultItemIcon = panelMenu.getIconDisabledItem();
- } else {
- defaultItemIcon = panelMenu.getIconItem();
- }
- }
- } else {
- //isTopLevel == false
- if(defaultItemIcon == null || defaultItemIcon.equals("")){
- if(item.isDisabled()){
- defaultItemIcon = panelMenu.getIconDisabledItem();
- } else {
- defaultItemIcon = panelMenu.getIconItem();
- }
- }
- }
-
- customItemIcon = item.isDisabled() ? item.getIconDisabled() : item.getIcon();
-
- if(customItemIcon == null || customItemIcon.equals("")){
- iconType = defaultItemIcon;
- } else iconType = customItemIcon;
-
- source = getIconByType(iconType, isTopLevel, context, component);
- drawIcon(writer, iconType, source, component, from + "Icon" + component.getClientId(context));
- }
-
-
- public String getFullStyleClass(FacesContext context, UIComponent component) {
- StringBuffer classBuffer = new StringBuffer("");
- UIPanelMenuItem item = (UIPanelMenuItem)component;
- UIPanelMenu parentMenu = findMenu(item);
- if (!parentMenu.isDisabled() && !item.isDisabled()) {
- if (calculateLevel(item) == 0) {
- classBuffer.append(parentMenu.getTopItemClass()).append(" ");
- classBuffer.append("rich-pmenu-top-item ");
- } else
- classBuffer.append(parentMenu.getItemClass() + " ");
- classBuffer.append(item.getStyleClass());
- } else
- classBuffer.append(parentMenu.getDisabledItemClass() + " ")
- .append(item.getDisabledClass());
- return classBuffer.toString();
- }
-
- public String getFullStyle(FacesContext context, UIComponent component) {
- StringBuffer styleBuffer = new StringBuffer("");
- UIPanelMenuItem item = (UIPanelMenuItem)component;
- UIPanelMenu parentMenu = findMenu(item);
- if (!item.isDisabled()) {
- if (calculateLevel(item) == 0)
- styleBuffer.append(parentMenu.getTopItemStyle() + "; ");
- else
- styleBuffer.append(parentMenu.getItemStyle() + "; ");
- styleBuffer.append(item.getStyle());
- } else
- styleBuffer.append(parentMenu.getDisabledItemStyle() + "; ")
- .append(item.getDisabledStyle());
- return styleBuffer.toString();
- }
-
- public String getLabelClass(FacesContext context, UIComponent component) {
- UIPanelMenuItem item = (UIPanelMenuItem)component;
- UIPanelMenu parentMenu = findMenu(item);
- if(!item.isDisabled() && !parentMenu.isDisabled()){
- if(isTopLevel(component)){
- return "rich-pmenu-item-label rich-pmenu-top-item-label";
- } else return "rich-pmenu-item-label";
- }
- return "";
- }
-
- public String getIconClass(FacesContext context, UIComponent component) {
- UIPanelMenuItem item = (UIPanelMenuItem)component;
- UIPanelMenu parentMenu = findMenu(item);
- if(!item.isDisabled() && !parentMenu.isDisabled()){
- if(isTopLevel(component)){
- return "rich-pmenu-item-icon rich-pmenu-top-item-icon";
- } else return "rich-pmenu-item-icon";
- }
- return "";
- }
-}
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.event.ActionEvent;
+
+import org.ajax4jsf.event.AjaxEvent;
+import org.richfaces.component.UIPanelMenu;
+import org.richfaces.component.UIPanelMenuItem;
+import org.richfaces.renderkit.PanelMenuRendererBase;
+
+public class PanelMenuItemRenderer extends PanelMenuRendererBase {
+ protected Class getComponentClass() {
+ return UIPanelMenuItem.class;
+ }
+
+ protected void doEncodeBegin(ResponseWriter writer, FacesContext context,UIComponent component) throws IOException {
+
+ }
+ protected void doDecode(FacesContext context, UIComponent component) {
+ if(isSubmitted(context, component)) {
+ new ActionEvent(component).queue();
+ if ("ajax".equals(getItemMode(component))) {
+ new AjaxEvent(component).queue();
+ } else {
+
+ }
+ }
+ }
+
+ protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+
+ }
+
+ /*
+ public String getOnClick(FacesContext context, UIComponent component) {
+ String clientId = component.getClientId(context);
+ return ";PanelMenuStorage['" + clientId + "'].trigger(event);";
+ }
+ */
+ public void insertImage(FacesContext context, UIComponent component, Object data) throws IOException {
+ String from = (String)data;
+ UIPanelMenu panelMenu = findMenu(component);
+ if(panelMenu == null){
+ return;
+ }
+ String align = "";
+ UIPanelMenuItem panelMenuItem = (UIPanelMenuItem)component;
+ boolean isTopLevel = isTopLevel(panelMenuItem);
+
+ if (isTopLevel){
+ align = panelMenu.getIconItemTopPosition();
+ } else {
+ align = panelMenu.getIconItemPosition();
+ }
+
+ if (align.equalsIgnoreCase(from)){
+ image(context,component, from);
+ } else {
+ String iconType = PANEL_MENU_SPACER_ICON_NAME;
+ String imageSrc = getIconByType(iconType, isTopLevel, context, component);
+ drawIcon(context.getResponseWriter(), iconType, imageSrc, component, from + "Icon" + component.getClientId(context));
+ }
+ }
+
+ private void image(FacesContext context, UIComponent component, String from)
+ throws IOException{
+
+ UIPanelMenu panelMenu = findMenu(component);
+ ResponseWriter writer = context.getResponseWriter();
+ boolean isTopLevel = isTopLevel(component);
+ String source = null;
+ String iconType = null;
+ UIPanelMenuItem item = (UIPanelMenuItem)component;
+
+ String defaultItemIcon = null;
+ String customItemIcon = null;
+
+ if(isTopLevel){
+ if(item.isDisabled()){
+ defaultItemIcon = panelMenu.getIconTopDisabledItem();
+ } else {
+ defaultItemIcon = panelMenu.getIconTopItem();
+ }
+ if(defaultItemIcon == null || defaultItemIcon.equals("")){
+ if(item.isDisabled()){
+ defaultItemIcon = panelMenu.getIconDisabledItem();
+ } else {
+ defaultItemIcon = panelMenu.getIconItem();
+ }
+ }
+ } else {
+ //isTopLevel == false
+ if(defaultItemIcon == null || defaultItemIcon.equals("")){
+ if(item.isDisabled()){
+ defaultItemIcon = panelMenu.getIconDisabledItem();
+ } else {
+ defaultItemIcon = panelMenu.getIconItem();
+ }
+ }
+ }
+
+ customItemIcon = item.isDisabled() ? item.getIconDisabled() : item.getIcon();
+
+ if(customItemIcon == null || customItemIcon.equals("")){
+ iconType = defaultItemIcon;
+ } else iconType = customItemIcon;
+
+ source = getIconByType(iconType, isTopLevel, context, component);
+ drawIcon(writer, iconType, source, component, from + "Icon" + component.getClientId(context));
+ }
+
+
+ public String getFullStyleClass(FacesContext context, UIComponent component) {
+ StringBuffer classBuffer = new StringBuffer("");
+ UIPanelMenuItem item = (UIPanelMenuItem)component;
+ UIPanelMenu parentMenu = findMenu(item);
+ if (!parentMenu.isDisabled() && !item.isDisabled()) {
+ if (calculateLevel(item) == 0) {
+ classBuffer.append(parentMenu.getTopItemClass()).append(" ");
+ classBuffer.append("rich-pmenu-top-item ");
+ } else
+ classBuffer.append(parentMenu.getItemClass() + " ");
+ classBuffer.append(item.getStyleClass());
+ } else
+ classBuffer.append(parentMenu.getDisabledItemClass() + " ")
+ .append(item.getDisabledClass());
+ return classBuffer.toString();
+ }
+
+ public String getFullStyle(FacesContext context, UIComponent component) {
+ StringBuffer styleBuffer = new StringBuffer("");
+ UIPanelMenuItem item = (UIPanelMenuItem)component;
+ UIPanelMenu parentMenu = findMenu(item);
+ if (!item.isDisabled()) {
+ if (calculateLevel(item) == 0)
+ styleBuffer.append(parentMenu.getTopItemStyle() + "; ");
+ else
+ styleBuffer.append(parentMenu.getItemStyle() + "; ");
+ styleBuffer.append(item.getStyle());
+ } else
+ styleBuffer.append(parentMenu.getDisabledItemStyle() + "; ")
+ .append(item.getDisabledStyle());
+ return styleBuffer.toString();
+ }
+
+ public String getLabelClass(FacesContext context, UIComponent component) {
+ UIPanelMenuItem item = (UIPanelMenuItem)component;
+ UIPanelMenu parentMenu = findMenu(item);
+ if(!item.isDisabled() && !parentMenu.isDisabled()){
+ if(isTopLevel(component)){
+ return "rich-pmenu-item-label rich-pmenu-top-item-label";
+ } else return "rich-pmenu-item-label";
+ }
+ return "";
+ }
+
+ public String getIconClass(FacesContext context, UIComponent component) {
+ UIPanelMenuItem item = (UIPanelMenuItem)component;
+ UIPanelMenu parentMenu = findMenu(item);
+ if(!item.isDisabled() && !parentMenu.isDisabled()){
+ if(isTopLevel(component)){
+ return "rich-pmenu-item-icon rich-pmenu-top-item-icon";
+ } else return "rich-pmenu-item-icon";
+ }
+ return "";
+ }
+}
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,437 +1,437 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.renderkit.AjaxRendererUtils;
-import org.ajax4jsf.framework.util.javascript.JSFunction;
-import org.richfaces.component.UIPanelMenu;
-import org.richfaces.component.UIPanelMenuGroup;
-import org.richfaces.component.UIPanelMenuItem;
-import org.richfaces.renderkit.PanelMenuRendererBase;
-
-public class PanelMenuRenderer extends PanelMenuRendererBase {
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.renderkit.RendererBase#getComponentClass()
- */
- protected Class getComponentClass() {
- return UIComponent.class;
- }
-
- public void insertScript(FacesContext context, UIComponent component)
- throws IOException {
-
- StringBuffer buffer = new StringBuffer();
- StringBuffer panelMenu = new StringBuffer();
- List flatList = new LinkedList();
- Map levels = new HashMap();
-
- boolean expandSingle = ((UIPanelMenu)component).isExpandSingle();
-
- flatten(component.getChildren(), flatList, levels, 0);
-
- panelMenu
- .append("new PanelMenu('")
- .append(component.getClientId(context).toString())
- .append("',")
- .append(new Boolean(expandSingle).toString())
- .append(");\n");
-
- for (Iterator iter = flatList.iterator(); iter.hasNext();) {
- UIComponent child = (UIComponent) iter.next();
- if ((child instanceof UIPanelMenuItem)||(child instanceof UIPanelMenuGroup)) {
- boolean childDisabled;
- if (!((UIPanelMenu)component).isDisabled())
- childDisabled = child instanceof UIPanelMenuGroup ? ((UIPanelMenuGroup)child).isDisabled() : ((UIPanelMenuItem)child).isDisabled();
- else
- childDisabled = true;
- boolean childRendered = child instanceof UIPanelMenuGroup ? ((UIPanelMenuGroup)child).isRendered() : ((UIPanelMenuItem)child).isRendered();
- boolean parentRendered = true;
- if (! (child.getParent() instanceof UIPanelMenu))
- parentRendered = child.getParent() instanceof UIPanelMenuGroup ? ((UIPanelMenuGroup)child.getParent()).isRendered() : ((UIPanelMenuItem)child.getParent()).isRendered();
- if (!parentRendered){
- child.getAttributes().put("rendered",Boolean.FALSE);
- }
-
- UIPanelMenu parentMenu = findMenu(child);
-
- String event = parentMenu.getEvent();
- if ("".equals(event))
- event = "click";
- else if (event.startsWith("on"))
- event = event.substring(2);
-
- String onopen = (child instanceof UIPanelMenuGroup) && !((UIPanelMenuGroup)child).isDisabled() && !isParentDisabled(child) ?
- parentMenu.getOngroupexpand() + ";" + ((UIPanelMenuGroup)child).getOnexpand() : "";
- String onclose = (child instanceof UIPanelMenuGroup) && !((UIPanelMenuGroup)child).isDisabled() && !isParentDisabled(child) ?
- parentMenu.getOngroupcollapse() + ";" + ((UIPanelMenuGroup)child).getOncollapse() : "";
- String hoveredStyle = (child instanceof UIPanelMenuGroup ?
- parentMenu.getHoveredGroupStyle() : parentMenu.getHoveredItemStyle())
- + ";" + (child instanceof UIPanelMenuGroup ?
- ((UIPanelMenuGroup)child).getHoverStyle() : ((UIPanelMenuItem)child).getHoverStyle());
- String hoveredClass = (child instanceof UIPanelMenuGroup ?
- parentMenu.getHoveredGroupClass() : parentMenu.getHoveredItemClass())
- + " " + (child instanceof UIPanelMenuGroup ?
- ((UIPanelMenuGroup)child).getHoverClass() : ((UIPanelMenuItem)child).getHoverClass());
- String [] hoveredStyles = hoveredStyle.split(";");
- String [] hoveredClasses = hoveredClass.split(" ");
-
- String mode = getItemMode(child);
- Object target = child.getAttributes().get("target");
- String targetString;
- if (null == target)
- targetString = "";
- else
- targetString = target.toString();
-
-
-
- if (childRendered && parentRendered){
- if ( !isParentDisabled(child) ){
- buffer
- .append("new PanelMenuItem({myId:'")
- .append((String) child.getClientId(context))
- .append("',parentId:'")
- .append((String) child.getParent().getClientId(context))
- .append("'},{type:" + (child instanceof UIPanelMenuItem ? "\"item\"":"\"node\""))
- .append(",onopen:"+("".equals(onopen) ? "\"\"" : "\"" + onopen + "\"")+",onclose:"+("".equals(onclose) ? "\"\"" : "\"" + onclose + "\""))
- .append(",event:\"" + event + "\"")
- .append(",mode:\"" + mode + "\"")
- .append(",target:\"" + targetString + "\"")
- .append(",disabled:" +
- new Boolean(childDisabled).toString())
- .append("},{");
-
-
- for (int i = 0; i < hoveredStyles.length; i++)
- if (!"".equals(hoveredStyles[i])) {
- String [] temp = hoveredStyles[i].split(":");
- String cssName = temp[0].trim();
- String cssValue = temp[1].trim();
- buffer.append("\"" + cssName + "\": \"" + cssValue + "\"");
- if (i != hoveredStyles.length - 1)
- buffer.append(",");
- }
-
- buffer.append("},");
- if (hoveredClasses.length > 0) {
- buffer.append("new Array(");
- for (int i = 0; i < hoveredClasses.length; i++)
- if (!"".equals(hoveredClasses[i])) {;
- buffer.append("\"" + hoveredClasses[i] + "\"");
- if (i != hoveredClasses.length - 1)
- buffer.append(",");
- }
- buffer.append("),");
- } else
- buffer.append("new Array(),");
-
- buffer.append(levels.get(child.getClientId(context)));
- switchOnImagesIfNeeded(context,child,buffer);
-
- addActionIfNeeded(context,child,buffer);
-
- setExpandedIfNeeded(context,child,buffer);
-
- addAjaxFunction(context,child,buffer);
-
- addOnItemHover(parentMenu.getOnitemhover(), child, buffer);
-
- String iconPos = "left";
- boolean isTopLevel = isTopLevel(child);
- if(child instanceof UIPanelMenuGroup){
- iconPos = isTopLevel ? parentMenu.getIconGroupTopPosition() : parentMenu.getIconGroupPosition();
- } else {
- iconPos = isTopLevel ? parentMenu.getIconItemTopPosition() : parentMenu.getIconItemPosition();
- }
-
- buffer.append(","+'"'+iconPos+'"');
-
- addImages(buffer,context,child,component.getClientId(context).toString());
-
- buffer.append(");\n");
- }
- } else {
- continue;
- }
- }
- }
- StringBuffer ret = new StringBuffer();
- ret.append("<script ");
- ret.append("type=\"text/javascript\" ");
- ret.append("id =\"script" + component.getClientId(context)+"\">\n");
- ret.append(panelMenu);
- ret.append(buffer);
- ret.append("\n</script>");
-
- ResponseWriter writer = context.getResponseWriter();
- writer.write(ret.toString());
- }
-
- public void flatten(List children, List flatList, Map levels,int initialLevel) {
- FacesContext context = FacesContext.getCurrentInstance();
- if (children != null) {
- for (Iterator iter = children.iterator(); iter.hasNext();) {
- UIComponent child = (UIComponent) iter.next();
- if (child instanceof UIPanelMenu){
- continue;
- }
- flatList.add(child);
- levels.put(child.getClientId(context), new Integer(initialLevel));
- flatten(child.getChildren(), flatList, levels, initialLevel + 1);
- }
- }
- }
-
- private void switchOnImagesIfNeeded(FacesContext context, UIComponent child, StringBuffer buffer)throws IOException {
- boolean isToplevel = isTopLevel(child);
- String customIconOpened = "";
- String customIconClosed = "";
-
- UIPanelMenu panelMenu = findMenu(child);
- if(panelMenu == null){
- return;
- }
- String iconOpened = isToplevel ? panelMenu.getIconExpandedTopGroup() : panelMenu.getIconExpandedGroup();
- String iconClosed = isToplevel ? panelMenu.getIconCollapsedTopGroup() : panelMenu.getIconCollapsedGroup();
-
- try {
- customIconOpened = (String)child.getAttributes().get("iconOpened");
- customIconClosed = (String)child.getAttributes().get("iconClosed");
- } catch (Exception e) {}
-
- if (child instanceof UIPanelMenuItem){
- buffer.append(",false");
- } else {
- if (iconClosed.equals("custom")&&iconOpened.equals("custom")){
- if (customIconClosed.equals("")&&customIconOpened.equals("")){
- buffer.append(",false");
- } else {
- buffer.append(",true");
- }
- } else {
- buffer.append(",true");
- }
- }
- }
-
- private void addActionIfNeeded(FacesContext context,UIComponent child,StringBuffer buffer){
- //TODO by nick - dima - use CommandScriptBuilder
- if (child instanceof UIPanelMenuItem){
- if (((UIPanelMenuItem)child).getAction() == null){
- buffer.append(",false");
- } else {
- buffer.append(",true");
- }
- } else {
- if (((UIPanelMenuGroup)child).getAction()!=null&&!((UIPanelMenuGroup)child).getAction().equals("")){
- buffer.append(",'panelMenuNodeAction'");
- } else {
- buffer.append(",false");
- }
- }
- }
-
- private void setExpandedIfNeeded(FacesContext context,UIComponent child,StringBuffer buffer){
- if(child instanceof UIPanelMenuItem){
- buffer.append(",false");
- } else {
- UIPanelMenuGroup group = (UIPanelMenuGroup)child;
- if(group.getValue() != null){
- buffer.append(",").append(group.getValue().toString());
- } else {
- PanelMenuGroupRenderer r = (PanelMenuGroupRenderer)context.getRenderKit().getRenderer(group.getFamily(), group.getRendererType());
- boolean isNodeOpened;
- try {
- isNodeOpened = r.isOpened(context, child);
- } catch (IOException e) {
- // TODO Auto-generated catch block
-// e.printStackTrace();
- isNodeOpened = false;
- }
- buffer.append(",").append(String.valueOf(isNodeOpened));
- }
- }
- }
-
- private void addImages(StringBuffer buffer,FacesContext context,UIComponent component,String id){
- UIPanelMenu panelMenu = findMenu(component);
- if(panelMenu == null){
- return;
- }
- boolean isTopLevel = isTopLevel(component);
-
- final String PANEL_MENU_SPACER_ICON = getIconByType(PANEL_MENU_SPACER_ICON_NAME, isTopLevel,context, component);
-
- if(component instanceof UIPanelMenuItem){
- UIPanelMenuItem item = (UIPanelMenuItem)component;
-
- String defaultItemIcon = null;
- String defaultItemIconSrc = null;
- String customItemIcon = null;
- String customIconSource = null;
-
- if(isTopLevel){
- if(item.isDisabled()){
- defaultItemIcon = panelMenu.getIconTopDisabledItem();
- } else {
- defaultItemIcon = panelMenu.getIconTopItem();
- }
- if(defaultItemIcon == null || defaultItemIcon.equals("")){
- if(item.isDisabled()){
- defaultItemIcon = panelMenu.getIconDisabledItem();
- } else {
- defaultItemIcon = panelMenu.getIconItem();
- }
- }
- } else {
- //isTopLevel == false
- if(defaultItemIcon == null || defaultItemIcon.equals("")){
- if(item.isDisabled()){
- defaultItemIcon = panelMenu.getIconDisabledItem();
- } else {
- defaultItemIcon = panelMenu.getIconItem();
- }
- }
- }
-
- if(defaultItemIcon != null && defaultItemIcon.equals("none")){
- defaultItemIconSrc = PANEL_MENU_SPACER_ICON;
- } else {
- defaultItemIconSrc = getIconByType(defaultItemIcon, isTopLevel,context, component);
- }
-
-
- customItemIcon = item.isDisabled() ? item.getIconDisabled() : item.getIcon();
- if(customItemIcon != null && customItemIcon.equals("none")){
- customIconSource = PANEL_MENU_SPACER_ICON;
- } else {
- customIconSource = getIconByType(customItemIcon, isTopLevel,context, component);
- }
-
- if(customItemIcon != null && !customItemIcon.equals("")){
- buffer.append(","+'"'+customIconSource+'"').append(","+'"'+customIconSource+'"'+" ");
- } else if (defaultItemIcon != null && !defaultItemIcon.equals("")){
- buffer.append(","+'"'+defaultItemIconSrc+'"').append(","+'"'+defaultItemIconSrc+'"'+" ");
- } else {
- buffer.append(","+'"'+PANEL_MENU_SPACER_ICON+'"').append(","+'"'+PANEL_MENU_SPACER_ICON+'"'+" ");
- }
- buffer.append(",\"\" ");
-
- } else if(component instanceof UIPanelMenuGroup){
- UIPanelMenuGroup group = (UIPanelMenuGroup)component;
-
- String defaultIconNodeClosed = isTopLevel ? (group.isDisabled() ? panelMenu.getIconTopDisableGroup() : panelMenu.getIconCollapsedTopGroup()) : (group.isDisabled() ? panelMenu.getIconDisabledGroup() : panelMenu.getIconCollapsedGroup());
-
- if(isTopLevel){
- if(group.isDisabled()){
- defaultIconNodeClosed = panelMenu.getIconTopDisableGroup();
- if(defaultIconNodeClosed == null || defaultIconNodeClosed.equals("")){
- defaultIconNodeClosed = panelMenu.getIconDisabledGroup();
- }
- } else {
- defaultIconNodeClosed = panelMenu.getIconCollapsedTopGroup();
- if(defaultIconNodeClosed == null || defaultIconNodeClosed.equals("")){
- defaultIconNodeClosed = panelMenu.getIconCollapsedGroup();
- }
- }
- } else {
- if(group.isDisabled()){
- defaultIconNodeClosed = panelMenu.getIconDisabledGroup();
- } else {
- defaultIconNodeClosed = panelMenu.getIconCollapsedGroup();
- }
- }
-
- String defaultIconNodeOpened = isTopLevel ? panelMenu.getIconExpandedTopGroup() : panelMenu.getIconExpandedGroup();
-
- if(isTopLevel){
- defaultIconNodeOpened = panelMenu.getIconExpandedTopGroup();
- if(defaultIconNodeOpened == null || defaultIconNodeOpened.equals("")){
- defaultIconNodeOpened = panelMenu.getIconExpandedGroup();
- }
- } else {
- defaultIconNodeOpened = panelMenu.getIconExpandedGroup();
- }
-
- String defaultIconNodeClosedSrc = getIconByType(defaultIconNodeClosed, isTopLevel,context, component);
- String defaultIconNodeOpenedSrc = getIconByType(defaultIconNodeOpened, isTopLevel,context, component);
-
- String iconExpanded = "";
- String iconCollapsed = "";
- String iconExpandedSource = "";
- String iconCollapsedSource = "";
-
- iconExpanded = group.isDisabled() ? group.getIconDisabled() : group.getIconExpanded();
- iconCollapsed = group.isDisabled() ? group.getIconDisabled() : group.getIconCollapsed();
- iconExpandedSource = getIconByType(iconExpanded,isTopLevel,context,component);
- iconCollapsedSource = getIconByType(iconCollapsed,isTopLevel,context,component);
-
- if(iconExpanded != null && !iconExpanded.equals("")){
- buffer.append(","+'"'+ iconExpandedSource + '"');
- } else if(defaultIconNodeOpened != null && !defaultIconNodeOpened.equals("")){
- buffer.append(","+'"'+defaultIconNodeOpenedSrc + '"');
- } else {
- buffer.append(","+'"'+PANEL_MENU_SPACER_ICON + '"');
- }
-
- if(iconCollapsed != null && !iconCollapsed.equals("")){
- buffer.append(","+'"'+iconCollapsedSource+'"');
- } else if(defaultIconNodeClosed != null && !defaultIconNodeClosed.equals("")){
- buffer.append(","+'"'+defaultIconNodeClosedSrc+'"');
- } else {
- buffer.append(","+'"'+PANEL_MENU_SPACER_ICON + '"');
- }
- }
- buffer.append(",\"" + PANEL_MENU_SPACER_ICON + "\"");
- }
-
- protected void addAjaxFunction(FacesContext context, UIComponent child, StringBuffer buffer) {
- JSFunction function = AjaxRendererUtils.buildAjaxFunction(child,
- context);
- Map eventOptions = AjaxRendererUtils.buildEventOptions(context,
- child);
- function.addParameter(eventOptions);
-
- buffer.append(",\"");
- function.appendScript(buffer);
- buffer.append("\"");
- }
-
- protected void addOnItemHover(String menuOnItemHover, UIComponent child, StringBuffer buffer) {
- buffer.append(",\"");
- if(child instanceof UIPanelMenuItem){
- if(menuOnItemHover != null && !menuOnItemHover.equals("")) buffer.append(menuOnItemHover);
- }
- buffer.append("\"");
- }
-
-}
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import org.ajax4jsf.renderkit.AjaxRendererUtils;
+import org.ajax4jsf.javascript.JSFunction;
+import org.richfaces.component.UIPanelMenu;
+import org.richfaces.component.UIPanelMenuGroup;
+import org.richfaces.component.UIPanelMenuItem;
+import org.richfaces.renderkit.PanelMenuRendererBase;
+
+public class PanelMenuRenderer extends PanelMenuRendererBase {
+
+ /* (non-Javadoc)
+ * @see org.ajax4jsf.renderkit.RendererBase#getComponentClass()
+ */
+ protected Class getComponentClass() {
+ return UIComponent.class;
+ }
+
+ public void insertScript(FacesContext context, UIComponent component)
+ throws IOException {
+
+ StringBuffer buffer = new StringBuffer();
+ StringBuffer panelMenu = new StringBuffer();
+ List flatList = new LinkedList();
+ Map levels = new HashMap();
+
+ boolean expandSingle = ((UIPanelMenu)component).isExpandSingle();
+
+ flatten(component.getChildren(), flatList, levels, 0);
+
+ panelMenu
+ .append("new PanelMenu('")
+ .append(component.getClientId(context).toString())
+ .append("',")
+ .append(new Boolean(expandSingle).toString())
+ .append(");\n");
+
+ for (Iterator iter = flatList.iterator(); iter.hasNext();) {
+ UIComponent child = (UIComponent) iter.next();
+ if ((child instanceof UIPanelMenuItem)||(child instanceof UIPanelMenuGroup)) {
+ boolean childDisabled;
+ if (!((UIPanelMenu)component).isDisabled())
+ childDisabled = child instanceof UIPanelMenuGroup ? ((UIPanelMenuGroup)child).isDisabled() : ((UIPanelMenuItem)child).isDisabled();
+ else
+ childDisabled = true;
+ boolean childRendered = child instanceof UIPanelMenuGroup ? ((UIPanelMenuGroup)child).isRendered() : ((UIPanelMenuItem)child).isRendered();
+ boolean parentRendered = true;
+ if (! (child.getParent() instanceof UIPanelMenu))
+ parentRendered = child.getParent() instanceof UIPanelMenuGroup ? ((UIPanelMenuGroup)child.getParent()).isRendered() : ((UIPanelMenuItem)child.getParent()).isRendered();
+ if (!parentRendered){
+ child.getAttributes().put("rendered",Boolean.FALSE);
+ }
+
+ UIPanelMenu parentMenu = findMenu(child);
+
+ String event = parentMenu.getEvent();
+ if ("".equals(event))
+ event = "click";
+ else if (event.startsWith("on"))
+ event = event.substring(2);
+
+ String onopen = (child instanceof UIPanelMenuGroup) && !((UIPanelMenuGroup)child).isDisabled() && !isParentDisabled(child) ?
+ parentMenu.getOngroupexpand() + ";" + ((UIPanelMenuGroup)child).getOnexpand() : "";
+ String onclose = (child instanceof UIPanelMenuGroup) && !((UIPanelMenuGroup)child).isDisabled() && !isParentDisabled(child) ?
+ parentMenu.getOngroupcollapse() + ";" + ((UIPanelMenuGroup)child).getOncollapse() : "";
+ String hoveredStyle = (child instanceof UIPanelMenuGroup ?
+ parentMenu.getHoveredGroupStyle() : parentMenu.getHoveredItemStyle())
+ + ";" + (child instanceof UIPanelMenuGroup ?
+ ((UIPanelMenuGroup)child).getHoverStyle() : ((UIPanelMenuItem)child).getHoverStyle());
+ String hoveredClass = (child instanceof UIPanelMenuGroup ?
+ parentMenu.getHoveredGroupClass() : parentMenu.getHoveredItemClass())
+ + " " + (child instanceof UIPanelMenuGroup ?
+ ((UIPanelMenuGroup)child).getHoverClass() : ((UIPanelMenuItem)child).getHoverClass());
+ String [] hoveredStyles = hoveredStyle.split(";");
+ String [] hoveredClasses = hoveredClass.split(" ");
+
+ String mode = getItemMode(child);
+ Object target = child.getAttributes().get("target");
+ String targetString;
+ if (null == target)
+ targetString = "";
+ else
+ targetString = target.toString();
+
+
+
+ if (childRendered && parentRendered){
+ if ( !isParentDisabled(child) ){
+ buffer
+ .append("new PanelMenuItem({myId:'")
+ .append((String) child.getClientId(context))
+ .append("',parentId:'")
+ .append((String) child.getParent().getClientId(context))
+ .append("'},{type:" + (child instanceof UIPanelMenuItem ? "\"item\"":"\"node\""))
+ .append(",onopen:"+("".equals(onopen) ? "\"\"" : "\"" + onopen + "\"")+",onclose:"+("".equals(onclose) ? "\"\"" : "\"" + onclose + "\""))
+ .append(",event:\"" + event + "\"")
+ .append(",mode:\"" + mode + "\"")
+ .append(",target:\"" + targetString + "\"")
+ .append(",disabled:" +
+ new Boolean(childDisabled).toString())
+ .append("},{");
+
+
+ for (int i = 0; i < hoveredStyles.length; i++)
+ if (!"".equals(hoveredStyles[i])) {
+ String [] temp = hoveredStyles[i].split(":");
+ String cssName = temp[0].trim();
+ String cssValue = temp[1].trim();
+ buffer.append("\"" + cssName + "\": \"" + cssValue + "\"");
+ if (i != hoveredStyles.length - 1)
+ buffer.append(",");
+ }
+
+ buffer.append("},");
+ if (hoveredClasses.length > 0) {
+ buffer.append("new Array(");
+ for (int i = 0; i < hoveredClasses.length; i++)
+ if (!"".equals(hoveredClasses[i])) {;
+ buffer.append("\"" + hoveredClasses[i] + "\"");
+ if (i != hoveredClasses.length - 1)
+ buffer.append(",");
+ }
+ buffer.append("),");
+ } else
+ buffer.append("new Array(),");
+
+ buffer.append(levels.get(child.getClientId(context)));
+ switchOnImagesIfNeeded(context,child,buffer);
+
+ addActionIfNeeded(context,child,buffer);
+
+ setExpandedIfNeeded(context,child,buffer);
+
+ addAjaxFunction(context,child,buffer);
+
+ addOnItemHover(parentMenu.getOnitemhover(), child, buffer);
+
+ String iconPos = "left";
+ boolean isTopLevel = isTopLevel(child);
+ if(child instanceof UIPanelMenuGroup){
+ iconPos = isTopLevel ? parentMenu.getIconGroupTopPosition() : parentMenu.getIconGroupPosition();
+ } else {
+ iconPos = isTopLevel ? parentMenu.getIconItemTopPosition() : parentMenu.getIconItemPosition();
+ }
+
+ buffer.append(","+'"'+iconPos+'"');
+
+ addImages(buffer,context,child,component.getClientId(context).toString());
+
+ buffer.append(");\n");
+ }
+ } else {
+ continue;
+ }
+ }
+ }
+ StringBuffer ret = new StringBuffer();
+ ret.append("<script ");
+ ret.append("type=\"text/javascript\" ");
+ ret.append("id =\"script" + component.getClientId(context)+"\">\n");
+ ret.append(panelMenu);
+ ret.append(buffer);
+ ret.append("\n</script>");
+
+ ResponseWriter writer = context.getResponseWriter();
+ writer.write(ret.toString());
+ }
+
+ public void flatten(List children, List flatList, Map levels,int initialLevel) {
+ FacesContext context = FacesContext.getCurrentInstance();
+ if (children != null) {
+ for (Iterator iter = children.iterator(); iter.hasNext();) {
+ UIComponent child = (UIComponent) iter.next();
+ if (child instanceof UIPanelMenu){
+ continue;
+ }
+ flatList.add(child);
+ levels.put(child.getClientId(context), new Integer(initialLevel));
+ flatten(child.getChildren(), flatList, levels, initialLevel + 1);
+ }
+ }
+ }
+
+ private void switchOnImagesIfNeeded(FacesContext context, UIComponent child, StringBuffer buffer)throws IOException {
+ boolean isToplevel = isTopLevel(child);
+ String customIconOpened = "";
+ String customIconClosed = "";
+
+ UIPanelMenu panelMenu = findMenu(child);
+ if(panelMenu == null){
+ return;
+ }
+ String iconOpened = isToplevel ? panelMenu.getIconExpandedTopGroup() : panelMenu.getIconExpandedGroup();
+ String iconClosed = isToplevel ? panelMenu.getIconCollapsedTopGroup() : panelMenu.getIconCollapsedGroup();
+
+ try {
+ customIconOpened = (String)child.getAttributes().get("iconOpened");
+ customIconClosed = (String)child.getAttributes().get("iconClosed");
+ } catch (Exception e) {}
+
+ if (child instanceof UIPanelMenuItem){
+ buffer.append(",false");
+ } else {
+ if (iconClosed.equals("custom")&&iconOpened.equals("custom")){
+ if (customIconClosed.equals("")&&customIconOpened.equals("")){
+ buffer.append(",false");
+ } else {
+ buffer.append(",true");
+ }
+ } else {
+ buffer.append(",true");
+ }
+ }
+ }
+
+ private void addActionIfNeeded(FacesContext context,UIComponent child,StringBuffer buffer){
+ //TODO by nick - dima - use CommandScriptBuilder
+ if (child instanceof UIPanelMenuItem){
+ if (((UIPanelMenuItem)child).getAction() == null){
+ buffer.append(",false");
+ } else {
+ buffer.append(",true");
+ }
+ } else {
+ if (((UIPanelMenuGroup)child).getAction()!=null&&!((UIPanelMenuGroup)child).getAction().equals("")){
+ buffer.append(",'panelMenuNodeAction'");
+ } else {
+ buffer.append(",false");
+ }
+ }
+ }
+
+ private void setExpandedIfNeeded(FacesContext context,UIComponent child,StringBuffer buffer){
+ if(child instanceof UIPanelMenuItem){
+ buffer.append(",false");
+ } else {
+ UIPanelMenuGroup group = (UIPanelMenuGroup)child;
+ if(group.getValue() != null){
+ buffer.append(",").append(group.getValue().toString());
+ } else {
+ PanelMenuGroupRenderer r = (PanelMenuGroupRenderer)context.getRenderKit().getRenderer(group.getFamily(), group.getRendererType());
+ boolean isNodeOpened;
+ try {
+ isNodeOpened = r.isOpened(context, child);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+// e.printStackTrace();
+ isNodeOpened = false;
+ }
+ buffer.append(",").append(String.valueOf(isNodeOpened));
+ }
+ }
+ }
+
+ private void addImages(StringBuffer buffer,FacesContext context,UIComponent component,String id){
+ UIPanelMenu panelMenu = findMenu(component);
+ if(panelMenu == null){
+ return;
+ }
+ boolean isTopLevel = isTopLevel(component);
+
+ final String PANEL_MENU_SPACER_ICON = getIconByType(PANEL_MENU_SPACER_ICON_NAME, isTopLevel,context, component);
+
+ if(component instanceof UIPanelMenuItem){
+ UIPanelMenuItem item = (UIPanelMenuItem)component;
+
+ String defaultItemIcon = null;
+ String defaultItemIconSrc = null;
+ String customItemIcon = null;
+ String customIconSource = null;
+
+ if(isTopLevel){
+ if(item.isDisabled()){
+ defaultItemIcon = panelMenu.getIconTopDisabledItem();
+ } else {
+ defaultItemIcon = panelMenu.getIconTopItem();
+ }
+ if(defaultItemIcon == null || defaultItemIcon.equals("")){
+ if(item.isDisabled()){
+ defaultItemIcon = panelMenu.getIconDisabledItem();
+ } else {
+ defaultItemIcon = panelMenu.getIconItem();
+ }
+ }
+ } else {
+ //isTopLevel == false
+ if(defaultItemIcon == null || defaultItemIcon.equals("")){
+ if(item.isDisabled()){
+ defaultItemIcon = panelMenu.getIconDisabledItem();
+ } else {
+ defaultItemIcon = panelMenu.getIconItem();
+ }
+ }
+ }
+
+ if(defaultItemIcon != null && defaultItemIcon.equals("none")){
+ defaultItemIconSrc = PANEL_MENU_SPACER_ICON;
+ } else {
+ defaultItemIconSrc = getIconByType(defaultItemIcon, isTopLevel,context, component);
+ }
+
+
+ customItemIcon = item.isDisabled() ? item.getIconDisabled() : item.getIcon();
+ if(customItemIcon != null && customItemIcon.equals("none")){
+ customIconSource = PANEL_MENU_SPACER_ICON;
+ } else {
+ customIconSource = getIconByType(customItemIcon, isTopLevel,context, component);
+ }
+
+ if(customItemIcon != null && !customItemIcon.equals("")){
+ buffer.append(","+'"'+customIconSource+'"').append(","+'"'+customIconSource+'"'+" ");
+ } else if (defaultItemIcon != null && !defaultItemIcon.equals("")){
+ buffer.append(","+'"'+defaultItemIconSrc+'"').append(","+'"'+defaultItemIconSrc+'"'+" ");
+ } else {
+ buffer.append(","+'"'+PANEL_MENU_SPACER_ICON+'"').append(","+'"'+PANEL_MENU_SPACER_ICON+'"'+" ");
+ }
+ buffer.append(",\"\" ");
+
+ } else if(component instanceof UIPanelMenuGroup){
+ UIPanelMenuGroup group = (UIPanelMenuGroup)component;
+
+ String defaultIconNodeClosed = isTopLevel ? (group.isDisabled() ? panelMenu.getIconTopDisableGroup() : panelMenu.getIconCollapsedTopGroup()) : (group.isDisabled() ? panelMenu.getIconDisabledGroup() : panelMenu.getIconCollapsedGroup());
+
+ if(isTopLevel){
+ if(group.isDisabled()){
+ defaultIconNodeClosed = panelMenu.getIconTopDisableGroup();
+ if(defaultIconNodeClosed == null || defaultIconNodeClosed.equals("")){
+ defaultIconNodeClosed = panelMenu.getIconDisabledGroup();
+ }
+ } else {
+ defaultIconNodeClosed = panelMenu.getIconCollapsedTopGroup();
+ if(defaultIconNodeClosed == null || defaultIconNodeClosed.equals("")){
+ defaultIconNodeClosed = panelMenu.getIconCollapsedGroup();
+ }
+ }
+ } else {
+ if(group.isDisabled()){
+ defaultIconNodeClosed = panelMenu.getIconDisabledGroup();
+ } else {
+ defaultIconNodeClosed = panelMenu.getIconCollapsedGroup();
+ }
+ }
+
+ String defaultIconNodeOpened = isTopLevel ? panelMenu.getIconExpandedTopGroup() : panelMenu.getIconExpandedGroup();
+
+ if(isTopLevel){
+ defaultIconNodeOpened = panelMenu.getIconExpandedTopGroup();
+ if(defaultIconNodeOpened == null || defaultIconNodeOpened.equals("")){
+ defaultIconNodeOpened = panelMenu.getIconExpandedGroup();
+ }
+ } else {
+ defaultIconNodeOpened = panelMenu.getIconExpandedGroup();
+ }
+
+ String defaultIconNodeClosedSrc = getIconByType(defaultIconNodeClosed, isTopLevel,context, component);
+ String defaultIconNodeOpenedSrc = getIconByType(defaultIconNodeOpened, isTopLevel,context, component);
+
+ String iconExpanded = "";
+ String iconCollapsed = "";
+ String iconExpandedSource = "";
+ String iconCollapsedSource = "";
+
+ iconExpanded = group.isDisabled() ? group.getIconDisabled() : group.getIconExpanded();
+ iconCollapsed = group.isDisabled() ? group.getIconDisabled() : group.getIconCollapsed();
+ iconExpandedSource = getIconByType(iconExpanded,isTopLevel,context,component);
+ iconCollapsedSource = getIconByType(iconCollapsed,isTopLevel,context,component);
+
+ if(iconExpanded != null && !iconExpanded.equals("")){
+ buffer.append(","+'"'+ iconExpandedSource + '"');
+ } else if(defaultIconNodeOpened != null && !defaultIconNodeOpened.equals("")){
+ buffer.append(","+'"'+defaultIconNodeOpenedSrc + '"');
+ } else {
+ buffer.append(","+'"'+PANEL_MENU_SPACER_ICON + '"');
+ }
+
+ if(iconCollapsed != null && !iconCollapsed.equals("")){
+ buffer.append(","+'"'+iconCollapsedSource+'"');
+ } else if(defaultIconNodeClosed != null && !defaultIconNodeClosed.equals("")){
+ buffer.append(","+'"'+defaultIconNodeClosedSrc+'"');
+ } else {
+ buffer.append(","+'"'+PANEL_MENU_SPACER_ICON + '"');
+ }
+ }
+ buffer.append(",\"" + PANEL_MENU_SPACER_ICON + "\"");
+ }
+
+ protected void addAjaxFunction(FacesContext context, UIComponent child, StringBuffer buffer) {
+ JSFunction function = AjaxRendererUtils.buildAjaxFunction(child,
+ context);
+ Map eventOptions = AjaxRendererUtils.buildEventOptions(context,
+ child);
+ function.addParameter(eventOptions);
+
+ buffer.append(",\"");
+ function.appendScript(buffer);
+ buffer.append("\"");
+ }
+
+ protected void addOnItemHover(String menuOnItemHover, UIComponent child, StringBuffer buffer) {
+ buffer.append(",\"");
+ if(child instanceof UIPanelMenuItem){
+ if(menuOnItemHover != null && !menuOnItemHover.equals("")) buffer.append(menuOnItemHover);
+ }
+ buffer.append("\"");
+ }
+
+}
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/gradientimages/PanelMenuGroupGradient.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/gradientimages/PanelMenuGroupGradient.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/gradientimages/PanelMenuGroupGradient.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,32 +1,32 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.gradientimages;
-
-import org.ajax4jsf.framework.skin.Skin;
-import org.richfaces.renderkit.html.BaseGradient;
-
-public class PanelMenuGroupGradient extends BaseGradient {
- public PanelMenuGroupGradient() {
- super(10, 40, 14, "headerGradientColor", Skin.headerBackgroundColor);
- }
-
-}
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.gradientimages;
+
+import org.richfaces.skin.Skin;
+import org.richfaces.renderkit.html.BaseGradient;
+
+public class PanelMenuGroupGradient extends BaseGradient {
+ public PanelMenuGroupGradient() {
+ super(10, 40, 14, "headerGradientColor", Skin.headerBackgroundColor);
+ }
+
+}
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/gradientimages/PanelMenuItemGradient.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/gradientimages/PanelMenuItemGradient.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/gradientimages/PanelMenuItemGradient.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,31 +1,31 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.gradientimages;
-
-import org.ajax4jsf.framework.skin.Skin;
-import org.richfaces.renderkit.html.BaseGradient;
-
-public class PanelMenuItemGradient extends BaseGradient {
- public PanelMenuItemGradient() {
- super(10, 40, 14, "controlBackgroundColor", Skin.generalBackgroundColor);
- }
-}
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.gradientimages;
+
+import org.richfaces.skin.Skin;
+import org.richfaces.renderkit.html.BaseGradient;
+
+public class PanelMenuItemGradient extends BaseGradient {
+ public PanelMenuItemGradient() {
+ super(10, 40, 14, "controlBackgroundColor", Skin.generalBackgroundColor);
+ }
+}
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconBasic.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,100 +1,100 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.util.Date;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.framework.resource.GifRenderer;
-import org.ajax4jsf.framework.resource.InternetResourceBuilder;
-import org.ajax4jsf.framework.resource.Java2Dresource;
-import org.ajax4jsf.framework.resource.ResourceContext;
-import org.ajax4jsf.framework.skin.Skin;
-import org.ajax4jsf.framework.skin.SkinFactory;
-import org.ajax4jsf.framework.util.HtmlColor;
-import org.ajax4jsf.framework.util.HtmlDimensions;
-
-
-/**
- * @author Pavel Kotikov
- *
- */
-public class PanelMenuIconBasic extends Java2Dresource {
-
- public PanelMenuIconBasic() {
- setRenderer(new GifRenderer());
- setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
- }
-
-
- public Dimension getDimensions(FacesContext facesContext, Object data) {
- return calculateDimensions(getDataToStore(facesContext, data));
- }
- protected Dimension getDimensions(ResourceContext resourceContext) {
- return calculateDimensions(restoreData(resourceContext));
- }
-
- protected void paint(ResourceContext context, Graphics2D g2d) {
-
- }
-
- protected Dimension calculateDimensions(Object data){
- Object [] stored = (Object []) data;
- int h = ((Integer) stored[0]).intValue();
- return new Dimension(h,h);
- }
-
-
- /**
- * @param data - pass icon color there
- */
- protected Object getDataToStore(FacesContext context, Object data) {
- Object[] stored = new Object[5];
- Skin skin = SkinFactory.getInstance().getSkin(context);
- Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
-
- stored[0] = new Integer(HtmlDimensions.decode("16px").intValue());
-
- Color col = null;
-
- if (data!=null){
- col = HtmlColor.decode(data.toString());
- } else {
- String skinParameter = "headerTextColor";
- String headerTextColor = (String) skin.getParameter(context, skinParameter);
- if (null == headerTextColor || "".equals(headerTextColor))
- headerTextColor = (String) defaultSkin.getParameter(context, skinParameter);
- col = HtmlColor.decode(headerTextColor);
- }
- stored[1]= col;
- return stored;
- }
-
- public boolean isCacheable() {
- return true;
- }
-
-}
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.util.Date;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.resource.GifRenderer;
+import org.ajax4jsf.resource.InternetResourceBuilder;
+import org.ajax4jsf.resource.Java2Dresource;
+import org.ajax4jsf.resource.ResourceContext;
+import org.richfaces.skin.Skin;
+import org.richfaces.skin.SkinFactory;
+import org.ajax4jsf.util.HtmlColor;
+import org.ajax4jsf.util.HtmlDimensions;
+
+
+/**
+ * @author Pavel Kotikov
+ *
+ */
+public class PanelMenuIconBasic extends Java2Dresource {
+
+ public PanelMenuIconBasic() {
+ setRenderer(new GifRenderer());
+ setLastModified(new Date(InternetResourceBuilder.getInstance().getStartTime()));
+ }
+
+
+ public Dimension getDimensions(FacesContext facesContext, Object data) {
+ return calculateDimensions(getDataToStore(facesContext, data));
+ }
+ protected Dimension getDimensions(ResourceContext resourceContext) {
+ return calculateDimensions(restoreData(resourceContext));
+ }
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+
+ }
+
+ protected Dimension calculateDimensions(Object data){
+ Object [] stored = (Object []) data;
+ int h = ((Integer) stored[0]).intValue();
+ return new Dimension(h,h);
+ }
+
+
+ /**
+ * @param data - pass icon color there
+ */
+ protected Object getDataToStore(FacesContext context, Object data) {
+ Object[] stored = new Object[5];
+ Skin skin = SkinFactory.getInstance().getSkin(context);
+ Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
+
+ stored[0] = new Integer(HtmlDimensions.decode("16px").intValue());
+
+ Color col = null;
+
+ if (data!=null){
+ col = HtmlColor.decode(data.toString());
+ } else {
+ String skinParameter = "headerTextColor";
+ String headerTextColor = (String) skin.getParameter(context, skinParameter);
+ if (null == headerTextColor || "".equals(headerTextColor))
+ headerTextColor = (String) defaultSkin.getParameter(context, skinParameter);
+ col = HtmlColor.decode(headerTextColor);
+ }
+ stored[1]= col;
+ return stored;
+ }
+
+ public boolean isCacheable() {
+ return true;
+ }
+
+}
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevron.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,81 +1,81 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.GeneralPath;
-import java.awt.image.AffineTransformOp;
-import java.awt.image.BufferedImage;
-import org.ajax4jsf.framework.resource.ResourceContext;
-
-
-
-public class PanelMenuIconChevron extends PanelMenuIconBasic {
-
- protected void paint(ResourceContext context, Graphics2D graphics2d) {
-
- BufferedImage bufferedImage = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB);
- Graphics2D g2d = bufferedImage.createGraphics();
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- Dimension dimension = getDimensions(context);
- GeneralPath path = new GeneralPath();
- g2d.setStroke(new BasicStroke(1,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER));
- g2d.translate(28,28);
- Object [] data = (Object[]) restoreData(context);
- Color col = (Color)data[1];
-
- g2d.setColor(col);
-
- path.moveTo(1,1);
- path.lineTo(17,1);
- path.lineTo(47,31);
- path.lineTo(17,61);
- path.lineTo(1,61);
- path.lineTo(31,31);
- path.closePath();
- g2d.fill(path);
-
- g2d.translate(24,0);
-
- g2d.fill(path);
-
- AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
- AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
-
- graphics2d.drawImage(bufferedImage,transformOp, 0, 0);
-
- g2d.dispose();
- }
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+import org.ajax4jsf.resource.ResourceContext;
+
+
+
+public class PanelMenuIconChevron extends PanelMenuIconBasic {
+
+ protected void paint(ResourceContext context, Graphics2D graphics2d) {
+
+ BufferedImage bufferedImage = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = bufferedImage.createGraphics();
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ Dimension dimension = getDimensions(context);
+ GeneralPath path = new GeneralPath();
+ g2d.setStroke(new BasicStroke(1,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER));
+ g2d.translate(28,28);
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+
+ path.moveTo(1,1);
+ path.lineTo(17,1);
+ path.lineTo(47,31);
+ path.lineTo(17,61);
+ path.lineTo(1,61);
+ path.lineTo(31,31);
+ path.closePath();
+ g2d.fill(path);
+
+ g2d.translate(24,0);
+
+ g2d.fill(path);
+
+ AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
+ AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
+
+ graphics2d.drawImage(bufferedImage,transformOp, 0, 0);
+
+ g2d.dispose();
+ }
}
\ No newline at end of file
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronDown.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,80 +1,80 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.GeneralPath;
-import java.awt.image.AffineTransformOp;
-import java.awt.image.BufferedImage;
-import org.ajax4jsf.framework.resource.ResourceContext;
-
-
-
-public class PanelMenuIconChevronDown extends PanelMenuIconBasic {
-
- protected void paint(ResourceContext context, Graphics2D graphics2D) {
- BufferedImage bufferedImage = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB);
- Graphics2D g2d = bufferedImage.createGraphics();
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- Dimension dimension = getDimensions(context);
- GeneralPath path = new GeneralPath();
- g2d.setStroke(new BasicStroke(1,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER));
- g2d.translate(28,28);
- Object [] data = (Object[]) restoreData(context);
- Color col = (Color)data[1];
-
- g2d.setColor(col);
-
- path.moveTo(1,0);
- path.lineTo(31,30);
- path.lineTo(61,0);
- path.lineTo(61,16);
- path.lineTo(31,46);
- path.lineTo(1,16);
- path.closePath();
- g2d.fill(path);
-
- g2d.translate(0,24);
-
- g2d.fill(path);
-
- AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
- AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
-
- graphics2D.drawImage(bufferedImage,transformOp, 0, 0);
-
- g2d.dispose();
- }
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+import org.ajax4jsf.resource.ResourceContext;
+
+
+
+public class PanelMenuIconChevronDown extends PanelMenuIconBasic {
+
+ protected void paint(ResourceContext context, Graphics2D graphics2D) {
+ BufferedImage bufferedImage = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = bufferedImage.createGraphics();
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ Dimension dimension = getDimensions(context);
+ GeneralPath path = new GeneralPath();
+ g2d.setStroke(new BasicStroke(1,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER));
+ g2d.translate(28,28);
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+
+ path.moveTo(1,0);
+ path.lineTo(31,30);
+ path.lineTo(61,0);
+ path.lineTo(61,16);
+ path.lineTo(31,46);
+ path.lineTo(1,16);
+ path.closePath();
+ g2d.fill(path);
+
+ g2d.translate(0,24);
+
+ g2d.fill(path);
+
+ AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
+ AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
+
+ graphics2D.drawImage(bufferedImage,transformOp, 0, 0);
+
+ g2d.dispose();
+ }
}
\ No newline at end of file
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconChevronUp.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,80 +1,80 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.GeneralPath;
-import java.awt.image.AffineTransformOp;
-import java.awt.image.BufferedImage;
-import org.ajax4jsf.framework.resource.ResourceContext;
-
-
-
-public class PanelMenuIconChevronUp extends PanelMenuIconBasic {
-
- protected void paint(ResourceContext context, Graphics2D graphics2D) {
- BufferedImage bufferedImage = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB);
- Graphics2D g2d = bufferedImage.createGraphics();
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- Dimension dimension = getDimensions(context);
- GeneralPath path = new GeneralPath();
- g2d.setStroke(new BasicStroke(1,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER));
- g2d.translate(28,28);
- Object [] data = (Object[]) restoreData(context);
- Color col = (Color)data[1];
-
- g2d.setColor(col);
-
- path.moveTo(0,46);
- path.lineTo(0,31);
- path.lineTo(30,1);
- path.lineTo(61,31);
- path.lineTo(61,46);
- path.lineTo(30,16);
- path.closePath();
- g2d.fill(path);
-
- g2d.translate(0,24);
-
- g2d.fill(path);
-
- AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
- AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
-
- graphics2D.drawImage(bufferedImage,transformOp, 0, 0);
-
- g2d.dispose();
- }
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.GeneralPath;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+import org.ajax4jsf.resource.ResourceContext;
+
+
+
+public class PanelMenuIconChevronUp extends PanelMenuIconBasic {
+
+ protected void paint(ResourceContext context, Graphics2D graphics2D) {
+ BufferedImage bufferedImage = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2d = bufferedImage.createGraphics();
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_DISABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ Dimension dimension = getDimensions(context);
+ GeneralPath path = new GeneralPath();
+ g2d.setStroke(new BasicStroke(1,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER));
+ g2d.translate(28,28);
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+
+ path.moveTo(0,46);
+ path.lineTo(0,31);
+ path.lineTo(30,1);
+ path.lineTo(61,31);
+ path.lineTo(61,46);
+ path.lineTo(30,16);
+ path.closePath();
+ g2d.fill(path);
+
+ g2d.translate(0,24);
+
+ g2d.fill(path);
+
+ AffineTransform transform = AffineTransform.getScaleInstance(dimension.getHeight()/128, dimension.getHeight()/128);
+ AffineTransformOp transformOp = new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
+
+ graphics2D.drawImage(bufferedImage,transformOp, 0, 0);
+
+ g2d.dispose();
+ }
}
\ No newline at end of file
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconDisc.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,50 +1,50 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.Ellipse2D;
-import org.ajax4jsf.framework.resource.ResourceContext;
-
-
-
-public class PanelMenuIconDisc extends PanelMenuIconBasic {
-
- protected void paint(ResourceContext context, Graphics2D g2d) {
-
- Dimension dimension = getDimensions(context);
- Object [] data = (Object[]) restoreData(context);
- Color col = (Color)data[1];
-
- int dim = (int) Math.round(dimension.getWidth() / 3);
-
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setColor(col);
- g2d.translate(dim,dim);
- Ellipse2D dot = new Ellipse2D.Double(0, 0, dim, dim);
- g2d.fill(dot);
-
- }
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.Ellipse2D;
+import org.ajax4jsf.resource.ResourceContext;
+
+
+
+public class PanelMenuIconDisc extends PanelMenuIconBasic {
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+
+ Dimension dimension = getDimensions(context);
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ int dim = (int) Math.round(dimension.getWidth() / 3);
+
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setColor(col);
+ g2d.translate(dim,dim);
+ Ellipse2D dot = new Ellipse2D.Double(0, 0, dim, dim);
+ g2d.fill(dot);
+
+ }
}
\ No newline at end of file
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconGrid.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,63 +1,63 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.BasicStroke;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.Rectangle2D;
-import org.ajax4jsf.framework.resource.ResourceContext;
-
-
-
-public class PanelMenuIconGrid extends PanelMenuIconBasic {
-
-
- protected void paint(ResourceContext context, Graphics2D g2d) {
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
- Rectangle2D.Float path = new Rectangle2D.Float();
- Dimension dimension = getDimensions(context);
- g2d.setStroke(new BasicStroke(16,BasicStroke.CAP_SQUARE,BasicStroke.JOIN_BEVEL));
- g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
-
- g2d.translate(40,40);
-
- path.setRect(0,0,40,40);
- Object [] data = (Object[]) restoreData(context);
- Color col = (Color)data[1];
-
- g2d.setColor(col);
- Color bcolor = new Color(1f,1f,1f,0f);
- g2d.setBackground(bcolor);
- g2d.fill(path);
- g2d.clearRect(16,0,8,40);
- g2d.clearRect(0,16,40,8);
- }
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.Rectangle2D;
+import org.ajax4jsf.resource.ResourceContext;
+
+
+
+public class PanelMenuIconGrid extends PanelMenuIconBasic {
+
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+ g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+ Rectangle2D.Float path = new Rectangle2D.Float();
+ Dimension dimension = getDimensions(context);
+ g2d.setStroke(new BasicStroke(16,BasicStroke.CAP_SQUARE,BasicStroke.JOIN_BEVEL));
+ g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
+
+ g2d.translate(40,40);
+
+ path.setRect(0,0,40,40);
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+ Color bcolor = new Color(1f,1f,1f,0f);
+ g2d.setBackground(bcolor);
+ g2d.fill(path);
+ g2d.clearRect(16,0,8,40);
+ g2d.clearRect(0,16,40,8);
+ }
}
\ No newline at end of file
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconSpacer.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,33 +1,33 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.Graphics2D;
-import org.ajax4jsf.framework.resource.ResourceContext;
-
-
-public class PanelMenuIconSpacer extends PanelMenuIconBasic {
-
- protected void paint(ResourceContext context, Graphics2D g2d) {
-
- }
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Graphics2D;
+import org.ajax4jsf.resource.ResourceContext;
+
+
+public class PanelMenuIconSpacer extends PanelMenuIconBasic {
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+
+ }
}
\ No newline at end of file
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangle.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,51 +1,51 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.GeneralPath;
-import org.ajax4jsf.framework.resource.ResourceContext;
-
-
-public class PanelMenuIconTriangle extends PanelMenuIconBasic {
-
- protected void paint(ResourceContext context, Graphics2D g2d) {
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- GeneralPath path = new GeneralPath();
-
- Dimension dimension = getDimensions(context);
- g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
- g2d.translate(47,30);
- path.moveTo(0,0);
- path.lineTo(33,33);
- path.lineTo(33,34);
- path.lineTo(0,67);
- path.closePath();
- g2d.setColor((Color)(((Object[]) restoreData(context))[1]));
- g2d.fill(path);
- }
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+import org.ajax4jsf.resource.ResourceContext;
+
+
+public class PanelMenuIconTriangle extends PanelMenuIconBasic {
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+ GeneralPath path = new GeneralPath();
+
+ Dimension dimension = getDimensions(context);
+ g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
+ g2d.translate(47,30);
+ path.moveTo(0,0);
+ path.lineTo(33,33);
+ path.lineTo(33,34);
+ path.lineTo(0,67);
+ path.closePath();
+ g2d.setColor((Color)(((Object[]) restoreData(context))[1]));
+ g2d.fill(path);
+ }
}
\ No newline at end of file
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleDown.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,57 +1,57 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.GeneralPath;
-import org.ajax4jsf.framework.resource.ResourceContext;
-
-
-
-public class PanelMenuIconTriangleDown extends PanelMenuIconBasic {
-
- protected void paint(ResourceContext context, Graphics2D g2d) {
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- GeneralPath path = new GeneralPath();
-
- Dimension dimension = getDimensions(context);
-
- g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
- g2d.translate(31,54);
-
- path.moveTo(0,0);
- path.lineTo(33,33);
- path.lineTo(34,33);
- path.lineTo(67,0);
- path.closePath();
- Object [] data = (Object[]) restoreData(context);
- Color col = (Color)data[1];
-
- g2d.setColor(col);
- g2d.fill(path);
- }
-}
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+import org.ajax4jsf.resource.ResourceContext;
+
+
+
+public class PanelMenuIconTriangleDown extends PanelMenuIconBasic {
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+ GeneralPath path = new GeneralPath();
+
+ Dimension dimension = getDimensions(context);
+
+ g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
+ g2d.translate(31,54);
+
+ path.moveTo(0,0);
+ path.lineTo(33,33);
+ path.lineTo(34,33);
+ path.lineTo(67,0);
+ path.closePath();
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+ g2d.fill(path);
+ }
+}
Modified: trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/iconimages/PanelMenuIconTriangleUp.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,56 +1,56 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.iconimages;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.GeneralPath;
-import org.ajax4jsf.framework.resource.ResourceContext;
-
-
-
-public class PanelMenuIconTriangleUp extends PanelMenuIconBasic {
-
- protected void paint(ResourceContext context, Graphics2D g2d) {
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
- GeneralPath path = new GeneralPath();
-
- Dimension dimension = getDimensions(context);
-
- g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
- g2d.translate(31,47);
- path.moveTo(0,33);
- path.lineTo(33,0);
- path.lineTo(34,0);
- path.lineTo(67,33);
- path.closePath();
- Object [] data = (Object[]) restoreData(context);
- Color col = (Color)data[1];
-
- g2d.setColor(col);
- g2d.fill(path);
- }
-}
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.iconimages;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.GeneralPath;
+import org.ajax4jsf.resource.ResourceContext;
+
+
+
+public class PanelMenuIconTriangleUp extends PanelMenuIconBasic {
+
+ protected void paint(ResourceContext context, Graphics2D g2d) {
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
+ g2d.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
+ GeneralPath path = new GeneralPath();
+
+ Dimension dimension = getDimensions(context);
+
+ g2d.scale(dimension.getHeight()/128,dimension.getHeight()/128);
+ g2d.translate(31,47);
+ path.moveTo(0,33);
+ path.lineTo(33,0);
+ path.lineTo(34,0);
+ path.lineTo(67,33);
+ path.closePath();
+ Object [] data = (Object[]) restoreData(context);
+ Color col = (Color)data[1];
+
+ g2d.setColor(col);
+ g2d.fill(path);
+ }
+}
Modified: trunk/sandbox/ui/panelmenu/src/test/java/org/richfaces/component/PanelMenuComponentTest.java
===================================================================
--- trunk/sandbox/ui/panelmenu/src/test/java/org/richfaces/component/PanelMenuComponentTest.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/panelmenu/src/test/java/org/richfaces/component/PanelMenuComponentTest.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,322 +1,322 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces 3.0 - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.component;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.faces.component.UIForm;
-import javax.faces.component.html.HtmlForm;
-import javax.servlet.http.HttpServletResponse;
-
-import org.ajax4jsf.framework.resource.InternetResource;
-import org.ajax4jsf.framework.resource.InternetResourceBuilder;
-import org.ajax4jsf.framework.resource.ResourceBuilderImpl;
-import org.ajax4jsf.framework.util.image.ImageInfo;
-import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
-import org.apache.commons.lang.StringUtils;
-import org.richfaces.component.UIPanelMenu;
-import org.richfaces.component.UIPanelMenuGroup;
-import org.richfaces.component.UIPanelMenuItem;
-
-import com.gargoylesoftware.htmlunit.Page;
-import com.gargoylesoftware.htmlunit.html.HtmlElement;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import com.gargoylesoftware.htmlunit.html.HtmlScript;
-
-/**
- * Unit test for simple Component.
- */
-public class PanelMenuComponentTest extends AbstractAjax4JsfTestCase {
- private static Set javaScripts = new HashSet();
-
- private String[] imageResources = new String[]{
- "org.richfaces.renderkit.html.iconimages.PanelMenuIconChevron",
- "org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronDown",
- "org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronUp",
- "org.richfaces.renderkit.html.iconimages.PanelMenuIconDisc",
- "org.richfaces.renderkit.html.iconimages.PanelMenuIconGrid",
- "org.richfaces.renderkit.html.iconimages.PanelMenuIconSpacer",
- "org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangle",
- "org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleDown",
- "org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleUp"
- };
-
- static {
- javaScripts.add("org.ajax4jsf.javascript.AjaxScript");
- javaScripts.add("org.ajax4jsf.javascript.PrototypeScript");
- javaScripts.add("org/richfaces/renderkit/html/scripts/utils.js");
- javaScripts.add("org/richfaces/renderkit/html/scripts/panelMenu.js");
- }
-
- /**
- * Create the test case
- *
- * @param testName name of the test case
- */
- public PanelMenuComponentTest( String testName )
- {
- super( testName );
- }
-
- private UIForm form;
- private UIPanelMenu panelMenu;
- private UIPanelMenuGroup group1;
- private UIPanelMenuGroup group2;
- private UIPanelMenuGroup group3;
- private UIPanelMenuItem item1;
- private UIPanelMenuItem item2;
-
- public void setUp() throws Exception {
- super.setUp();
-
- application.addComponent("org.richfaces.panelMenu", "org.richfaces.component.html.HtmlPanelMenu");
- application.addComponent("org.richfaces.panelMenuGroup", "org.richfaces.component.html.HtmlPanelMenuGroup");
- application.addComponent("org.richfaces.panelMenuItem", "org.richfaces.component.html.HtmlPanelMenuItem");
-
- form = new HtmlForm();
- form.setId("form");
- facesContext.getViewRoot().getChildren().add(form);
-
- panelMenu = (UIPanelMenu)application.createComponent("org.richfaces.panelMenu");
- panelMenu.setId("panelMenu");
- form.getChildren().add(panelMenu);
-
- group1 = (UIPanelMenuGroup)application.createComponent("org.richfaces.panelMenuGroup");
- group1.setId("group1");
- group1.setDisabled(true);
- panelMenu.getChildren().add(group1);
-
- group2 = (UIPanelMenuGroup)application.createComponent("org.richfaces.panelMenuGroup");
- group2.setId("group2");
- panelMenu.getChildren().add(group2);
-
- item1 = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
- item1.setId("item1");
- group1.getChildren().add(item1);
-
- group3 = (UIPanelMenuGroup)application.createComponent("org.richfaces.panelMenuGroup");
- group3.setId("subgroup");
- group2.getChildren().add(group3);
-
- item2 = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
- item2.setId("item2");
- item2.setDisabled(true);
- group2.getChildren().add(item2);
-
- // Items for testing standard icons.
- UIPanelMenuItem item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
- item.setIcon("triangle");
- group2.getChildren().add(item);
-
- item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
- item.setIcon("spacer");
- group2.getChildren().add(item);
-
- item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
- item.setIcon("triangleDown");
- group2.getChildren().add(item);
-
- item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
- item.setIcon("triangleUp");
- group2.getChildren().add(item);
-
- item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
- item.setIcon("chevron");
- group2.getChildren().add(item);
-
- item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
- item.setIcon("chevronUp");
- group2.getChildren().add(item);
-
- item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
- item.setIcon("chevronDown");
- group2.getChildren().add(item);
-
- item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
- item.setIcon("disc");
- group2.getChildren().add(item);
-
- item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
- item.setIcon("grid");
- group2.getChildren().add(item);
-
- }
-
- public void tearDown() throws Exception {
- super.tearDown();
-
- item1 = null;
- item2 = null;
- group1 = null;
- group2 = null;
- form = null;
- }
-
- /**
- * Test component rendering
- *
- * @throws Exception
- */
- public void testRender() throws Exception {
- HtmlPage page = renderView();
- assertNotNull(page);
- System.out.println(page.asXml());
-
- HtmlElement div = page.getHtmlElementById(panelMenu.getClientId(facesContext));
- assertNotNull(div);
- assertEquals("div", div.getNodeName());
-
- HtmlElement firstGroupDiv = page.getHtmlElementById("tdhide" + group1.getClientId(facesContext));
- assertNotNull(firstGroupDiv);
- assertEquals("div", firstGroupDiv.getNodeName());
-
- String styleClass = firstGroupDiv.getAttributeValue("class");
- assertTrue(styleClass.contains("dr-pmenu-group-div"));
-
- HtmlElement firstGroupHide = page.getHtmlElementById("tablehide" + group1.getClientId(facesContext));
- assertNotNull(firstGroupHide);
- assertEquals("table", firstGroupHide.getNodeName());
-
- styleClass = firstGroupHide.getAttributeValue("class");
- assertTrue(styleClass.contains("dr-pmenu-top-group"));
- assertTrue(styleClass.contains("rich-pmenu-group"));
- assertTrue(styleClass.contains("rich-pmenu-disabled-element"));
- assertTrue(styleClass.contains("dr-pmenu-disabled-element"));
-
- HtmlElement subGroupDiv = page.getHtmlElementById("tdhide" + group3.getClientId(facesContext));
- assertNotNull(subGroupDiv);
- assertEquals("div", subGroupDiv.getNodeName());
-
- HtmlElement subGroupHide = page.getHtmlElementById("tablehide" + group3.getClientId(facesContext));
- assertNotNull(subGroupHide);
- assertEquals("table", subGroupHide.getNodeName());
-
- styleClass = subGroupHide.getAttributeValue("class");
- assertTrue(styleClass.contains("dr-pmenu-group"));
- assertTrue(styleClass.contains("rich-pmenu-group"));
-
- HtmlElement leftIcon = page.getHtmlElementById("leftIcon" + group1.getClientId(facesContext));
- assertNotNull(leftIcon);
- assertEquals("img", leftIcon.getNodeName());
-
- HtmlElement rightIcon = page.getHtmlElementById("rightIcon" + group1.getClientId(facesContext));
- assertNotNull(rightIcon);
- assertEquals("img", rightIcon.getNodeName());
-
- HtmlElement firstItemHide = page.getHtmlElementById("tablehide" + item1.getClientId(facesContext));
- assertNotNull(firstItemHide);
- assertEquals("table", firstItemHide.getNodeName());
-
- styleClass = firstItemHide.getAttributeValue("class");
- assertTrue(styleClass.contains("dr-pmenu-item"));
- assertTrue(styleClass.contains("rich-pmenu-item"));
-
- leftIcon = page.getHtmlElementById("leftIcon" + item1.getClientId(facesContext));
- assertNotNull(leftIcon);
- assertEquals("img", leftIcon.getNodeName());
-
- rightIcon = page.getHtmlElementById("rightIcon" + item1.getClientId(facesContext));
- assertNotNull(rightIcon);
- assertEquals("img", rightIcon.getNodeName());
-
- HtmlElement secondItemHide = page.getHtmlElementById("tablehide" + item2.getClientId(facesContext));
- assertNotNull(secondItemHide);
- assertEquals("table", secondItemHide.getNodeName());
-
- styleClass = secondItemHide.getAttributeValue("class");
- assertTrue(styleClass.contains("rich-pmenu-disabled-element"));
- }
-
- /**
- * Test style rendering
- *
- * @throws Exception
- */
- public void testRenderStyle() throws Exception {
- HtmlPage view = renderView();
- assertNotNull(view);
- List links = view.getDocumentElement().getHtmlElementsByTagName("link");
- assertEquals(1, links.size());
- HtmlElement link = (HtmlElement) links.get(0);
- assertTrue(link.getAttributeValue("href").contains("css/panelMenu.xcss"));
-
- InternetResourceBuilder builder = ResourceBuilderImpl.getInstance();
- InternetResource resource = builder.getResource("org/richfaces/renderkit/html/css/panelMenu.xcss");
- assertNotNull(resource);
- String uri = "http:" + resource.getUri(facesContext, null);
- Page page = webClient.getPage(uri);
- assertTrue(page.getWebResponse().getStatusCode() == HttpServletResponse.SC_OK);
- }
-
- /**
- * Test script rendering
- *
- * @throws Exception
- */
- public void testRenderScript() throws Exception {
- HtmlPage page = renderView();
- assertNotNull(page);
- List scripts = page.getDocumentElement().getHtmlElementsByTagName("script");
- for (Iterator it = scripts.iterator(); it.hasNext();) {
- HtmlScript item = (HtmlScript) it.next();
- String srcAttr = item.getSrcAttribute();
-
- if (StringUtils.isNotBlank(srcAttr)) {
- boolean found = false;
- for (Iterator srcIt = javaScripts.iterator(); srcIt.hasNext();)
- {
- String src = (String) srcIt.next();
-
- found = srcAttr.contains(src);
- if (found) {
- break;
- }
- }
-
- assertTrue(found);
- }
- }
- }
-
- public void testRenderImages() throws Exception {
- HtmlPage view = renderView();
- assertNotNull(view);
-
- InternetResourceBuilder builder = ResourceBuilderImpl.getInstance();
-
- for (int i = 0; i < imageResources.length; i++) {
- InternetResource resource = builder.getResource(imageResources[i]);
- assertNotNull(resource);
- String uri = "http:" + resource.getUri(facesContext, null);
- Page page = webClient.getPage(uri);
- assertTrue(page.getWebResponse().getStatusCode() == HttpServletResponse.SC_OK);
- ImageInfo info = new ImageInfo();
- info.setInput(page.getWebResponse().getContentAsStream());
- //image recognizable?
- assertTrue(info.check());
- assertEquals(ImageInfo.FORMAT_GIF, info.getFormat());
- }
- }
-}
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.component;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.faces.component.UIForm;
+import javax.faces.component.html.HtmlForm;
+import javax.servlet.http.HttpServletResponse;
+
+import org.ajax4jsf.resource.InternetResource;
+import org.ajax4jsf.resource.InternetResourceBuilder;
+import org.ajax4jsf.resource.ResourceBuilderImpl;
+import org.ajax4jsf.resource.image.ImageInfo;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.apache.commons.lang.StringUtils;
+import org.richfaces.component.UIPanelMenu;
+import org.richfaces.component.UIPanelMenuGroup;
+import org.richfaces.component.UIPanelMenuItem;
+
+import com.gargoylesoftware.htmlunit.Page;
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.gargoylesoftware.htmlunit.html.HtmlScript;
+
+/**
+ * Unit test for simple Component.
+ */
+public class PanelMenuComponentTest extends AbstractAjax4JsfTestCase {
+ private static Set javaScripts = new HashSet();
+
+ private String[] imageResources = new String[]{
+ "org.richfaces.renderkit.html.iconimages.PanelMenuIconChevron",
+ "org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronDown",
+ "org.richfaces.renderkit.html.iconimages.PanelMenuIconChevronUp",
+ "org.richfaces.renderkit.html.iconimages.PanelMenuIconDisc",
+ "org.richfaces.renderkit.html.iconimages.PanelMenuIconGrid",
+ "org.richfaces.renderkit.html.iconimages.PanelMenuIconSpacer",
+ "org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangle",
+ "org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleDown",
+ "org.richfaces.renderkit.html.iconimages.PanelMenuIconTriangleUp"
+ };
+
+ static {
+ javaScripts.add("org.ajax4jsf.javascript.AjaxScript");
+ javaScripts.add("org.ajax4jsf.javascript.PrototypeScript");
+ javaScripts.add("org/richfaces/renderkit/html/scripts/utils.js");
+ javaScripts.add("org/richfaces/renderkit/html/scripts/panelMenu.js");
+ }
+
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public PanelMenuComponentTest( String testName )
+ {
+ super( testName );
+ }
+
+ private UIForm form;
+ private UIPanelMenu panelMenu;
+ private UIPanelMenuGroup group1;
+ private UIPanelMenuGroup group2;
+ private UIPanelMenuGroup group3;
+ private UIPanelMenuItem item1;
+ private UIPanelMenuItem item2;
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ application.addComponent("org.richfaces.panelMenu", "org.richfaces.component.html.HtmlPanelMenu");
+ application.addComponent("org.richfaces.panelMenuGroup", "org.richfaces.component.html.HtmlPanelMenuGroup");
+ application.addComponent("org.richfaces.panelMenuItem", "org.richfaces.component.html.HtmlPanelMenuItem");
+
+ form = new HtmlForm();
+ form.setId("form");
+ facesContext.getViewRoot().getChildren().add(form);
+
+ panelMenu = (UIPanelMenu)application.createComponent("org.richfaces.panelMenu");
+ panelMenu.setId("panelMenu");
+ form.getChildren().add(panelMenu);
+
+ group1 = (UIPanelMenuGroup)application.createComponent("org.richfaces.panelMenuGroup");
+ group1.setId("group1");
+ group1.setDisabled(true);
+ panelMenu.getChildren().add(group1);
+
+ group2 = (UIPanelMenuGroup)application.createComponent("org.richfaces.panelMenuGroup");
+ group2.setId("group2");
+ panelMenu.getChildren().add(group2);
+
+ item1 = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
+ item1.setId("item1");
+ group1.getChildren().add(item1);
+
+ group3 = (UIPanelMenuGroup)application.createComponent("org.richfaces.panelMenuGroup");
+ group3.setId("subgroup");
+ group2.getChildren().add(group3);
+
+ item2 = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
+ item2.setId("item2");
+ item2.setDisabled(true);
+ group2.getChildren().add(item2);
+
+ // Items for testing standard icons.
+ UIPanelMenuItem item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
+ item.setIcon("triangle");
+ group2.getChildren().add(item);
+
+ item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
+ item.setIcon("spacer");
+ group2.getChildren().add(item);
+
+ item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
+ item.setIcon("triangleDown");
+ group2.getChildren().add(item);
+
+ item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
+ item.setIcon("triangleUp");
+ group2.getChildren().add(item);
+
+ item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
+ item.setIcon("chevron");
+ group2.getChildren().add(item);
+
+ item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
+ item.setIcon("chevronUp");
+ group2.getChildren().add(item);
+
+ item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
+ item.setIcon("chevronDown");
+ group2.getChildren().add(item);
+
+ item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
+ item.setIcon("disc");
+ group2.getChildren().add(item);
+
+ item = (UIPanelMenuItem)application.createComponent("org.richfaces.panelMenuItem");
+ item.setIcon("grid");
+ group2.getChildren().add(item);
+
+ }
+
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+ item1 = null;
+ item2 = null;
+ group1 = null;
+ group2 = null;
+ form = null;
+ }
+
+ /**
+ * Test component rendering
+ *
+ * @throws Exception
+ */
+ public void testRender() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ System.out.println(page.asXml());
+
+ HtmlElement div = page.getHtmlElementById(panelMenu.getClientId(facesContext));
+ assertNotNull(div);
+ assertEquals("div", div.getNodeName());
+
+ HtmlElement firstGroupDiv = page.getHtmlElementById("tdhide" + group1.getClientId(facesContext));
+ assertNotNull(firstGroupDiv);
+ assertEquals("div", firstGroupDiv.getNodeName());
+
+ String styleClass = firstGroupDiv.getAttributeValue("class");
+ assertTrue(styleClass.contains("dr-pmenu-group-div"));
+
+ HtmlElement firstGroupHide = page.getHtmlElementById("tablehide" + group1.getClientId(facesContext));
+ assertNotNull(firstGroupHide);
+ assertEquals("table", firstGroupHide.getNodeName());
+
+ styleClass = firstGroupHide.getAttributeValue("class");
+ assertTrue(styleClass.contains("dr-pmenu-top-group"));
+ assertTrue(styleClass.contains("rich-pmenu-group"));
+ assertTrue(styleClass.contains("rich-pmenu-disabled-element"));
+ assertTrue(styleClass.contains("dr-pmenu-disabled-element"));
+
+ HtmlElement subGroupDiv = page.getHtmlElementById("tdhide" + group3.getClientId(facesContext));
+ assertNotNull(subGroupDiv);
+ assertEquals("div", subGroupDiv.getNodeName());
+
+ HtmlElement subGroupHide = page.getHtmlElementById("tablehide" + group3.getClientId(facesContext));
+ assertNotNull(subGroupHide);
+ assertEquals("table", subGroupHide.getNodeName());
+
+ styleClass = subGroupHide.getAttributeValue("class");
+ assertTrue(styleClass.contains("dr-pmenu-group"));
+ assertTrue(styleClass.contains("rich-pmenu-group"));
+
+ HtmlElement leftIcon = page.getHtmlElementById("leftIcon" + group1.getClientId(facesContext));
+ assertNotNull(leftIcon);
+ assertEquals("img", leftIcon.getNodeName());
+
+ HtmlElement rightIcon = page.getHtmlElementById("rightIcon" + group1.getClientId(facesContext));
+ assertNotNull(rightIcon);
+ assertEquals("img", rightIcon.getNodeName());
+
+ HtmlElement firstItemHide = page.getHtmlElementById("tablehide" + item1.getClientId(facesContext));
+ assertNotNull(firstItemHide);
+ assertEquals("table", firstItemHide.getNodeName());
+
+ styleClass = firstItemHide.getAttributeValue("class");
+ assertTrue(styleClass.contains("dr-pmenu-item"));
+ assertTrue(styleClass.contains("rich-pmenu-item"));
+
+ leftIcon = page.getHtmlElementById("leftIcon" + item1.getClientId(facesContext));
+ assertNotNull(leftIcon);
+ assertEquals("img", leftIcon.getNodeName());
+
+ rightIcon = page.getHtmlElementById("rightIcon" + item1.getClientId(facesContext));
+ assertNotNull(rightIcon);
+ assertEquals("img", rightIcon.getNodeName());
+
+ HtmlElement secondItemHide = page.getHtmlElementById("tablehide" + item2.getClientId(facesContext));
+ assertNotNull(secondItemHide);
+ assertEquals("table", secondItemHide.getNodeName());
+
+ styleClass = secondItemHide.getAttributeValue("class");
+ assertTrue(styleClass.contains("rich-pmenu-disabled-element"));
+ }
+
+ /**
+ * Test style rendering
+ *
+ * @throws Exception
+ */
+ public void testRenderStyle() throws Exception {
+ HtmlPage view = renderView();
+ assertNotNull(view);
+ List links = view.getDocumentElement().getHtmlElementsByTagName("link");
+ assertEquals(1, links.size());
+ HtmlElement link = (HtmlElement) links.get(0);
+ assertTrue(link.getAttributeValue("href").contains("css/panelMenu.xcss"));
+
+ InternetResourceBuilder builder = ResourceBuilderImpl.getInstance();
+ InternetResource resource = builder.getResource("org/richfaces/renderkit/html/css/panelMenu.xcss");
+ assertNotNull(resource);
+ String uri = "http:" + resource.getUri(facesContext, null);
+ Page page = webClient.getPage(uri);
+ assertTrue(page.getWebResponse().getStatusCode() == HttpServletResponse.SC_OK);
+ }
+
+ /**
+ * Test script rendering
+ *
+ * @throws Exception
+ */
+ public void testRenderScript() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ List scripts = page.getDocumentElement().getHtmlElementsByTagName("script");
+ for (Iterator it = scripts.iterator(); it.hasNext();) {
+ HtmlScript item = (HtmlScript) it.next();
+ String srcAttr = item.getSrcAttribute();
+
+ if (StringUtils.isNotBlank(srcAttr)) {
+ boolean found = false;
+ for (Iterator srcIt = javaScripts.iterator(); srcIt.hasNext();)
+ {
+ String src = (String) srcIt.next();
+
+ found = srcAttr.contains(src);
+ if (found) {
+ break;
+ }
+ }
+
+ assertTrue(found);
+ }
+ }
+ }
+
+ public void testRenderImages() throws Exception {
+ HtmlPage view = renderView();
+ assertNotNull(view);
+
+ InternetResourceBuilder builder = ResourceBuilderImpl.getInstance();
+
+ for (int i = 0; i < imageResources.length; i++) {
+ InternetResource resource = builder.getResource(imageResources[i]);
+ assertNotNull(resource);
+ String uri = "http:" + resource.getUri(facesContext, null);
+ Page page = webClient.getPage(uri);
+ assertTrue(page.getWebResponse().getStatusCode() == HttpServletResponse.SC_OK);
+ ImageInfo info = new ImageInfo();
+ info.setInput(page.getWebResponse().getContentAsStream());
+ //image recognizable?
+ assertTrue(info.check());
+ assertEquals(ImageInfo.FORMAT_GIF, info.getFormat());
+ }
+ }
+}
Added: trunk/sandbox/ui/pom.xml
===================================================================
--- trunk/sandbox/ui/pom.xml (rev 0)
+++ trunk/sandbox/ui/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -0,0 +1,21 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>ui</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.sandbox</groupId>
+ <packaging>pom</packaging>
+ <artifactId>ui</artifactId>
+ <name>Richfaces Sandbox UI</name>
+ <modules>
+ <module>calendar</module>
+ <module>panelmenu</module>
+ <module>panel2</module>
+ <!--module>scrollable-grid</module-->
+ <module>simpleTogglePanel2</module>
+ </modules>
+</project>
\ No newline at end of file
Modified: trunk/sandbox/ui/scrollable-grid/pom.xml
===================================================================
--- trunk/sandbox/ui/scrollable-grid/pom.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/scrollable-grid/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,13 +1,12 @@
<?xml version="1.0"?><project>
<parent>
- <artifactId>sandbox-parent</artifactId>
- <groupId>org.richfaces</groupId>
- <version>1.0.0-SNAPSHOT</version>
+ <artifactId>ui</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
+ <version>3.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
+ <groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>scrollable-grid</artifactId>
- <version>1.0.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
@@ -62,14 +61,9 @@
</build>
<dependencies>
<dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>ajax4jsf</artifactId>
- <version>3.1.0-SNAPSHOT</version>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>impl</artifactId>
+ <version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
===================================================================
--- trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -16,14 +16,14 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
-import org.ajax4jsf.ajax.repeat.DataComponentState;
-import org.ajax4jsf.ajax.repeat.DataVisitor;
-import org.ajax4jsf.ajax.repeat.ExtendedDataModel;
-import org.ajax4jsf.ajax.repeat.Range;
-import org.ajax4jsf.ajax.repeat.UIDataAdaptor;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
-import org.ajax4jsf.framework.ajax.AjaxContext;
-import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.ajax4jsf.model.DataComponentState;
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.ExtendedDataModel;
+import org.ajax4jsf.model.Range;
+import org.ajax4jsf.component.UIDataAdaptor;
+import org.ajax4jsf.component.AjaxComponent;
+import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.event.AjaxEvent;
import org.apache.commons.collections.iterators.IteratorChain;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java
===================================================================
--- trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -8,6 +8,8 @@
import org.richfaces.event.sort.SortListener;
import org.richfaces.event.sort.SortSource;
+import javax.faces.UIColumn;
+
/**
* @author Anton Belevich
*
Modified: trunk/sandbox/ui/simpleTogglePanel2/pom.xml
===================================================================
--- trunk/sandbox/ui/simpleTogglePanel2/pom.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/simpleTogglePanel2/pom.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -1,11 +1,11 @@
<?xml version="1.0"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>ui</artifactId>
- <groupId>org.richfaces</groupId>
+ <groupId>org.richfaces.sandbox</groupId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
+ <groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>simpleTogglePanel2</artifactId>
<name>Toggle panel</name>
<build>
@@ -42,8 +42,8 @@
</build>
<dependencies>
<dependency>
- <groupId>org.richfaces</groupId>
- <artifactId>common</artifactId>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>impl</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
Modified: trunk/sandbox/ui/simpleTogglePanel2/src/main/config/component/simpleTogglePanel2.xml
===================================================================
--- trunk/sandbox/ui/simpleTogglePanel2/src/main/config/component/simpleTogglePanel2.xml 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/simpleTogglePanel2/src/main/config/component/simpleTogglePanel2.xml 2007-07-13 16:42:27 UTC (rev 1622)
@@ -23,7 +23,7 @@
<name>simpleTogglePanel2</name>
<classname>org.richfaces.taglib.SimpleTogglePanel2Tag</classname>
<superclass>
- org.ajax4jsf.framework.taglib.HtmlComponentTagBase
+ org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
</superclass>
</tag>
Modified: trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/component/UISimpleTogglePanel2.java
===================================================================
--- trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/component/UISimpleTogglePanel2.java 2007-07-13 13:14:47 UTC (rev 1621)
+++ trunk/sandbox/ui/simpleTogglePanel2/src/main/java/org/richfaces/component/UISimpleTogglePanel2.java 2007-07-13 16:42:27 UTC (rev 1622)
@@ -21,9 +21,9 @@
package org.richfaces.component;
-import org.ajax4jsf.framework.ajax.AjaxActionComponent;
-import org.ajax4jsf.framework.ajax.AjaxComponent;
-import org.ajax4jsf.framework.ajax.AjaxSource;
+import org.ajax4jsf.component.AjaxActionComponent;
+import org.ajax4jsf.component.AjaxComponent;
+import org.ajax4jsf.event.AjaxSource;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import javax.faces.component.ActionSource;
Copied: trunk/sandbox/ui/tooltip (from rev 1621, trunk/sandbox/tooltip)
17 years, 6 months
JBoss Rich Faces SVN: r1621 - in branches/3.0.2/sandbox-samples/tooltip-sample/src/main: webapp/WEB-INF and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-07-13 09:14:47 -0400 (Fri, 13 Jul 2007)
New Revision: 1621
Modified:
branches/3.0.2/sandbox-samples/tooltip-sample/src/main/java/org/richfaces/Bean.java
branches/3.0.2/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml
branches/3.0.2/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml
branches/3.0.2/sandbox-samples/tooltip-sample/src/main/webapp/pages/index.jsp
Log:
Modified: branches/3.0.2/sandbox-samples/tooltip-sample/src/main/java/org/richfaces/Bean.java
===================================================================
--- branches/3.0.2/sandbox-samples/tooltip-sample/src/main/java/org/richfaces/Bean.java 2007-07-13 13:02:25 UTC (rev 1620)
+++ branches/3.0.2/sandbox-samples/tooltip-sample/src/main/java/org/richfaces/Bean.java 2007-07-13 13:14:47 UTC (rev 1621)
@@ -26,4 +26,26 @@
*/
public class Bean {
+ String text;
+
+ String toolTipContent = "ToolTip content";
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ public String getToolTipContent() {
+ return toolTipContent;
+ }
+
+ public void setToolTipContent(String toolTipContent) {
+ this.toolTipContent = toolTipContent;
+ }
+
+
+
}
\ No newline at end of file
Modified: branches/3.0.2/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/3.0.2/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml 2007-07-13 13:02:25 UTC (rev 1620)
+++ branches/3.0.2/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/faces-config.xml 2007-07-13 13:14:47 UTC (rev 1621)
@@ -7,4 +7,10 @@
<managed-bean-class>org.richfaces.Bean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>skinBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
</faces-config>
Modified: branches/3.0.2/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/3.0.2/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml 2007-07-13 13:02:25 UTC (rev 1620)
+++ branches/3.0.2/sandbox-samples/tooltip-sample/src/main/webapp/WEB-INF/web.xml 2007-07-13 13:14:47 UTC (rev 1621)
@@ -14,6 +14,11 @@
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
<param-value>false</param-value>
</context-param>
+
+<!--context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>blueSky</param-value>
+ </context-param-->
<!--
-->
@@ -21,6 +26,11 @@
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
+ <init-param>
+ <param-name>forceparser</param-name>
+ <param-value>true</param-value>
+ </init-param>
+
</filter>
<filter-mapping>
<filter-name>ajax4jsf</filter-name>
Modified: branches/3.0.2/sandbox-samples/tooltip-sample/src/main/webapp/pages/index.jsp
===================================================================
--- branches/3.0.2/sandbox-samples/tooltip-sample/src/main/webapp/pages/index.jsp 2007-07-13 13:02:25 UTC (rev 1620)
+++ branches/3.0.2/sandbox-samples/tooltip-sample/src/main/webapp/pages/index.jsp 2007-07-13 13:14:47 UTC (rev 1621)
@@ -1,33 +1,29 @@
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.ajax4jsf.org/tooltip" prefix="tt"%>
-
+<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
<html>
<head>
<title></title>
-
</head>
<body>
<f:view>
<h:form>
- <%--h:inputText value="Input text" id="inp1" size="50">
- <tt:toolTip value="1231231">
- <f:facet name="defaultContent"><f:verbatim>DEFAULT VALUE</f:verbatim></f:facet>
- </tt:toolTip>
- </h:inputText--%>
+ <%--h:selectOneRadio binding="#{skinBean.component}" />
+ <h:commandLink action="#{skinBean.change}" value="set skin" /--%>
+ <f:verbatim>
+ <br/><br/>
+ </f:verbatim>
+ <h:inputText value="Input text with tooltip" id="inp1" size="50">
+ <tt:toolTip id="tt" followMouse="true" direction="top-right" mode="client">
+ <%--f:facet name="defaultContent"><f:verbatim>DEFAULT VALUE</f:verbatim>
+ </f:facet--%>
+ <h:outputText id="ot" value="#{bean.toolTipContent}"></h:outputText>
+ </tt:toolTip>
+ </h:inputText>
- <h:selectOneListbox value="sdfsfd" id="ddl">
- <tt:toolTip value="1231231">
- <f:facet name="defaultContent"><f:verbatim>DEFAULT VALUE DropDown</f:verbatim></f:facet>
- </tt:toolTip>
-
- </h:selectOneListbox>
-
-
-
-
- <!-- h:inputText value="ddd" onclick="toolTipAttach();alert(document.getElementById('lkjl'))"/-->
</h:form>
+
</f:view>
</body>
</html>
17 years, 6 months
JBoss Rich Faces SVN: r1620 - in branches/3.0.2/richfaces/inputnumber-slider/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-07-13 09:02:25 -0400 (Fri, 13 Jul 2007)
New Revision: 1620
Modified:
branches/3.0.2/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java
branches/3.0.2/richfaces/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
Log:
http://jira.jboss.com/jira/browse/RF-442
Modified: branches/3.0.2/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java
===================================================================
--- branches/3.0.2/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java 2007-07-13 12:53:35 UTC (rev 1619)
+++ branches/3.0.2/richfaces/inputnumber-slider/src/main/java/org/richfaces/renderkit/InputNumberSliderRendererBase.java 2007-07-13 13:02:25 UTC (rev 1620)
@@ -22,6 +22,7 @@
package org.richfaces.renderkit;
import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
import org.richfaces.component.UIInputNumberSlider;
@@ -39,5 +40,9 @@
protected boolean attributeToBoolean(UIComponent component, String attributeName) {
return getUtils().isBooleanAttribute(component, attributeName);
}
+
+ public String writeSpace() {
+ return " ";
+ }
}
\ No newline at end of file
Modified: branches/3.0.2/richfaces/inputnumber-slider/src/main/templates/inputNumberSlider.jspx
===================================================================
--- branches/3.0.2/richfaces/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2007-07-13 12:53:35 UTC (rev 1619)
+++ branches/3.0.2/richfaces/inputnumber-slider/src/main/templates/inputNumberSlider.jspx 2007-07-13 13:02:25 UTC (rev 1620)
@@ -96,9 +96,9 @@
<td id="#{clientId}Track">
<div style="position : relative">
<div id="#{clientId}Tip" class="dr-insldr-tip rich-inslider-tip #{component.attributes['tipClass']}" style="display: none;#{component.attributes['tipStyle']}">
-  </div>
+ #{this:writeSpace()}</div>
<div class="dr-insldr-handler rich-inslider-handler #{component.attributes['handleClass']}" id="#{clientId}Handle">
-  </div>
+ #{this:writeSpace()}</div>
</div>
<div class="dr-insldr-track rich-inslider-track #{component.attributes['barClass']}" style="#{component.attributes['barStyle']}">
<table class="dr-insldr-track-decor-1" cellpadding="0" cellspacing="0">
17 years, 6 months
JBoss Rich Faces SVN: r1619 - trunk/docs/ajaxguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-07-13 08:53:35 -0400 (Fri, 13 Jul 2007)
New Revision: 1619
Modified:
trunk/docs/ajaxguide/en/src/main/docbook/modules/a4jUGenvsettings.xml
trunk/docs/ajaxguide/en/src/main/docbook/modules/a4jUGfaq.xml
trunk/docs/ajaxguide/en/src/main/docbook/modules/a4jUGusingAJAX.xml
Log:
http://jira.jboss.com/jira/browse/AJSF-101
Modified: trunk/docs/ajaxguide/en/src/main/docbook/modules/a4jUGenvsettings.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/modules/a4jUGenvsettings.xml 2007-07-13 12:48:24 UTC (rev 1618)
+++ trunk/docs/ajaxguide/en/src/main/docbook/modules/a4jUGenvsettings.xml 2007-07-13 12:53:35 UTC (rev 1619)
@@ -70,6 +70,10 @@
Ajax4jsf AjaxViewHandler is not an exception. At first Ajax4jsf installs its ViewHandler in any case, so in case of two frameworks, for example Ajax4jsf + Facelets, no changes in settings are required. Although, when more then one framework (except Ajax4jsf) is used, it's possible to use the VIEW_HANDLERS parameter defining these frameworks view handlers according to its usage order in it.
For example, the
declaration:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"> <context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
@@ -195,6 +199,10 @@
<section id="Sybase EAServer">
<title>Sybase EAServer</title>
<para>The load-on-startup for the Faces Servlet had to be set to 0 in web.xml.</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
<servlet>
<servlet-name>Faces Servlet</servlet-name>
Modified: trunk/docs/ajaxguide/en/src/main/docbook/modules/a4jUGfaq.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/modules/a4jUGfaq.xml 2007-07-13 12:48:24 UTC (rev 1618)
+++ trunk/docs/ajaxguide/en/src/main/docbook/modules/a4jUGfaq.xml 2007-07-13 12:53:35 UTC (rev 1619)
@@ -140,6 +140,10 @@
generated xhtml. There are two ways for setting <property>filters</property> that could
be used in an Ajax4jsf-based application.</para>
<para> The first one:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<context-param filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
@@ -151,6 +155,10 @@
<para> Anyway, some obvious errors could damage a layout, if it happens, make sure that the
markup corresponds to the xhtml-strict specification. </para>
<para>The second one:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<filter>
<display-name>org.ajax4jsf.FastFilter</display-name>
<filter-name>ajax4jsf</filter-name>
@@ -163,6 +171,10 @@
processing. </para>
<para><emphasis role="bold">Extra information</emphasis>. </para>
<para>forceParcer parameters setting for <property>filters</property>:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<filter>
...
<init-param>
@@ -185,6 +197,10 @@
<para>This situation could happen because of conversion/validation errors on form
submission. In order to verify this, it's necessary to place this updating via
an AJAX error message inside a form:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<a4j:outputPanel ajaxRendered="true">
<h:messages/>
</a4j:outpurPanel>]]></programlisting>
Modified: trunk/docs/ajaxguide/en/src/main/docbook/modules/a4jUGusingAJAX.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/modules/a4jUGusingAJAX.xml 2007-07-13 12:48:24 UTC (rev 1618)
+++ trunk/docs/ajaxguide/en/src/main/docbook/modules/a4jUGusingAJAX.xml 2007-07-13 12:53:35 UTC (rev 1619)
@@ -293,6 +293,10 @@
</emphasis> framework method that is called on the <emphasis >
<property>"Session Expiration"</property>
</emphasis> event.</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[A4J.AJAX.onExpired = function(loc,expiredMsg){
// Custom Developer Code
};
17 years, 6 months
JBoss Rich Faces SVN: r1618 - in branches/3.0.2/sandbox/tooltip/src/main: java/org/richfaces/component and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-07-13 08:48:24 -0400 (Fri, 13 Jul 2007)
New Revision: 1618
Modified:
branches/3.0.2/sandbox/tooltip/src/main/config/component/toolTip.xml
branches/3.0.2/sandbox/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
branches/3.0.2/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
branches/3.0.2/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
branches/3.0.2/sandbox/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx
Log:
Modified: branches/3.0.2/sandbox/tooltip/src/main/config/component/toolTip.xml
===================================================================
--- branches/3.0.2/sandbox/tooltip/src/main/config/component/toolTip.xml 2007-07-13 12:28:37 UTC (rev 1617)
+++ branches/3.0.2/sandbox/tooltip/src/main/config/component/toolTip.xml 2007-07-13 12:48:24 UTC (rev 1618)
@@ -16,10 +16,9 @@
<classname>org.richfaces.taglib.ToolTipTag</classname>
<superclass>org.ajax4jsf.framework.taglib.HtmlComponentTagBase</superclass>
</tag>
-
<property>
- <name>onactivate</name>
+ <name>oncomplete</name>
<classname>java.lang.String</classname>
<description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
@@ -31,7 +30,7 @@
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
- <name>ondeactivate</name>
+ <name>onhide</name>
<classname>java.lang.String</classname>
<description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
@@ -49,7 +48,7 @@
<name>event</name>
<classname>java.lang.String</classname>
<description>event that triggers the tooltip appearance (default = onmouseover)</description>
- <defaultvalue><![CDATA["onmouseover"]]></defaultvalue>
+ <defaultvalue><![CDATA["mouseover"]]></defaultvalue>
</property>
<property>
<name>mode</name>
Modified: branches/3.0.2/sandbox/tooltip/src/main/java/org/richfaces/component/UIToolTip.java
===================================================================
--- branches/3.0.2/sandbox/tooltip/src/main/java/org/richfaces/component/UIToolTip.java 2007-07-13 12:28:37 UTC (rev 1617)
+++ branches/3.0.2/sandbox/tooltip/src/main/java/org/richfaces/component/UIToolTip.java 2007-07-13 12:48:24 UTC (rev 1618)
@@ -1,9 +1,20 @@
package org.richfaces.component;
+import java.io.IOException;
+import java.util.Set;
+
import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.FacesEvent;
-public abstract class UIToolTip extends UIComponentBase{
+import org.ajax4jsf.framework.ajax.AjaxChildrenEncoder;
+import org.ajax4jsf.framework.ajax.AjaxContext;
+import org.ajax4jsf.framework.ajax.AjaxEvent;
+import org.richfaces.renderkit.html.ToolTipRenderer;
+public abstract class UIToolTip extends UIComponentBase implements AjaxChildrenEncoder{
+
public static final String COMPONENT_TYPE = "org.richfaces.toolTip";
public static final String CONTENT_FACET_NAME = "defaultContent";
@@ -47,17 +58,17 @@
public abstract void setStyleClass(String styleClass);
- public abstract String getOnactivate();
+ public abstract String getOncomplete();
- public abstract void setOnactivate(String onactivate);
+ public abstract void setOncomplete(String oncomplete);
public abstract String getOnshow();
public abstract void setOnshow(String onshow);
- public abstract String getOndeactivate();
+ public abstract String getOnhide();
- public abstract void setOndeactivate(String ondeactivate);
+ public abstract void setOnhide(String onhide);
public abstract String getOnclick();
@@ -79,4 +90,33 @@
public abstract void setOnmouseover(String onmouseover);
+ public void broadcast(FacesEvent event) throws AbortProcessingException {
+
+ super.broadcast(event);
+
+ if (event instanceof AjaxEvent) {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
+ ajaxContext.getAjaxAreasToRender().add(this.getClientId(facesContext) + "content");
+ ajaxContext.addRegionsFromComponent(this);
+ }
+ }
+
+ public void encodeAjaxChild(FacesContext context, String path, Set ids,
+ Set renderedAreas) throws IOException {
+
+ if(ids.contains(this.getClientId(context) + "content")){
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+ ToolTipRenderer r = (ToolTipRenderer)getRenderer(context);
+ r.encodeTooltipText(context, this);
+ ajaxContext.getAjaxRenderedAreas().add(this.getClientId(context) + "content");
+ } else {
+ // todo
+// AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+// ajaxContext.e
+
+ }
+
+ }
+
}
Modified: branches/3.0.2/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java
===================================================================
--- branches/3.0.2/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-07-13 12:28:37 UTC (rev 1617)
+++ branches/3.0.2/sandbox/tooltip/src/main/java/org/richfaces/renderkit/html/ToolTipRenderer.java 2007-07-13 12:48:24 UTC (rev 1618)
@@ -1,13 +1,18 @@
package org.richfaces.renderkit.html;
import java.io.IOException;
+import java.util.Map;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.ajax4jsf.framework.renderer.AjaxComponentRendererBase;
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.skin.Skin;
+import org.ajax4jsf.framework.util.javascript.JSFunction;
+import org.ajax4jsf.framework.util.javascript.JSFunctionDefinition;
import org.richfaces.component.UIToolTip;
public class ToolTipRenderer extends AjaxComponentRendererBase{
@@ -17,69 +22,6 @@
return org.richfaces.component.UIToolTip.class;
}
- public void encodeChildren(FacesContext context, UIComponent component)
- throws IOException {
- // TODO Auto-generated method stub
- super.encodeChildren(context, component);
- }
-
- /**
- *
- * @param context
- * @param component 'tl'-top left, 'tr'-top right, 'bl'-bottom left, 'br'-bottom right
- * @param position
- * @throws IOException
- */
- /*
- public void insertImage(FacesContext context, UIComponent component, Object position) throws IOException{
- //if(position == null) throw new IllegalArgumentException("Parameter passed is invalid, use \"0 - 3\"");
- String posStr = (String)position;
- drawImageElement(context, component, posStr);
- }
- */
-
- /**
- *
- * @param writer
- * @param component
- * @param position 0-tl, 1-tr, 2-bl, 3-br
- * @throws IOException
- */
-/*
- private void drawImageElement(FacesContext context, UIComponent component, String position) throws IOException{
- String imageSrc = getImageSrc(context, component, position);
- ResponseWriter writer = context.getResponseWriter();
- int h = 15; //width(context);
- writer.startElement("img", component);
- writer.writeAttribute("src", imageSrc, null);
- writer.writeAttribute("alt", "", null);
- writer.writeAttribute("vspace", "0", null);
- writer.writeAttribute("hspace", "0", null);
- writer.writeAttribute("class", "corner", null);
- writer.writeAttribute("style", "display:block; ", null);
- writer.writeAttribute("width", String.valueOf(h), null);
- writer.writeAttribute("height", String.valueOf(h), null);
- writer.endElement("img");
- }
-*/
-/*
- protected String getImageSrc(FacesContext context, UIComponent component, String position){
- String color = getBgColor(context, component);
- String imageSource = null;
- if(position == null || position.equals("tl")) {
- imageSource = getResource(TopLeftToolTipCornerImage.class.getName()).getUri(context, color);
- } else if(position.equals("tr")){
- imageSource = getResource(TopRightToolTipCornerImage.class.getName()).getUri(context, color);
- } else if (position.equals("bl")){
- imageSource = getResource(BottomLeftToolTipCornerImage.class.getName()).getUri(context, color);
- } else if (position.equals("br")){
- imageSource = getResource(BottomRightToolTipCornerImage.class.getName()).getUri(context, color);
- }
-
- return imageSource;
- }
-*/
-
public String getBgColor(FacesContext context, UIComponent component){
Skin skin = getSkin(context);
String color = (String) skin.getParameter(context,"headerBackgroundColor");
@@ -99,30 +41,36 @@
context.getResponseWriter().write(value.toString());
}
}
-/*
- protected String getTopRightDivStyle(FacesContext context, UIComponent component){
- String trImgSrc = getImageSrc(context, component, "tr");
- return "background: url(" + trImgSrc + ") no-repeat top right;";
- }
- protected String getBottomRightDivStyle(FacesContext context, UIComponent component){
- String brImgSrc = getImageSrc(context, component, "br");
- return "background: url(" + brImgSrc + ") no-repeat top right;";
- }
-
- protected String getMainDivStyle(FacesContext context, UIComponent component){
- String style = "width: 250px;background-color:" + getBgColor(context, component) + ";color: " + getColor(context, component) + ";";
- return style;
- }
- protected String getTRImageSrc(FacesContext context, UIComponent component){
- return getImageSrc(context, component, "tr");
+ public String insertAjaxFunction(FacesContext context, UIComponent component){
+ JSFunction function = AjaxRendererUtils.buildAjaxFunction(component, context);
+ component.getClientId(context);
+
+ Map eventOptions = AjaxRendererUtils.buildEventOptions(context, component);
+
+ String refreshTooltipPointerExp = ";" + getJsVarName(context, component) + ".toolTip = $('" + component.getClientId(context) + "');";
+
+ if(eventOptions.containsKey("oncomplete")){
+ JSFunctionDefinition onComplete = (JSFunctionDefinition)eventOptions.get("oncomplete");
+ onComplete.addToBody(refreshTooltipPointerExp);
+ eventOptions.put("oncomplete", onComplete);
+ } else {
+ JSFunctionDefinition onComplete = new JSFunctionDefinition();
+ onComplete.addParameter("request");
+ onComplete.addParameter("event");
+ onComplete.addParameter("data");
+ onComplete.addToBody(refreshTooltipPointerExp);
+ eventOptions.put("oncomplete", onComplete);
+
+ }
+
+ function.addParameter(eventOptions);
+
+ return function.toScript();
}
- protected String getBRImageSrc(FacesContext context, UIComponent component){
- return getImageSrc(context, component, "br");
- }
-*/
+
public void insertScript(FacesContext context, UIComponent component) throws IOException{
UIToolTip toolTip = (UIToolTip)component;
@@ -135,27 +83,62 @@
String quot = "\"";
StringBuffer script = new StringBuffer();
//
- script.append("var tooltip1 = ").
+ String event = toolTip.getEvent();
+ if(event.startsWith("on")){
+ event = event.substring(2);
+ }
+ String events = "{event:\"" + event + "\",onshow:\"" + toolTip.getOnshow() +
+ "\",oncomplete:\"" + toolTip.getOncomplete() + "\",onhide:\"" + toolTip.getOnhide() +
+ "\"}";
+ //script.append("var tooltip1 = ").
- append("new ToolTip(").append(quot).append("tooltip" + toolTip.getClientId(context).toString()).append(quot).append(comma).
+ script.append(getJsVarName(context, toolTip) + " = ").
+ append("new ToolTip(" + events).append(comma).append(quot).append( toolTip.getClientId(context)).append(quot).append(comma).
append(quot).append(parentClientId).append(quot).append(comma).
append(quot).append(toolTip.getMode()).append(quot).append(comma).
append(toolTip.isDisabled()).append(comma).
append(quot).append(toolTip.getDirection()).append(quot).append(comma).
append(toolTip.isFollowMouse()).append(comma).
append(toolTip.getHorizontalOffset()).append(comma).
- append(toolTip.getVerticalOffset()).append(");\n");
+ append(toolTip.getVerticalOffset()).append(comma).
+ append("\"").append(insertAjaxFunction(context, component)).append("\");\n");
ret.append(script.toString());
//
//ret.append("function toolTipAttach(){tooltip1.attachParentEvents() }\n");
ret.append("\n</script>");
-
ResponseWriter writer = context.getResponseWriter();
writer.write(ret.toString());
}
+
+ private String getJsVarName(FacesContext context, UIComponent component){
+ return "window.tooltip" + component.getClientId(context).replaceAll("[^A-Za-z0-9_]", "_");
+ }
+
+ protected void doDecode(FacesContext context, UIComponent component) {
+
+ UIToolTip tooltip = (UIToolTip)component;
+
+ String clientId = tooltip.getClientId(context);
+
+ if(context.getExternalContext().getRequestParameterMap().containsKey(clientId)){
+ if("ajax".equals(tooltip.getMode())){
+ new AjaxEvent(component).queue();
+ }
+ }
+ }
+
+ public void encodeTooltipText(FacesContext context, UIToolTip component) throws IOException {
+ ResponseWriter responseWriter = context.getResponseWriter();
+ responseWriter.startElement("span", component);
+ responseWriter.writeAttribute("id", component.getClientId(context) + "content", null);
+ responseWriter.write(component.getValue() != null ? component.getValue() : "");
+ super.renderChildren(context, component);
+ responseWriter.endElement("span");
+ }
+
}
Modified: branches/3.0.2/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- branches/3.0.2/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-07-13 12:28:37 UTC (rev 1617)
+++ branches/3.0.2/sandbox/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-07-13 12:48:24 UTC (rev 1618)
@@ -3,14 +3,14 @@
var IE = document.all?true:false;
// If NS -- that is, !IE -- then set up for mouse capture
-if (!IE) document.captureEvents(Event.MOUSEMOVE)
+//if (!IE) document.captureEvents(Event.MOUSEMOVE)
// Temporary variables to hold mouse x-y pos.s
-var cursorX = 0;
-var cursorY = 0;
+//var cursorX = 0;
+//var cursorY = 0;
// Main function to retrieve mouse x-y pos.s
-
+/*
function getMouseXY(e) {
if (IE) { // grab the x-y pos.s if browser is IE
cursorX = event.clientX + document.body.scrollLeft;
@@ -29,18 +29,16 @@
// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;
-/*
-var isIE = false;
-alert("RichFaces.navigatorType().indexOf('MSIE', 0) != -1 -- " + RichFaces.navigatorType().indexOf('MSIE', 0) != -1);
-if(RichFaces.navigatorType().indexOf('MSIE', 0) != -1){
- isIE = true;
-}
*/
-
ToolTip = Class.create();
ToolTip.prototype = {
- initialize:function(id, parentId, mode, disabled, direction, followMouse, horizontalOffset, verticalOffset){
+ initialize:function(events, id, parentId, mode, disabled, direction, followMouse, horizontalOffset, verticalOffset, ajaxFunction){
+ this.event = events.event;
+ this.onshow = events.onshow;
+ this.oncomplete = events.oncomplete;
+ this.onhide = events.onhide;
+
this.id = id;
this.parentId = parentId;
this.mode = mode;
@@ -49,6 +47,7 @@
this.followMouse = followMouse;
this.horizontalOffset = horizontalOffset;
this.verticalOffset = verticalOffset;
+ this.ajaxExecuteString = ajaxFunction;
this.toolTip = $(id);
this.toolTip.style.visibility='hidden';
@@ -84,35 +83,68 @@
this.attachParentEvents();
this.parentAttached = true;
}
+ Event.stopObserving(document.getElementsByTagName("body")[0], "mousemove", this.attachOnLoadEvents.bindAsEventListener(this), false);
}
},
attachParentEvents: function(){
if(this.followMouse){
- Event.observe(this.parent, "mousemove", this.doShow.bindAsEventListener(this), false);
+ Event.observe(this.parent, this.event, this.doShow.bindAsEventListener(this), false);
} else {
- Event.observe(this.parent, "mouseover", this.doShow.bindAsEventListener(this), false);
+ Event.observe(this.parent, this.event, this.doShow.bindAsEventListener(this), false);
}
-
+ /*
+ if(this.mode == 'ajax'){
+ Event.observe(this.parent, this.event, this.evecuteAjax.bindAsEventListener(this), false);
+ }
+ */
Event.observe(this.parent, "mouseout", this.doHide.bindAsEventListener(this), false);
},
- doShow: function(){
+ doShow: function(e){
+ if (IE) { // grab the x-y pos.s if browser is IE
+ cursorX = e.clientX + document.body.scrollLeft;
+ cursorY = e.clientY + document.body.scrollTop;
+ } else { // grab the x-y pos.s if browser is NS
+ cursorX = e.pageX;
+ cursorY = e.pageY;
+ }
+ // catch possible negative values in NS4
+ if (cursorX < 0){cursorX = 0;}
+ if (cursorY < 0){cursorY = 0;}
- this.setToolTipPosition();
+ this.setToolTipPosition(e, cursorX, cursorY);
if(this.iframe){
-
this.iframe.style.top = parseInt(this.toolTip.style.top) - this.toolTipBorderHeight;
this.iframe.style.left = parseInt(this.toolTip.style.left) - this.toolTipBorderWidth;
this.iframe.style.display = "block";
}
this.toolTip.style.display = "block";
+
+ //
+ //Event.stopObserving(this.parent, this.event, this.doShow.bindAsEventListener(this), false);
+ if(this.mode == 'ajax'){
+ var event = e;
+ eval(this.ajaxExecuteString);
+
+
+ this.toolTip = $(this.id);
+ this.setToolTipPosition();
+ if(this.iframe){
+ this.iframe.style.top = parseInt(this.toolTip.style.top) - this.toolTipBorderHeight;
+ this.iframe.style.left = parseInt(this.toolTip.style.left) - this.toolTipBorderWidth;
+ this.iframe.style.display = "block";
+ }
+ this.toolTip.style.display = "block";
+ }
},
- doHide: function(){
+ doHide: function(e){
this.toolTip.style.display = "none";
if(this.iframe){
this.iframe.style.display = "none";
}
+
+ //Event.observe(this.parent, this.event, this.doShow.bindAsEventListener(this), false);
},
doEnable: function(){
@@ -122,7 +154,7 @@
this.disabled = true;
},
- setToolTipPosition: function(){
+ setToolTipPosition: function(e, cursorX, cursorY){
var windowDim = this.windowSize();
if(this.direction == "top-left"){
@@ -192,8 +224,11 @@
}
return [wWidth,wHeight];
}
+ /*
+ evecuteAjax: function (e){
+ var event = e;
+ eval(this.ajaxExecuteString);
+ }
+ */
-
- //
-
}
\ No newline at end of file
Modified: branches/3.0.2/sandbox/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx
===================================================================
--- branches/3.0.2/sandbox/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx 2007-07-13 12:28:37 UTC (rev 1617)
+++ branches/3.0.2/sandbox/tooltip/src/main/templates/org/richfaces/htmltooltip.jspx 2007-07-13 12:48:24 UTC (rev 1618)
@@ -17,31 +17,25 @@
<h:scripts>
new org.ajax4jsf.framework.resource.PrototypeScript(),
new org.ajax4jsf.framework.ajax.AjaxScript(),
- /org/richfaces/renderkit/html/scripts/browser_info.js,
/org/richfaces/renderkit/html/scripts/utils.js,
/org/richfaces/renderkit/html/scripts/tooltip.js
</h:scripts>
<f:clientid var="clientId"/>
- <div id="tooltip#{clientId}" style="position: absolute; display : none;z-index:99" class="dr-rich-tool-tip rich-tool-tip">
- <jsp:scriptlet>
- <![CDATA[if(component.getFacet("defaultContent")!=null && component.getFacet("defaultContent").isRendered()) {]]>
- </jsp:scriptlet>
- <!-- span class="dr-rich-tool-tip rich-tool-tip"-->
- <u:insertFacet name="defaultContent" />
- <!-- /span-->
- <jsp:scriptlet>
- <![CDATA[} else {]]>
- </jsp:scriptlet>
- <!-- span class="dr-rich-tool-tip rich-tool-tip"-->
- #{component.attributes['value']}
- <!-- /span-->
- <jsp:scriptlet>
- <![CDATA[}]]>
- </jsp:scriptlet>
-
- <f:call name="insertScript"/>
+ <div id="#{clientId}" style="position: absolute; display : none;z-index:99" class="dr-rich-tool-tip rich-tool-tip">
+ <span id="#{clientId}script" style="display:none">
+ <f:call name="insertScript"/>
+ </span>
+
+ <span id="#{clientId}defaultContent" style="display:none">
+ <u:insertFacet name="defaultContent" />
+ </span>
+
+ <vcp:body>
+ <f:call name="encodeTooltipText"/>
+ </vcp:body>
+
</div>
<!-- f:call name="utils.encodeEndFormIfNessesary"/-->
</f:root>
17 years, 6 months
JBoss Rich Faces SVN: r1617 - trunk/docs/ajaxguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-07-13 08:28:37 -0400 (Fri, 13 Jul 2007)
New Revision: 1617
Modified:
trunk/docs/ajaxguide/en/src/main/docbook/included/commandButton.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/commandLink.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/form.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/htmlCommandLink.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/include.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/jsFunction.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/loadScript.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/loadStyle.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/log.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/mediaOutput.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/outputPanel.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/page.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/poll.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/region.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/repeat.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/status.xml
trunk/docs/ajaxguide/en/src/main/docbook/included/support.xml
Log:
http://jira.jboss.com/jira/browse/AJSF-101
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/commandButton.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/commandButton.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/commandButton.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -37,6 +37,10 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxCommandButton;
...
HtmlAjaxCommandButton myButton = new HtmlAjaxCommandButton();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/commandLink.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/commandLink.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/commandLink.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -41,6 +41,10 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxCommandLink;
...
HtmlAjaxCommandLink myLink = new HtmlAjaxCommandLink();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/form.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/form.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/form.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -41,6 +41,10 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.AjaxForm;
...
AjaxForm myForm = new AjaxForm();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/htmlCommandLink.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/htmlCommandLink.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/htmlCommandLink.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -34,11 +34,19 @@
<section>
<title>Creating on a page</title>
<para>Component definition on a page is the same as for the original component from the JSF HTML library.</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<a4j:htmlCommandLink value="value" action="action"/>
]]></programlisting>
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import javax.faces.component.html.HtmlCommandLink;
...
HtmlCommandLink myForm = new HtmlCommandLink();
@@ -50,6 +58,10 @@
<para>The difference with the original component is that all hidden fields required for command links with the child <emphasis role="bold">
<property><f:param></property>
</emphasis> elements are always rendered and it doesn't depend on links rendering on the initial page. It solves the problem with invalid links that weren't rendered on a page immediately, but after some AJAX request.</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<a4j:form>
...
<a4j:htmlComandLink action="action" value="link" rendered="#{bean.rendered}">
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/include.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/include.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/include.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -34,17 +34,29 @@
<section>
<title>Creating on a page</title>
<para>To use the component, it's necessary to place the following strings on a page:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<h:panelGroup id="wizard">
<a4j:include viewId="/pages/include/first.xhtml" />
</h:panelGroup>
]]></programlisting>
<para>For navigation inside a page defined in viewId any components responsible for AJAX requests to the server generation are used.</para>
<para>For example, the following component on the page "/pages/include/first.xhtml"</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
<a4j:commandButton action="next" reRender="wizard"/>
...
]]></programlisting>
<para>And in faces-config it's defined:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<navigation-rule>
<from-view-id>/pages/include/first.xhtml</from-view-id>
<navigation-case>
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/jsFunction.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/jsFunction.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/jsFunction.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -34,6 +34,10 @@
<section>
<title>Creating on a page</title>
<para>Simple component definition example:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
<head>
<script>
@@ -51,6 +55,10 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxFunction;
...
HtmlAjaxFunction myFunction = new HtmlAjaxFunction();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/loadScript.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/loadScript.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/loadScript.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -33,11 +33,19 @@
<section>
<title>Creating on a page</title>
<para>Simple Component definition on a page:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<a4j:loadScript src="scripts/someScript.js"/>
]]></programlisting>
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlLoadScript;
...
HtmlLoadScript myScript = new HtmlLoadScript();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/loadStyle.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/loadStyle.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/loadStyle.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -33,11 +33,19 @@
<section>
<title>Creating on a page</title>
<para>Simple Component definition on a page:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<a4j:loadStyle src="styles/style.css"/>
]]></programlisting>
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlLoadStyle;
...
HtmlLoadScript myStyle = new HtmlLoadStyle();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/log.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/log.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/log.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -38,6 +38,10 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.AjaxLog;
...
AjaxLog myLog = new AjaxLog();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/mediaOutput.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/mediaOutput.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/mediaOutput.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -34,6 +34,10 @@
<title>Creating on a page</title>
<para>To use the component it's necessary to define it on a page and set Java methods for data keeping and data transmission to output stream. </para>
<para>Component definition on a page for graphical data output</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[...
<a4j:mediaOutput element="img" cacheable="false" session="true"
createContent="#{paintBean.paint}" value="#{paintData}"
@@ -41,6 +45,10 @@
...
]]></programlisting>
<para>Here is the content of paintData that is a bean containing output data</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[package demo;
public class PaintData implements Serializable{
@@ -50,6 +58,10 @@
...
]]></programlisting>
<para>The Paint method of the paintBean class is a method transmitting graphical data into output stream.</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[public void paint(OutputStream out, Object data) throws IOException{
<!--...Some code that puts binary data to "out" Stream-->
}
@@ -57,6 +69,10 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.MediaOutput;
...
MediaOutput myMedia = new MediaOutput ();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/outputPanel.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/outputPanel.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/outputPanel.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -38,6 +38,10 @@
<section>
<title>Creating on a page</title>
<para>Here is the simplest way for a component creation on a page.</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<a4j:outputPanel>
<!--...Some Content Inside-->
</a4j:outputPanel>
@@ -45,6 +49,10 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxOutputPanel;
...
HtmlAjaxOutputPanel myPanel = new HtmlAjaxOutputPanel();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/page.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/page.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/page.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -46,6 +46,10 @@
</f:view>
]]></programlisting>
<para>This structure is rendered as:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<HTML>
<HEAD>
<!--...Head Content here-->
@@ -57,6 +61,10 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.components.Page;
...
Page myPage = new Page();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/poll.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/poll.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/poll.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -34,6 +34,10 @@
<section>
<title>Creating on a page</title>
<para>To use this component it's necessary only to set an update interval.</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[<a4j:poll interval="1000" reRender="someDataTable" action="#{bean.action1}"/>
]]></programlisting>
<para>The <emphasis role="bold">
@@ -44,6 +48,10 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.AjaxPoll;
...
AjaxPoll myPoll = new AjaxPoll();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/region.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/region.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/region.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -40,6 +40,10 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxRegion;
...
HtmlAjaxRegion newRegion = new HtmlAjaxRegion();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/repeat.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/repeat.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/repeat.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -45,6 +45,10 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxRepeat;
...
HtmlAjaxRepeat repeater = new HtmlAjaxRepeat ();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/status.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/status.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/status.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -60,6 +60,10 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxStatus;
...
HtmlAjaxStatus myStatus = new HtmlAjaxStatus();
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/support.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/support.xml 2007-07-13 10:10:16 UTC (rev 1616)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/support.xml 2007-07-13 12:28:37 UTC (rev 1617)
@@ -49,6 +49,10 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import org.ajax4jsf.ajax.html.HtmlAjaxSupport;
...
HtmlAjaxSupport mySupport = new HtmlAjaxSupport();>]]></programlisting>
@@ -63,6 +67,10 @@
</h:inputText>
]]></programlisting>
<para>Is decoded on the page as:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="XML"><![CDATA[
<input onkeyup="A4J.AJAX.Submit( Some request parameters )"/>
]]></programlisting>
17 years, 6 months
JBoss Rich Faces SVN: r1616 - branches/3.0.2/richfaces/inputnumber-slider/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-07-13 06:10:16 -0400 (Fri, 13 Jul 2007)
New Revision: 1616
Modified:
branches/3.0.2/richfaces/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
Log:
Fix type for valid property.
Modified: branches/3.0.2/richfaces/inputnumber-slider/src/main/config/component/inputNumberSlider.xml
===================================================================
--- branches/3.0.2/richfaces/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2007-07-13 09:40:58 UTC (rev 1615)
+++ branches/3.0.2/richfaces/inputnumber-slider/src/main/config/component/inputNumberSlider.xml 2007-07-13 10:10:16 UTC (rev 1616)
@@ -241,7 +241,7 @@
</property>
<property hidden="true">
<name>valid</name>
- <classname>java.lang.String</classname>
+ <classname>boolean</classname>
</property>
</component>
</components>
\ No newline at end of file
17 years, 6 months