You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ba...@apache.org on 2006/01/13 13:00:42 UTC
svn commit: r368695 - in /myfaces/tomahawk/trunk/tomahawk/src/main:
java/org/apache/myfaces/custom/navmenu/jscookmenu/
resources/org/apache/myfaces/custom/navmenu/jscookmenu/resource/ tld/
tld/entities/
Author: baranda
Date: Fri Jan 13 04:00:28 2006
New Revision: 368695
URL: http://svn.apache.org/viewcvs?rev=368695&view=rev
Log:
Fixes MYFACES-27. Now JsCookMenu can be immediate=false and javascript fixed.
Added:
myfaces/tomahawk/trunk/tomahawk/src/main/tld/entities/faces_immediate_attribute.xml (with props)
Modified:
myfaces/tomahawk/trunk/tomahawk/src/main/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlCommandJSCookMenu.java
myfaces/tomahawk/trunk/tomahawk/src/main/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlJSCookMenuTag.java
myfaces/tomahawk/trunk/tomahawk/src/main/resources/org/apache/myfaces/custom/navmenu/jscookmenu/resource/MyFacesHack.js
myfaces/tomahawk/trunk/tomahawk/src/main/tld/entities/ui_command_attributes.xml
myfaces/tomahawk/trunk/tomahawk/src/main/tld/tomahawk.tld
Modified: myfaces/tomahawk/trunk/tomahawk/src/main/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlCommandJSCookMenu.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/tomahawk/src/main/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlCommandJSCookMenu.java?rev=368695&r1=368694&r2=368695&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/tomahawk/src/main/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlCommandJSCookMenu.java (original)
+++ myfaces/tomahawk/trunk/tomahawk/src/main/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlCommandJSCookMenu.java Fri Jan 13 04:00:28 2006
@@ -52,11 +52,6 @@
return COMPONENT_FAMILY;
}
- public boolean isImmediate()
- {
- return true;
- }
-
public void setLayout(String layout)
{
_layout = layout;
Modified: myfaces/tomahawk/trunk/tomahawk/src/main/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlJSCookMenuTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/tomahawk/src/main/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlJSCookMenuTag.java?rev=368695&r1=368694&r2=368695&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/tomahawk/src/main/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlJSCookMenuTag.java (original)
+++ myfaces/tomahawk/trunk/tomahawk/src/main/java/org/apache/myfaces/custom/navmenu/jscookmenu/HtmlJSCookMenuTag.java Fri Jan 13 04:00:28 2006
@@ -15,6 +15,7 @@
*/
package org.apache.myfaces.custom.navmenu.jscookmenu;
+import org.apache.myfaces.renderkit.JSFAttr;
import org.apache.myfaces.taglib.UIComponentTagBase;
import org.apache.myfaces.component.UserRoleAware;
@@ -39,6 +40,7 @@
// User Role support
private String _enabledOnUserRole;
private String _visibleOnUserRole;
+ private String _immediate;
public void release() {
super.release();
@@ -67,6 +69,8 @@
setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole);
setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole);
+
+ setBooleanProperty(component, JSFAttr.IMMEDIATE_ATTR, _immediate);
}
public void setLayout(String layout)
@@ -87,5 +91,10 @@
public void setEnabledOnUserRole(String enabledOnUserRole)
{
_enabledOnUserRole = enabledOnUserRole;
+ }
+
+ public void setImmediate(String immediate)
+ {
+ _immediate = immediate;
}
}
Modified: myfaces/tomahawk/trunk/tomahawk/src/main/resources/org/apache/myfaces/custom/navmenu/jscookmenu/resource/MyFacesHack.js
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/tomahawk/src/main/resources/org/apache/myfaces/custom/navmenu/jscookmenu/resource/MyFacesHack.js?rev=368695&r1=368694&r2=368695&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/tomahawk/src/main/resources/org/apache/myfaces/custom/navmenu/jscookmenu/resource/MyFacesHack.js (original)
+++ myfaces/tomahawk/trunk/tomahawk/src/main/resources/org/apache/myfaces/custom/navmenu/jscookmenu/resource/MyFacesHack.js Fri Jan 13 04:00:28 2006
@@ -25,7 +25,7 @@
window.open (link, '_self');
} else {
// Link is a JSF action
- var dummyForm = document.forms['linkDummyForm'];
+ var dummyForm = document.forms[target];
dummyForm.elements['jscook_action'].value = link;
dummyForm.submit();
}
Added: myfaces/tomahawk/trunk/tomahawk/src/main/tld/entities/faces_immediate_attribute.xml
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/tomahawk/src/main/tld/entities/faces_immediate_attribute.xml?rev=368695&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/tomahawk/src/main/tld/entities/faces_immediate_attribute.xml (added)
+++ myfaces/tomahawk/trunk/tomahawk/src/main/tld/entities/faces_immediate_attribute.xml Fri Jan 13 04:00:28 2006
@@ -0,0 +1,14 @@
+<attribute>
+ <name>immediate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ <description>
+ A boolean value that identifies the phase during which action events
+ should fire. During normal event processing, action methods and
+ action listener methods are fired during the "invoke application"
+ phase of request processing. If this attribute is set to "true",
+ these methods are fired instead at the end of the "apply request
+ values" phase.
+ </description>
+</attribute>
Propchange: myfaces/tomahawk/trunk/tomahawk/src/main/tld/entities/faces_immediate_attribute.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/tomahawk/trunk/tomahawk/src/main/tld/entities/faces_immediate_attribute.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision
Modified: myfaces/tomahawk/trunk/tomahawk/src/main/tld/entities/ui_command_attributes.xml
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/tomahawk/src/main/tld/entities/ui_command_attributes.xml?rev=368695&r1=368694&r2=368695&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/tomahawk/src/main/tld/entities/ui_command_attributes.xml (original)
+++ myfaces/tomahawk/trunk/tomahawk/src/main/tld/entities/ui_command_attributes.xml Fri Jan 13 04:00:28 2006
@@ -1,5 +1,6 @@
<!-- UICommand attributes -->
&ui_component_attributes;
+&faces_immediate_attribute;
<attribute>
<name>action</name>
@@ -25,20 +26,6 @@
listener method accepts a parameter of type javax.faces.event.ActionEvent
and returns void. The phase that this event is fired in can be controlled
via the immediate attribute.
- </description>
-</attribute>
-<attribute>
- <name>immediate</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- <description>
- A boolean value that identifies the phase during which action events
- should fire. During normal event processing, action methods and
- action listener methods are fired during the "invoke application"
- phase of request processing. If this attribute is set to "true",
- these methods are fired instead at the end of the "apply request
- values" phase.
</description>
</attribute>
<attribute>
Modified: myfaces/tomahawk/trunk/tomahawk/src/main/tld/tomahawk.tld
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/tomahawk/src/main/tld/tomahawk.tld?rev=368695&r1=368694&r2=368695&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/tomahawk/src/main/tld/tomahawk.tld (original)
+++ myfaces/tomahawk/trunk/tomahawk/src/main/tld/tomahawk.tld Fri Jan 13 04:00:28 2006
@@ -859,6 +859,7 @@
&ui_component_attributes;
&user_role_attributes;
&alt_location_attributes;
+ &faces_immediate_attribute;
&tomahawk_js_cook_menu_attributes;
</tag>