You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sc...@apache.org on 2005/07/26 01:03:54 UTC
svn commit: r225203 - in /myfaces: impl/trunk/tld/ impl/trunk/tld/entities/
share/trunk/src/java/org/apache/myfaces/taglib/html/
tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/
tomahawk/trunk/tld/
Author: schof
Date: Mon Jul 25 16:03:44 2005
New Revision: 225203
URL: http://svn.apache.org/viewcvs?rev=225203&view=rev
Log:
Fixes MYFACES-363
Added:
myfaces/impl/trunk/tld/entities/spec_img_attributes.xml
Modified:
myfaces/impl/trunk/tld/entities/html_img_attributes.xml
myfaces/impl/trunk/tld/myfaces_html.tld
myfaces/share/trunk/src/java/org/apache/myfaces/taglib/html/HtmlGraphicImageTagBase.java
myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlGraphicImageTag.java
myfaces/tomahawk/trunk/tld/myfaces_ext.tld
Modified: myfaces/impl/trunk/tld/entities/html_img_attributes.xml
URL: http://svn.apache.org/viewcvs/myfaces/impl/trunk/tld/entities/html_img_attributes.xml?rev=225203&r1=225202&r2=225203&view=diff
==============================================================================
--- myfaces/impl/trunk/tld/entities/html_img_attributes.xml (original)
+++ myfaces/impl/trunk/tld/entities/html_img_attributes.xml Mon Jul 25 16:03:44 2005
@@ -1,5 +1,4 @@
-<!-- HTML 4.0 img attributes -->
- <!-- todo: ALIGN is no attribute of JSF API, but attribute in "transitional" HTML 4.0... allow or disallow?-->
+<!-- HTML 4.0 img attributes that are not part of the JSF 1.1 specification -->
<attribute>
<name>align</name>
<required>false</required>
@@ -7,60 +6,19 @@
<type>java.lang.String</type>
</attribute>
<attribute>
- <name>alt</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- </attribute>
- <!-- todo: BORDER is no attribute of JSF API, but attribute in "transitional" HTML 4.0... allow or disallow? -->
- <attribute>
<name>border</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
- <name>height</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- </attribute>
- <!-- todo: HSPACE is no attribute of JSF API, but attribute in "transitional" HTML 4.0... allow or disallow? -->
- <attribute>
<name>hspace</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
- <name>ismap</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>longdesc</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- </attribute>
- <!-- "name" attribute cannot be set directly by user -->
- <!-- "src" attribute cannot be set directly, use "url" instead! -->
- <attribute>
- <name>usemap</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- </attribute>
- <!-- todo: VSPACE is no attribute of JSF API, but attribute in "transitional" HTML 4.0... allow or disallow? -->
- <attribute>
<name>vspace</name>
- <required>false</required>
- <rtexprvalue>false</rtexprvalue>
- <type>java.lang.String</type>
- </attribute>
- <attribute>
- <name>width</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<type>java.lang.String</type>
Added: myfaces/impl/trunk/tld/entities/spec_img_attributes.xml
URL: http://svn.apache.org/viewcvs/myfaces/impl/trunk/tld/entities/spec_img_attributes.xml?rev=225203&view=auto
==============================================================================
--- myfaces/impl/trunk/tld/entities/spec_img_attributes.xml (added)
+++ myfaces/impl/trunk/tld/entities/spec_img_attributes.xml Mon Jul 25 16:03:44 2005
@@ -0,0 +1,39 @@
+<!-- The subset of HTML 4.0 img attributes that are supported by the JSF 1.1 specification -->
+ <attribute>
+ <name>alt</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>height</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>ismap</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>longdesc</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
+ <!-- "name" attribute cannot be set directly by user -->
+ <!-- "src" attribute cannot be set directly, use "url" instead! -->
+ <attribute>
+ <name>usemap</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>width</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ </attribute>
Modified: myfaces/impl/trunk/tld/myfaces_html.tld
URL: http://svn.apache.org/viewcvs/myfaces/impl/trunk/tld/myfaces_html.tld?rev=225203&r1=225202&r2=225203&view=diff
==============================================================================
--- myfaces/impl/trunk/tld/myfaces_html.tld (original)
+++ myfaces/impl/trunk/tld/myfaces_html.tld Mon Jul 25 16:03:44 2005
@@ -138,7 +138,7 @@
&ui_graphic_attributes;
&html_universal_attributes;
&html_event_handler_attributes;
- &html_img_attributes;
+ &spec_img_attributes;
</tag>
<!-- input_hidden -->
Modified: myfaces/share/trunk/src/java/org/apache/myfaces/taglib/html/HtmlGraphicImageTagBase.java
URL: http://svn.apache.org/viewcvs/myfaces/share/trunk/src/java/org/apache/myfaces/taglib/html/HtmlGraphicImageTagBase.java?rev=225203&r1=225202&r2=225203&view=diff
==============================================================================
--- myfaces/share/trunk/src/java/org/apache/myfaces/taglib/html/HtmlGraphicImageTagBase.java (original)
+++ myfaces/share/trunk/src/java/org/apache/myfaces/taglib/html/HtmlGraphicImageTagBase.java Mon Jul 25 16:03:44 2005
@@ -38,18 +38,14 @@
// HTML event handler attributes --> already implemented in HtmlComponentTagBase
// HTML img attributes relevant for graphic-image
- private String _align; //FIXME: not in API, HTML 4.0 transitional attribute and not in strict... what to do?
private String _alt;
- private String _border; //FIXME: not in API, HTML 4.0 transitional attribute and not in strict... what to do!
private String _height;
- private String _hspace; //FIXME: not in API, HTML 4.0 transitional attribute and not in strict... what to do!
private String _ismap;
private String _longdesc;
private String _onblur;
private String _onchange;
private String _onfocus;
private String _usemap;
- private String _vspace; //FIXME: not in API, HTML 4.0 transitional attribute and not in strict... what to do!
private String _width;
//UIGraphic attributes
@@ -60,18 +56,14 @@
public void release() {
super.release();
- _align=null;
_alt=null;
- _border=null;
_height=null;
- _hspace=null;
_ismap=null;
_longdesc=null;
_onblur=null;
_onchange=null;
_onfocus=null;
_usemap=null;
- _vspace=null;
_width=null;
}
@@ -79,48 +71,29 @@
{
super.setProperties(component);
- setStringProperty(component, HTML.ALIGN_ATTR, _align);
setStringProperty(component, HTML.ALT_ATTR, _alt);
- setStringProperty(component, HTML.BORDER_ATTR, _border);
setStringProperty(component, HTML.HEIGHT_ATTR, _height);
- setStringProperty(component, HTML.HSPACE_ATTR, _hspace);
setBooleanProperty(component, HTML.ISMAP_ATTR, _ismap);
setStringProperty(component, HTML.LONGDESC_ATTR, _longdesc);
setStringProperty(component, HTML.ONBLUR_ATTR, _onblur);
setStringProperty(component, HTML.ONCHANGE_ATTR, _onchange);
setStringProperty(component, HTML.ONFOCUS_ATTR, _onfocus);
setStringProperty(component, HTML.USEMAP_ATTR, _usemap);
- setStringProperty(component, HTML.VSPACE_ATTR, _vspace);
setStringProperty(component, HTML.WIDTH_ATTR, _width);
setStringProperty(component, JSFAttr.URL_ATTR, _url);
}
- public void setAlign(String align)
- {
- _align = align;
- }
-
public void setAlt(String alt)
{
_alt = alt;
}
- public void setBorder(String border)
- {
- _border = border;
- }
-
public void setHeight(String height)
{
_height = height;
}
- public void setHspace(String hspace)
- {
- _hspace = hspace;
- }
-
public void setIsmap(String ismap)
{
_ismap = ismap;
@@ -149,11 +122,6 @@
public void setUsemap(String usemap)
{
_usemap = usemap;
- }
-
- public void setVspace(String vspace)
- {
- _vspace = vspace;
}
public void setWidth(String width)
Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlGraphicImageTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlGraphicImageTag.java?rev=225203&r1=225202&r2=225203&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlGraphicImageTag.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlGraphicImageTag.java Mon Jul 25 16:03:44 2005
@@ -17,6 +17,7 @@
import javax.faces.component.UIComponent;
+import org.apache.myfaces.renderkit.html.HTML;
import org.apache.myfaces.component.UserRoleAware;
import org.apache.myfaces.component.html.ext.HtmlGraphicImage;
import org.apache.myfaces.taglib.html.HtmlGraphicImageTagBase;
@@ -38,20 +39,54 @@
return "org.apache.myfaces.Image";
}
+ private String _align;
+ private String _border;
private String _enabledOnUserRole;
+ private String _hspace;
private String _visibleOnUserRole;
+ private String _vspace;
public void release() {
super.release();
+
+ _align=null;
+ _border=null;
_enabledOnUserRole=null;
+ _hspace=null;
_visibleOnUserRole=null;
+ _vspace=null;
}
protected void setProperties(UIComponent component)
{
super.setProperties(component);
+
+ setStringProperty(component, HTML.ALIGN_ATTR, _align);
+ setStringProperty(component, HTML.BORDER_ATTR, _border);
+ setStringProperty(component, HTML.HSPACE_ATTR, _hspace);
+ setStringProperty(component, HTML.VSPACE_ATTR, _vspace);
setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole);
setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole);
+ }
+
+ public void setAlign(String align)
+ {
+ _align = align;
+ }
+
+ public void setBorder(String border)
+ {
+ _border = border;
+ }
+
+ public void setHspace(String hspace)
+ {
+ _hspace = hspace;
+ }
+
+ public void setVspace(String vspace)
+ {
+ _vspace = vspace;
}
public void setEnabledOnUserRole(String enabledOnUserRole)
Modified: myfaces/tomahawk/trunk/tld/myfaces_ext.tld
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/tld/myfaces_ext.tld?rev=225203&r1=225202&r2=225203&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/tld/myfaces_ext.tld (original)
+++ myfaces/tomahawk/trunk/tld/myfaces_ext.tld Mon Jul 25 16:03:44 2005
@@ -25,6 +25,7 @@
<!ENTITY html_button_attributes SYSTEM "entities/html_button_attributes.xml">
<!ENTITY html_event_handler_attributes SYSTEM "entities/html_event_handler_attributes.xml">
<!ENTITY html_form_attributes SYSTEM "entities/html_form_attributes.xml">
+<!ENTITY spec_img_attributes SYSTEM "entities/spec_img_attributes.xml">
<!ENTITY html_img_attributes SYSTEM "entities/html_img_attributes.xml">
<!ENTITY html_input_attributes SYSTEM "entities/html_input_attributes.xml">
<!ENTITY html_input_help_attributes SYSTEM "entities/html_input_help_attributes.xml">
@@ -389,6 +390,7 @@
&html_universal_attributes;
&html_event_handler_attributes;
&html_img_attributes;
+ &spec_img_attributes;
&user_role_attributes;
&ext_forceId_attribute;
</tag>