Ability to easily create a meta tag
-----------------------------------
Key: TRINIDAD-1930
URL: https://issues.apache.org/jira/browse/TRINIDAD-1930
Project: MyFaces Trinidad
Issue Type: Improvement
Components: Components
Affects Versions: 1.2.14-core , 2.0.0.2-core
Reporter: Matt Cooper
Assignee: Matt Cooper
Ability to easily create a meta tag (e.g.
http://developer.apple.com/library/safari/#documentation/appleapplications/reference/safarihtmlref/articles/MetaTags.html
or http://www.webmarketingnow.com/tips/meta-tags-uncovered.html ) via a new
trh:meta tag.
Currently it is quite tedious to create a meta tag out of a component:
<tr:document ...>
<f:facet name="metaContainer">
<tr:group id="metaContainer">
<tr:outputText escape="false"
value='<meta name="viewport"
content="width=device-width">'
id="metaTag1"/>
<tr:outputText escape="false"
value='<meta name="apple-mobile-web-app-capable"
content="yes">'
id="metaTag2"/>
<tr:outputText escape="false"
value='<meta http-equiv="refresh"
content="2;url=./test/index.jspx">'
id="metaTag3"/>
</tr:group>
</f:facet>
</tr:document>
It would be much better if we had a trh:meta component that looked like this:
<tr:document ...>
<f:facet name="metaContainer">
<tr:group id="metaContainer">
<trh:meta name="viewport" content="width=device-width"/>
<trh:meta name="apple-mobile-web-app-capable" content="yes"/>
<trh:meta name="refresh" nameType="http-equiv"
content="2;url=./test/index.jspx"/>
</tr:group>
</f:facet>
</tr:document>
So I would like to see a new trh:meta component that has an API like this:
Tag name: <trh:meta>
UIComponent class: org.apache.myfaces.trinidad.component.core.CoreMeta
Component type: org.apache.myfaces.trinidad.CoreMeta
The meta component generates an HTML meta tag and is intended to be used inside
either the trh:head tag or the document component's metaContainer facet.
Events
Type Phases Description
org.apache.myfaces.trinidad.event.AttributeChangeEvent Invoke Application,
Apply Request Values Event delivered to describe an attribute change.
Attribute change events are not delivered for any programmatic change to a
property. They are only delivered when a renderer changes a property without
the application's specific request. An example of an attribute change events
might include the width of a column that supported client-side resizing.
Attributes
Name Type Supports EL? Description
attributeChangeListener javax.el.MethodExpression Only EL
a method reference to an attribute change listener. Attribute change events are
not delivered for any programmatic change to a property. They are only
delivered when a renderer changes a property without the application's specific
request. An example of an attribute change events might include the width of a
column that supported client-side resizing.
binding org.apache.myfaces.trinidad.component.core.CoreMeta Only EL
an EL reference that will store the component instance on a bean. This
can be used to give programmatic access to a component from a backing bean, or
to move creation of the component to a backing bean.
id String No the identifier for the component. The identifier must
follow a subset of the syntax allowed in HTML:
* Must not be a zero-length String.
* First character must be an ASCII letter (A-Za-z) or an underscore ('_').
* Subsequent characters must be an ASCII letter or digit (A-Za-z0-9), an
underscore ('_'), or a dash ('-').
rendered boolean Yes whether the component is rendered. When
set to false, no output will be delivered for this component (the component
will not in any way be rendered, and cannot be made visible on the client).
name String Yes the name or http-equiv attribute of the meta attribute
(see nameType)
nameType String Yes "name" or "http-equiv" indicating which kind of
name attribute is desired ("name" is the most common attribute but some older
meta tags need "http-equiv")
content String Yes the content of the meta attribute
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.