JBoss Rich Faces SVN: r230 - trunk/richfaces-samples.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-03-30 19:15:15 -0400 (Fri, 30 Mar 2007)
New Revision: 230
Modified:
trunk/richfaces-samples/pom.xml
Log:
Remove servlet-api.jar from generated war
Modified: trunk/richfaces-samples/pom.xml
===================================================================
--- trunk/richfaces-samples/pom.xml 2007-03-30 18:52:09 UTC (rev 229)
+++ trunk/richfaces-samples/pom.xml 2007-03-30 23:15:15 UTC (rev 230)
@@ -150,8 +150,49 @@
</repositories>
<profiles>
…
[View More]<profile>
- <id>jsf12</id>
+ <id>jsf1_1</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ <property>
+ <name>jsfVersion</name>
+ <value>1.1</value>
+ </property>
+ </activation>
<build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <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>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.0</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>jsf1_2</id>
+ <build>
<defaultGoal>jetty:run</defaultGoal>
<plugins>
<plugin>
[View Less]
18 years
JBoss Rich Faces SVN: r229 - in trunk/richfaces/tree: src/main/java/org/richfaces/component/xml and 8 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-30 14:52:09 -0400 (Fri, 30 Mar 2007)
New Revision: 229
Added:
trunk/richfaces/tree/src/test/java/org/richfaces/component/xml/
trunk/richfaces/tree/src/test/java/org/richfaces/component/xml/TreeDataBuilderTest.java
trunk/richfaces/tree/src/test/resources/
trunk/richfaces/tree/src/test/resources/org/
trunk/richfaces/tree/src/test/resources/org/richfaces/
trunk/richfaces/tree/src/test/resources/org/richfaces/component/
trunk/richfaces/tree/src/…
[View More]test/resources/org/richfaces/component/xml/
trunk/richfaces/tree/src/test/resources/org/richfaces/component/xml/XmlTreeDataBuilderTest.xml
Modified:
trunk/richfaces/tree/
trunk/richfaces/tree/src/main/java/org/richfaces/component/xml/XmlTreeDataBuilder.java
trunk/richfaces/tree/src/test/java/org/richfaces/component/TreeNodeTest.java
Log:
XMLTreeDataBuilder corrections
Test for XMLTreeDataBuilder created
Property changes on: trunk/richfaces/tree
___________________________________________________________________
Name: svn:ignore
- target
.settings
.classpath
.project
+ target
.settings
.classpath
.project
.clover
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/component/xml/XmlTreeDataBuilder.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/xml/XmlTreeDataBuilder.java 2007-03-30 15:05:29 UTC (rev 228)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/xml/XmlTreeDataBuilder.java 2007-03-30 18:52:09 UTC (rev 229)
@@ -80,18 +80,12 @@
int currentId = 0;
if (idsList.size() <= level) {
- for (int i = idsList.size(); i < level; i++) {
+ for (int i = idsList.size(); i <= level; i++) {
idsList.add(null);
}
-
- idsList.add(new Integer(0));
} else {
Integer integer = (Integer) idsList.get(level);
- if (integer != null) {
- currentId = integer.intValue() + 1;
- } else {
- //zero currentId is ok
- }
+ currentId = integer.intValue() + 1;
}
Set exclusions = (Set) exclusionSets.get(level);
@@ -117,17 +111,18 @@
TreeNode node = new TreeNodeImpl();
node.setData(xmlNodeData);
- if (this.treeNode != null) {
- this.treeNode.addChild(id, node);
- this.treeNodesList.add(this.treeNode);
- }
-
+ this.treeNode.addChild(id, node);
+ this.treeNodesList.add(this.treeNode);
this.treeNode = node;
}
public void body(String namespace, String name, String text)
throws Exception {
super.body(namespace, name, text);
+
+ if (text != null) {
+ ((XmlNodeData) this.treeNode.getData()).setText(text.trim());
+ }
}
public void end(String namespace, String name) throws Exception {
@@ -145,9 +140,7 @@
exclusionSets.remove(exclusionSets.size() - 1);
}
- if (!this.treeNodesList.isEmpty()) {
- this.treeNode = (TreeNode) this.treeNodesList.remove(this.treeNodesList.size() - 1);
- }
+ this.treeNode = (TreeNode) this.treeNodesList.remove(this.treeNodesList.size() - 1);
}
}
@@ -163,6 +156,7 @@
}
};
digester.setRules(rulesBase);
+ digester.setNamespaceAware(true);
digester.parse(inputSource);
return rule.treeNode;
Modified: trunk/richfaces/tree/src/test/java/org/richfaces/component/TreeNodeTest.java
===================================================================
--- trunk/richfaces/tree/src/test/java/org/richfaces/component/TreeNodeTest.java 2007-03-30 15:05:29 UTC (rev 228)
+++ trunk/richfaces/tree/src/test/java/org/richfaces/component/TreeNodeTest.java 2007-03-30 18:52:09 UTC (rev 229)
@@ -35,6 +35,8 @@
*/
public class TreeNodeTest extends TestCase {
+ private final static Object NODE_ID = new Integer(0);
+
protected TreeNode node = null;
protected static final int TEST_CHILDREN_COUNT = 7;
@@ -69,13 +71,13 @@
}
public void testIsLeaf() {
- node.addChild("first", new TreeNodeImpl());
+ node.addChild(NODE_ID, new TreeNodeImpl());
assertFalse(node.isLeaf());
}
public void testParent() {
TreeNode child = new TreeNodeImpl();
- node.addChild("first", child);
+ node.addChild(NODE_ID, child);
assertEquals(child.getParent(), node);
}
@@ -84,10 +86,18 @@
firstNode.setData("First Node");
TreeNode secondNode = new TreeNodeImpl();
secondNode.setData("Second Node");
- node.addChild("first", firstNode);
+ node.addChild(NODE_ID, firstNode);
node.addChild("second", secondNode);
node.addChild("third", new TreeNodeImpl());
assertTrue(node.getChild("second").getData().equals("Second Node"));
}
+ public void testRemove() {
+ assertTrue(node.isLeaf());
+ node.addChild(NODE_ID, new TreeNodeImpl());
+ assertFalse(node.isLeaf());
+ node.removeChild(NODE_ID);
+ assertTrue(node.isLeaf());
+ }
+
}
Added: trunk/richfaces/tree/src/test/java/org/richfaces/component/xml/TreeDataBuilderTest.java
===================================================================
--- trunk/richfaces/tree/src/test/java/org/richfaces/component/xml/TreeDataBuilderTest.java (rev 0)
+++ trunk/richfaces/tree/src/test/java/org/richfaces/component/xml/TreeDataBuilderTest.java 2007-03-30 18:52:09 UTC (rev 229)
@@ -0,0 +1,102 @@
+/**
+ * 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.xml;
+
+import java.io.InputStream;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.richfaces.component.TreeNode;
+import org.xml.sax.InputSource;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Nick Belaevski - nbelaevski(a)exadel.com
+ * created 30.03.2007
+ *
+ */
+public class TreeDataBuilderTest extends TestCase {
+ private TreeNode treeNode = null;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ InputStream stream = this.getClass().getResourceAsStream("/org/richfaces/component/xml/XmlTreeDataBuilderTest.xml");
+ try {
+ treeNode = XmlTreeDataBuilder.build(new InputSource(stream));
+ } finally {
+ stream.close();
+ }
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testIds() {
+ assertNotNull(treeNode);
+
+ new Visitor() {
+ public void visit(Object key, TreeNode node) {
+ XmlNodeData data = (XmlNodeData) node.getData();
+ if (data == null) {
+ return ;
+ }
+
+ if ("servlet-name-id".equals(data.getName())) {
+ assertEquals("1", key);
+ } else if ("servlet-class-id".equals(data.getName())) {
+ assertEquals("0", key);
+ } else if ("load-on-startup-id".equals(data.getName())) {
+ assertEquals("2", key);
+ } else if ("description".equals(data.getName())) {
+ assertEquals("Tree demo", data.getText());
+ } else if ("web-app".equals(data.getName())) {
+ assertNotNull(node.toString());
+ assertEquals("", data.getText());
+ assertEquals("urn:testing", data.getNamespace());
+
+ Map attributes = data.getAttributes();
+ assertEquals("2.4", attributes.get("version"));
+ assertEquals("testId", attributes.get("id"));
+ assertEquals(2, attributes.size());
+ }
+
+ assertNotNull(data.toString());
+ }
+ }.accept(null, treeNode);
+ }
+}
+
+abstract class Visitor {
+ public void accept(Object key, TreeNode node) {
+ this.visit(key, node);
+ Iterator iterator = node.getChildren();
+ while (iterator.hasNext()) {
+ Map.Entry entry = (Map.Entry) iterator.next();
+
+ this.accept(entry.getKey(), (TreeNode) entry.getValue());
+ }
+ }
+
+ public abstract void visit(Object key, TreeNode node);
+}
Added: trunk/richfaces/tree/src/test/resources/org/richfaces/component/xml/XmlTreeDataBuilderTest.xml
===================================================================
--- trunk/richfaces/tree/src/test/resources/org/richfaces/component/xml/XmlTreeDataBuilderTest.xml (rev 0)
+++ trunk/richfaces/tree/src/test/resources/org/richfaces/component/xml/XmlTreeDataBuilderTest.xml 2007-03-30 18:52:09 UTC (rev 229)
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<web-app version="2.4" id="testId" xmlns="urn:testing">
+ <description>
+ Tree demo
+ </description>
+ <display-name id="displayName">tree-demo</display-name>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param id="4">
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <filter>
+ <filter-name>a4j</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>a4j</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name-id id="1">Faces Servlet</servlet-name-id>
+ <servlet-class-id>javax.faces.webapp.FacesServlet</servlet-class-id>
+ <load-on-startup-id>1</load-on-startup-id>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
[View Less]
18 years
JBoss Rich Faces SVN: r228 - in trunk/richfaces/dropdown-menu/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-03-30 11:05:29 -0400 (Fri, 30 Mar 2007)
New Revision: 228
Modified:
trunk/richfaces/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java
trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
trunk/richfaces/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx
Log:
dropdownmenu development: menuGroup support added
Modified: trunk/richfaces/dropdown-menu/src/main/java/…
[View More]org/richfaces/renderkit/html/DropDownMenuRendererBase.java
===================================================================
--- trunk/richfaces/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java 2007-03-30 15:00:24 UTC (rev 227)
+++ trunk/richfaces/dropdown-menu/src/main/java/org/richfaces/renderkit/html/DropDownMenuRendererBase.java 2007-03-30 15:05:29 UTC (rev 228)
@@ -24,21 +24,9 @@
-import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
-import org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase;
import org.richfaces.component.UIDropDownMenu;
-import javax.faces.context.FacesContext;
-import javax.faces.component.UIComponent;
-import org.richfaces.component.UIMenuItem;
-import org.richfaces.component.UIMenuGroup;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.framework.ajax.AjaxContainer;
-public class DropDownMenuRendererBase extends HeaderResourcesRendererBase {
+public class DropDownMenuRendererBase extends MenuRendererBase {
protected Class getComponentClass() {
return UIDropDownMenu.class;
@@ -49,147 +37,4 @@
}
-
-/*
- public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
- UIDropDownMenu uiMenu = (UIDropDownMenu) component;
- List flatListOfNodes = new LinkedList();
- MenuLayerRendererHelper helper = new MenuLayerRendererHelper(context);
-
- flatten(uiMenu.getChildren(), flatListOfNodes);
-
- helper.processLayer(uiMenu);
-
- for (Iterator iter = flatListOfNodes.iterator(); iter.hasNext();) {
- UIMenuGroup node = (UIMenuGroup) iter.next();
-
- helper.processLayer(node);
- }
- }
-
- private class MenuLayerRendererHelper {
- private boolean ajaxRequest;
- private FacesContext context;
- //private PreparedTemplate template;
- private AjaxContainer ajaxContainer;
- public MenuLayerRendererHelper(FacesContext context) {
- super();
- this.context = context;
- ajaxRequest = AjaxRendererUtils.isAjaxRequest(context);
-
- if (ajaxRequest) {
- // ajaxContainer = AjaxRendererUtils. .getSubmittedAjaxContainer(context, null);
-
- }
-
- //template = getLayerTemplate();
- }
-
- public void processLayer(UIComponent layer) throws IOException{
- //determineLayerHasIcons(layer);
- String clientId = layer.getClientId(context);
- //template.encode(MenuRendererBase.this, context, layer);
- layer.encodeBegin(context);
- //if (ajaxContainer != null) {
- AjaxRendererUtils.addRegionByName(context, layer, clientId + "_iframe");
- AjaxRendererUtils.addRegionByName(context, layer, clientId + "_iframe1");
- AjaxRendererUtils.addRegionByName(context, layer, clientId + "_script");
- // ajaxContainer.addAjaxArea(clientId + "_iframe");
- // ajaxContainer.addAjaxArea(clientId + "_iframe1");
- // ajaxContainer.addAjaxArea(clientId + "_script");
- //}
- }
-
- }
-
-
- private void flatten(List kids, List flatList){
- if(kids != null){
- for (Iterator iter = kids.iterator(); iter.hasNext();) {
- UIComponent kid = (UIComponent) iter.next();
- if (kid instanceof UIMenuGroup) {
- UIMenuGroup node = (UIMenuGroup) kid;
- flatList.add(node);
- flatten(node.getChildren(), flatList);
- }
- }
- }
- }
-
-*/
- public void encodeScript(FacesContext context, UIComponent component) throws IOException {
- int showdelay = 300;
- int hideDelay = 300;
- UIDropDownMenu menu = (UIDropDownMenu) component;
-
-
- try {
- showdelay = Integer.parseInt(component.getAttributes().get("showDelay").toString());
- hideDelay = Integer.parseInt(component.getAttributes().get("hideDelay").toString());
- } catch(Exception e) {
- }
-
- StringBuffer buffer =
- new StringBuffer("new Exadel.Menu.Layer('")
- .append(component.getClientId(context))
- .append("_menu")
- .append("',")
- .append(showdelay + ")");
- buffer
- .append(".asDropDown('")
- .append(component.getClientId(context))
- .append("'");
-
- String evt = menu.getEvent();
-
- if(evt == null || evt.trim().length() == 0){
- evt = "onmouseover";
- }
-
- buffer.append(",'").append(evt).append("')");
-
-
- List kids = component.getChildren();
- for (Iterator iter = kids.iterator(); iter.hasNext();) {
- UIComponent kid = (UIComponent) iter.next();
- String itemId = null;
- if (kid instanceof UIMenuItem) {
- itemId = kid.getClientId(context);
- }
- else if (kid instanceof UIMenuGroup) {
- itemId = "ref" + kid.getClientId(context);
- }
-
- if(itemId != null){
- // if (kid instanceof UIMenuItem) {
- //UIMenuItem styledComponent = (UIMenuItem) kid;
- buffer
- .append(".addItem('")
- .append(itemId)
- .append("','")
- .append("null")
- .append("','")
- .append("null")
- .append("','")
- .append("null")
- .append("','")
- .append("null")
- .append("')");
- // }
- }
- }
- ResponseWriter out = context.getResponseWriter();
- String script =buffer.append(";").toString();
- out.write(script);
-
- //return buffer.append(";").toString();
-
- //new Exadel.Menu.Layer("#{clientId}","300").asDropDown("#{clientId}","onmouseover");
- }
-
-
-
-
-
-
}
Modified: trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2007-03-30 15:00:24 UTC (rev 227)
+++ trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2007-03-30 15:05:29 UTC (rev 228)
@@ -446,13 +446,13 @@
}
this.event = e;
- //this.element = Event.findElement(e, 'div').firstChild();
- this.element = Event.findElement(e, 'div').childNodes[2].firstChild;
+ this.element = Event.findElement(e, 'div');
+// .childNodes[2].firstChild;
this.layer = $(layer);
this.show = function() {
if (!Exadel.Menu.Layers.isVisible(this.layer)){
- //this.reposition();
+ this.reposition();
Exadel.Menu.Layers.LMPopUp(this.layer, false);
}
}.bind(this);
@@ -574,13 +574,12 @@
Exadel.Menu.Layer.prototype = {
- initialize: function(id,showDelay,hideDelay){
+ initialize: function(id,delay){
Exadel.Menu.Layers.listl.push(id);
this.id = id;
this.layer = $(id);
this.level = 0;
- this.showDelay = showDelay;
- this.hideDelay=hideDelay;
+ this.delay = delay;
Exadel.Menu.fitLayerToContent(this.layer);
this.items = new Array();
Exadel.Menu.Layers.layers[id] = this;
@@ -670,7 +669,7 @@
showMe: function(e){
this.closeSiblings(e);
//LOG.a4j_debug('show me ' + this.id +' ' +this.level);
- Exadel.Menu.Layers.showMenuLayer(this.id, e, this.showDelay);
+ Exadel.Menu.Layers.showMenuLayer(this.id, e, this.delay);
Exadel.Menu.Layers.levels[this.level] = this;
@@ -705,15 +704,15 @@
var item = {};
item.hoverClass = hoverClass;// = hoverClass.split(" ");
item.plainClass = plainClass;//.split(" ");
- item.hoverStyle = Exadel.extractCamelizedRules(hoverStyle);
- item.plainStyle = Exadel.extractCamelizedRules(plainStyle);
+ if (hoverStyle) item.hoverStyle = Exadel.extractCamelizedRules(hoverStyle);
+ if (plainStyle) item.plainStyle = Exadel.extractCamelizedRules(plainStyle);
item.id = itemId;
item.obj = $(itemId);
item.menu = this;
this.items[itemId] = item;
var onmouseover =
function(e){
- $(this.id).className = this.hoverClass;
+ if (this.hoverClass) $(this.id).className = this.hoverClass;
if(this.hoverStyle) {
Exadel.replaceStyleHash($(this.id), this.plainStyle, this.hoverStyle);
}
@@ -721,7 +720,7 @@
}.bindAsEventListener(item);
var onmouseout =
function(e){
- $(this.id).className = this.plainClass;
+ if (this.plainClass) $(this.id).className = this.plainClass;
if(this.hoverStyle) {
Exadel.replaceStyleHash($(this.id), this.hoverStyle, this.plainStyle);
}
@@ -754,7 +753,7 @@
if (!e) {
e = window.event;
}
- Exadel.Menu.Layers.showDropDownLayer(this.id, topLevel, e,this.showDelay);
+ Exadel.Menu.Layers.showDropDownLayer(this.id, topLevel, e,this.delay);
}.bindAsEventListener(this);
if(!onEvt){
Modified: trunk/richfaces/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx
===================================================================
--- trunk/richfaces/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx 2007-03-30 15:00:24 UTC (rev 227)
+++ trunk/richfaces/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx 2007-03-30 15:05:29 UTC (rev 228)
@@ -39,28 +39,11 @@
<jsp:scriptlet>
<![CDATA[}]]>
</jsp:scriptlet>
-
- <div id="#{clientId}_menu"
- style="width: #{component.attributes['popupWidth']}; visibility: hidden; z-index:100;"
- class="dr-menu-list-border dr-menu-list-position rich-menu-list-border rich-menu-list-position">
- <div class="dr-menu-list-bg rich-menu-list-bg">
- <script type="text/javascript">
- <f:call name="encodeScript" />
- </script>
- <f:call name="renderChildren" />
- </div>
- </div>
- <iframe class="underneath_iframe" id="#{clientId}_menu_iframe" style="position:absolute">
- </iframe>
- <iframe class="underneath_iframe" id="#{clientId}_menu_iframe1" style="position:absolute">
- </iframe>
+ <vcp:body>
+ <f:call name="renderChildren" />
+ </vcp:body>
</div>
-
-
-
-
-
</f:root>
\ No newline at end of file
[View Less]
18 years
JBoss Rich Faces SVN: r227 - trunk/richfaces/menu-components/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-03-30 11:00:24 -0400 (Fri, 30 Mar 2007)
New Revision: 227
Modified:
trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx
Log:
menuGroup development
Modified: trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx
===================================================================
--- trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx 2007-03-30 14:55:53 UTC (rev 226)
+++ …
[View More]trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx 2007-03-30 15:00:24 UTC (rev 227)
@@ -32,7 +32,9 @@
onmouseout="this.className='dr-menu-item dr-menu-item-enabled rich-menu-group'; #{component.attributes['onmouseout']}"
onmouseover="this.className='dr-menu-item dr-menu-item-hover rich-menu-group rich-menu-group-hover'; #{component.attributes['onmouseover']}"
onmousemove="#{component.attributes['onmousemove']}">
-
+
+ <span id="ref#{clientId}:icon"
+ class="dr-menu-icon rich-menu-item-icon #{component.attributes['iconClass']}">
<jsp:scriptlet>
<![CDATA[if(component.getFacet("icon")!=null && component.getFacet("icon").isRendered()) {]]>
</jsp:scriptlet>
@@ -40,48 +42,30 @@
<jsp:scriptlet>
<![CDATA[} else if (component.getAttributes().get("icon")!=null) {]]>
</jsp:scriptlet>
- <img class="dr-menu-icon rich-menu-item-icon #{component.attributes['iconClass']}"
- width="16" height="16"
+ <img width="16" height="16"
style="#{component.attributes['iconStyle']}"
src="#{component.attributes['icon']}"/>
<jsp:scriptlet>
<![CDATA[} else {]]>
</jsp:scriptlet>
- <img class="dr-menu-icon rich-menu-item-icon #{component.attributes['iconClass']}"
- width="16" height="16"
+ <img width="16" height="16"
style="#{component.attributes['iconStyle']}"
src="#{spacer}"/>
<jsp:scriptlet><![CDATA[}]]></jsp:scriptlet>
+ </span>
<a id="ref#{clientId}:anchor" class="dr-menu-label rich-menu-item-label" href="#">#{component.attributes['value']}</a>
+ <div id="#{clientId}" class="dr-menu-node rich-menu-item-folder"/>
- <div id="#{clientId}" class="dr-menu-node rich-menu-item-folder">
- <div id="ref#{clientId}_menu"
- style="z-index:100;"
- class="dr-menu-list-border dr-menu-sublist rich-menu-list-border rich-menu-sublist">
- <div class="dr-menu-list-bg rich-menu-list-bg">
- <f:call name="renderChildren"/>
- </div>
- </div>
- <iframe class="underneath_iframe"
- id="ref#{clientId}_menu_iframe"
- style="position:absolute;">
- </iframe>
- <iframe class="underneath_iframe"
- id="ref#{clientId}_menu_iframe1"
- style="position:absolute;">
- </iframe>
- <script type="text/javascript" id="ref#{clientId}_script">
- <f:call name="getScript"/>
- </script>
- </div>
</div>
<jsp:scriptlet><![CDATA[} else {]]></jsp:scriptlet>
- <div id="#{clientId}"
+ <div id="ref#{clientId}"
class="dr-menu-item dr-menu-item-disabled rich-menu-group rich-menu-group-disabled #{component.attributes['styleClass']}"
style="#{component.attributes['style']}">
+ <span id="ref#{clientId}:icon"
+ class="dr-menu-icon rich-menu-item-icon-disabled #{component.attributes['iconClass']}">
<jsp:scriptlet>
<![CDATA[if(component.getFacet("iconDisabled")!=null && component.getFacet("iconDisabled").isRendered()) {]]>
</jsp:scriptlet>
@@ -89,18 +73,17 @@
<jsp:scriptlet>
<![CDATA[} else if (component.getAttributes().get("iconDisabled")!=null) {]]>
</jsp:scriptlet>
- <img class="dr-menu-icon rich-menu-item-icon-disabled #{component.attributes['iconClass']}"
- width="16" height="16"
+ <img width="16" height="16"
style="#{component.attributes['iconStyle']}"
src="#{component.attributes['iconDisabled']}"/>
<jsp:scriptlet>
<![CDATA[} else {]]>
</jsp:scriptlet>
- <img class="dr-menu-icon rich-menu-item-icon-disabled #{component.attributes['iconClass']}"
- width="16" height="16"
+ <img width="16" height="16"
style="#{component.attributes['iconStyle']}"
src="#{spacer}"/>
<jsp:scriptlet><![CDATA[}]]></jsp:scriptlet>
+ </span>
<span class="rich-menu-item-label-disabled">#{component.attributes['value']}</span>
[View Less]
18 years
JBoss Rich Faces SVN: r226 - in trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html: template and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-03-30 10:55:53 -0400 (Fri, 30 Mar 2007)
New Revision: 226
Added:
trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html/template/
trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html/template/htmlMenuLayer.jspx
Log:
template for menu layer added
Added: trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html/template/htmlMenuLayer.jspx
===================================================…
[View More]================
--- trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html/template/htmlMenuLayer.jspx (rev 0)
+++ trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html/template/htmlMenuLayer.jspx 2007-03-30 14:55:53 UTC (rev 226)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:template xmlns:f='http:/jsf.exadel.com/template'
+ xmlns:u='http:/jsf.exadel.com/template/util'
+ xmlns="http://www.w3.org/1999/xhtml">
+
+ <div style="visibility: hidden; z-index:100;"
+ class="dr-menu-list-border rich-menu-list-border">
+ <f:attribute name="id">
+ <f:call name="utils.clientId"/>
+ <f:verbatim value="_menu"/>
+ </f:attribute>
+ <div class="dr-menu-list-bg rich-menu-list-bg">
+ <f:call name="encodeItems"/>
+ </div>
+ </div>
+
+ <iframe class="underneath_iframe" style="position:absolute" >
+ <f:attribute name="id">
+ <f:call name="utils.clientId"/>
+ <f:verbatim value="_menu_iframe"/>
+ </f:attribute>
+ </iframe>
+ <iframe class="underneath_iframe" style="position:absolute" >
+ <f:attribute name="id">
+ <f:call name="utils.clientId"/>
+ <f:verbatim value="_menu_iframe1"/>
+ </f:attribute>
+ </iframe>
+ <script type="text/javascript">
+ <f:attribute name="id">
+ <f:call name="utils.clientId"/>
+ <f:verbatim value="_menu_script"/>
+ </f:attribute>
+ <f:verbatim>
+ <f:call name="encodeScript"/>
+ </f:verbatim>
+ </script>
+</f:template>
[View Less]
18 years
JBoss Rich Faces SVN: r225 - trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-03-30 10:53:31 -0400 (Fri, 30 Mar 2007)
New Revision: 225
Added:
trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuRendererBase.java
Modified:
trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuGroupRendererBase.java
Log:
menuGroup development
Modified: trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuGroupRendererBase.java
===================================================…
[View More]================
--- trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuGroupRendererBase.java 2007-03-30 14:48:51 UTC (rev 224)
+++ trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuGroupRendererBase.java 2007-03-30 14:53:31 UTC (rev 225)
@@ -22,20 +22,15 @@
package org.richfaces.renderkit.html;
import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase;
import org.richfaces.component.UIMenuGroup;
-import org.richfaces.component.UIMenuItem;
-public class MenuGroupRendererBase extends HeaderResourcesRendererBase {
+public class MenuGroupRendererBase extends MenuRendererBase {
protected Class getComponentClass() {
return UIMenuGroup.class;
@@ -45,50 +40,7 @@
return true;
}
- public void getScript(FacesContext context, UIComponent component) throws IOException {
- StringBuffer buffer =
- new StringBuffer("new Exadel.Menu.Layer('")
- .append("ref")
- .append(component.getClientId(context)+"_menu")
- .append("',")
- .append( "300 )");
- //component.getAttributes().get("showDelay")
- buffer.append(".asSubMenu('")
- .append(component.getParent().getClientId(context)+"_menu")
- .append("','")
- .append("ref")
- .append(component.getClientId(context))
- .append("')");
-
- //.append(component.getParent().getClientId(context)+"_menu")
- //.append("ref")
- List children = component.getChildren();
- for(Iterator it = children.iterator();it.hasNext();) {
- UIComponent kid = (UIComponent)it.next();
- String itemId = null;
- if (kid instanceof UIMenuItem) {
- itemId = kid.getClientId(context);
- } else if (kid instanceof UIMenuGroup) {
- itemId = "ref" + kid.getClientId(context);
- }
- if(itemId != null){
- buffer
- .append(".addItem('")
- .append(itemId)
- .append("','")
- .append("null")
- .append("','")
- .append("null")
- .append("','")
- .append("null")
- .append("','")
- .append("null")
- .append("')");
- }
- }
- ResponseWriter out = context.getResponseWriter();
- String script =buffer.append(";").toString();
- out.write(script);
- }
-
+ public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+ }
+
}
Added: trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuRendererBase.java
===================================================================
--- trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuRendererBase.java (rev 0)
+++ trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuRendererBase.java 2007-03-30 14:53:31 UTC (rev 225)
@@ -0,0 +1,153 @@
+/**
+ * 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.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
+import org.ajax4jsf.framework.renderer.HeaderResourcesRendererBase;
+import org.ajax4jsf.framework.renderer.compiler.HtmlCompiler;
+import org.ajax4jsf.framework.renderer.compiler.PreparedTemplate;
+import org.richfaces.component.UIMenuGroup;
+import org.richfaces.component.UIMenuItem;
+import org.richfaces.component.UIMenuSeparator;
+
+
+
+public abstract class MenuRendererBase extends HeaderResourcesRendererBase {
+
+ public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+ List flatListOfNodes = new LinkedList();
+ MenuLayerRendererHelper helper = new MenuLayerRendererHelper(context);
+
+ flatten(component.getChildren(), flatListOfNodes);
+ helper.processLayer(component);
+
+ for (Iterator iter = flatListOfNodes.iterator(); iter.hasNext();) {
+ UIMenuGroup node = (UIMenuGroup) iter.next();
+ helper.processLayer(node);
+ }
+ }
+
+ public void encodeItems(FacesContext context, UIComponent component) throws IOException {
+ List kids = component.getChildren();
+ Iterator it = kids.iterator();
+ while (it.hasNext()) {
+ UIComponent kid = (UIComponent)it.next();
+ if (kid instanceof UIMenuGroup || kid instanceof UIMenuItem || kid instanceof UIMenuSeparator) {
+ renderChild(context, kid);
+ }
+ }
+
+ }
+
+ private class MenuLayerRendererHelper {
+ private FacesContext context;
+ private PreparedTemplate template;
+
+ public MenuLayerRendererHelper(FacesContext context) {
+ super();
+ this.context = context;
+ template = HtmlCompiler.compileResource("org/richfaces/renderkit/html/template/htmlMenuLayer.jspx");
+
+ }
+
+ public void processLayer(UIComponent layer) throws IOException{
+ String clientId = layer.getClientId(context);
+ template.encode(MenuRendererBase.this, context, layer);
+ AjaxRendererUtils.addRegionByName(context, layer, clientId + "_menu_iframe");
+ AjaxRendererUtils.addRegionByName(context, layer, clientId + "_menu_iframe1");
+ AjaxRendererUtils.addRegionByName(context, layer, clientId + "_menu_script");
+ }
+
+ }
+
+
+ private void flatten(List kids, List flatList){
+ if(kids != null){
+ for (Iterator iter = kids.iterator(); iter.hasNext();) {
+ UIComponent kid = (UIComponent) iter.next();
+ if (kid instanceof UIMenuGroup) {
+ UIMenuGroup node = (UIMenuGroup) kid;
+ flatList.add(node);
+ flatten(node.getChildren(), flatList);
+ }
+ }
+ }
+ }
+
+ public void encodeScript(FacesContext context, UIComponent component) throws IOException {
+ StringBuffer buffer =
+ new StringBuffer("new Exadel.Menu.Layer('")
+ .append(component.getClientId(context)+"_menu")
+ .append("',")
+ .append(component.getAttributes().get("showDelay"))
+ .append( ")");
+ if (component instanceof UIMenuGroup) {
+ buffer.append(".asSubMenu('")
+ .append(component.getParent().getClientId(context)+"_menu")
+ .append("','")
+ .append("ref")
+ .append(component.getClientId(context))
+ .append("')");
+ } else {
+ buffer
+ .append(".asDropDown('")
+ .append(component.getClientId(context))
+ .append("'");
+
+ String evt = (String) component.getAttributes().get("event");
+ if(evt == null || evt.trim().length() == 0){
+ evt = "onmouseover";
+ }
+ buffer.append(",'").append(evt).append("')");
+
+ }
+ List children = component.getChildren();
+ for(Iterator it = children.iterator();it.hasNext();) {
+ UIComponent kid = (UIComponent)it.next();
+ String itemId = null;
+ if (kid instanceof UIMenuItem) {
+ itemId = kid.getClientId(context);
+ } else if (kid instanceof UIMenuGroup) {
+ itemId = "ref" + kid.getClientId(context);
+ }
+ if(itemId != null){
+ buffer
+ .append(".addItem('")
+ .append(itemId)
+ .append("')");
+ }
+ }
+ ResponseWriter out = context.getResponseWriter();
+ String script =buffer.append(";").toString();
+ out.write(script);
+ }
+
+}
[View Less]
18 years
JBoss Rich Faces SVN: r224 - trunk/richfaces/menu-components/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-03-30 10:48:51 -0400 (Fri, 30 Mar 2007)
New Revision: 224
Modified:
trunk/richfaces/menu-components/src/main/config/component/menucomponents.xml
Log:
some default values added
Modified: trunk/richfaces/menu-components/src/main/config/component/menucomponents.xml
===================================================================
--- trunk/richfaces/menu-components/src/main/config/component/menucomponents.xml 2007-03-30 14:48:12 UTC (rev 223)
+++ trunk/richfaces/…
[View More]menu-components/src/main/config/component/menucomponents.xml 2007-03-30 14:48:51 UTC (rev 224)
@@ -65,13 +65,20 @@
<name>event</name>
<classname>java.lang.String</classname>
<description>Defines the event on the representation element that triggers the menu's appearance.</description>
+ <defaultvalue>"onmouseover"</defaultvalue>
</property>
<property>
<name>showDelay</name>
- <classname>int</classname>
+ <classname>java.lang.Integer</classname>
<description>Delay between event and menu showing.</description>
+ <defaultvalue><![CDATA[new Integer(300)]]></defaultvalue>
</property>
-
+ <property>
+ <name>hideDelay</name>
+ <classname>java.lang.Integer</classname>
+ <description>Delay between losing focus and menu closing.</description>
+ <defaultvalue><![CDATA[new Integer(300)]]></defaultvalue>
+ </property>
<property>
<name>onmousemove</name>
<classname>java.lang.String</classname>
@@ -173,7 +180,8 @@
<property>
<name>mode</name>
<classname>java.lang.String</classname>
- <description>Set the submission mode. If not defined, inherited from parent dropDownMenu component.</description>
+ <description>Set the submission mode (ajax, server(Default), none)</description>
+ <defaultvalue>"server"</defaultvalue>
</property>
<!-- Command attributes -->
[View Less]
18 years
JBoss Rich Faces SVN: r223 - trunk/richfaces/menu-components/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: F.antonov
Date: 2007-03-30 10:48:12 -0400 (Fri, 30 Mar 2007)
New Revision: 223
Modified:
trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
Log:
MenuItem component development.
Modified: trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
===================================================================
--- trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2007-03-30 14:47:42 UTC (rev …
[View More]222)
+++ trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2007-03-30 14:48:12 UTC (rev 223)
@@ -27,8 +27,7 @@
style="#{component.attributes['style']}"
onclick="#{onclick}"
>
-
- <!-- f:call name="encodeAttributeParameters" / -->
+
<span id="#{clientId}:icon"
class="#{iconClass}">
<jsp:scriptlet><![CDATA[
@@ -46,11 +45,26 @@
]]></jsp:scriptlet>
</span>
+ <jsp:scriptlet><![CDATA[
+ if (((org.richfaces.component.UIMenuItem) component).isDisabled()) {
+ ]]></jsp:scriptlet>
+ <span id="#{clientId}:disabled"
+ class="#{labelClass}">
+ #{component.attributes['value']}
+ <f:call name="renderChildren" />
+ </span>
+ <jsp:scriptlet><![CDATA[
+ } else {
+ ]]></jsp:scriptlet>
<a id="#{clientId}:anchor"
href="#"
class="#{labelClass}">
#{component.attributes['value']}
<f:call name="renderChildren" />
- </a>
+ </a>
+ <jsp:scriptlet><![CDATA[
+ }
+ ]]></jsp:scriptlet>
+
</div>
</f:root>
\ No newline at end of file
[View Less]
18 years
JBoss Rich Faces SVN: r222 - trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: F.antonov
Date: 2007-03-30 10:47:42 -0400 (Fri, 30 Mar 2007)
New Revision: 222
Modified:
trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
Log:
MenuItem component development.
Modified: trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
===================================================================
--- trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/…
[View More]MenuItemRendererBase.java 2007-03-30 14:47:10 UTC (rev 221)
+++ trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2007-03-30 14:47:42 UTC (rev 222)
@@ -112,6 +112,7 @@
StringBuffer scriptValue = new StringBuffer();
scriptValue.append("this.className='dr-menu-item dr-menu-item-enabled rich-menu-item rich-menu-item-enabled ")
.append(getStringAttributeOrEmptyString(menuItem, "styleClass") + "'; ");
+ processInlineStyles(context, menuItem, scriptValue, false);
//if (null == getIconFacet(menuItem)) {
scriptValue.append("document.getElementById('" + menuItem.getClientId(context) + ":icon').className='dr-menu-icon rich-menu-item-icon ")
.append(getStringAttributeOrEmptyString(menuItem, "iconClass") + "'; ");
@@ -124,6 +125,7 @@
scriptValue.append("this.className='dr-menu-item dr-menu-item-hover rich-menu-item rich-menu-item-hover ")
.append(getStringAttributeOrEmptyString(menuItem, "styleClass") + " ")
.append(getStringAttributeOrEmptyString(menuItem, "selectClass") + "'; ");
+ processInlineStyles(context, menuItem, scriptValue, true);
//if (null == getIconFacet(menuItem)) {
scriptValue.append("document.getElementById('" + menuItem.getClientId(context) + ":icon').className='dr-menu-icon dr-menu-icon-selected rich-menu-item-icon rich-menu-item-icon-selected ")
.append(getStringAttributeOrEmptyString(menuItem, "iconClass") + "'; ");
@@ -202,6 +204,24 @@
parent = parent.getParent();
}
return UIMenuItem.MODE_SERVER;
- }
+ }
+ private void processInlineStyles(FacesContext context, UIMenuItem menuItem, StringBuffer buffer, boolean isOnmouseover) {
+ Object style = menuItem.getAttributes().get("style");
+ Object selectStyle = menuItem.getAttributes().get("selectStyle");
+ if (null == selectStyle) {
+ return;
+ }
+
+ buffer.append("document.getElementById('" + menuItem.getClientId(context) + "').style.cssText='");
+ if (null != style) {
+ buffer.append(style.toString() + "; ");
+ }
+ if (isOnmouseover) {
+ buffer.append(selectStyle.toString() + ";';");
+ } else {
+ buffer.append("';");
+ }
+ }
+
}
[View Less]
18 years
JBoss Rich Faces SVN: r221 - trunk/richfaces/menu-components/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: F.antonov
Date: 2007-03-30 10:47:10 -0400 (Fri, 30 Mar 2007)
New Revision: 221
Modified:
trunk/richfaces/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java
Log:
MenuItem component development.
Modified: trunk/richfaces/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java
===================================================================
--- trunk/richfaces/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java 2007-03-30 13:26:07 …
[View More]UTC (rev 220)
+++ trunk/richfaces/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java 2007-03-30 14:47:10 UTC (rev 221)
@@ -21,15 +21,21 @@
package org.richfaces.component;
+import javax.faces.component.ActionSource;
+
import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+import org.ajax4jsf.framework.ajax.AjaxComponent;
+import org.ajax4jsf.framework.ajax.AjaxSource;
/**
* JSF component class
*
*/
-public abstract class UIMenuItem extends AjaxActionComponent {
+public abstract class UIMenuItem extends AjaxActionComponent implements AjaxComponent, AjaxSource, ActionSource {
+ public static final String COMPONENT_TYPE = "org.richfaces.DropDownMenu";
+
public static final String MODE_AJAX = "ajax";
public static final String MODE_SERVER = "server";
public static final String MODE_NONE = "none";
[View Less]
18 years