Vue d'ensemble Package Utilisation Arbre Déprécié Aide |
|
| SOMMAIRE: ATTR CONSTR METH | DETAIL: ATTR CONSTR METH |
org.apache.struts2.views.xslt.AdapterFactory
acube.framework.webcomp.views.WebCompAdapterFactory
19
1
0
7
8
4
300
105
By extending the StringAdapter and overriding its normal behavior we can
create a custom Date formatter:
public static class CustomDateAdapter extends StringAdapter {
protected String getStringValue() {
Date date = (Date)getPropertyValue();
return DateFormat.getTimeInstance( DateFormat.FULL ).format( date );
}
}
Producing output like:
12:02:54 AM CDT
The StringAdapter (which is normally invoked only to adapt String values)
is a useful base for these kinds of customizations and can produce
structured XML output as well as plain text by setting its parseStringAsXML()
property to true.
See provided examples.Sommaire des Méthodes |
||
org.w3c.dom.Node |
adaptNode(org.apache.struts2.views.xslt.AdapterNode parent, String propertyName, Object value) Create an Node adapter for a child element. |
|
private org.w3c.dom.Node |
constructAdapterInstance(Class adapterClass, org.apache.struts2.views.xslt.AdapterNode parent, String propertyName, Object propertyValue) Create an instance of an adapter dynamically and set its context via
the AdapterNode interface. |
|
| Méthodes héritées de la classe org.apache.struts2.views.xslt.AdapterFactory |
| adaptDocument, adaptNode, adaptNullValue, getAdapterForValue, proxyNamedNodeMap, proxyNode, registerAdapterType |
| Méthodes héritées de la classe java.lang.Object |
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Vue d'ensemble Package Utilisation Arbre Déprécié Aide |
|
| SOMMAIRE: ATTR CONSTR METH | DETAIL: ATTR CONSTR METH |
Version 3.1.0 du 06/11/2009 / Etat : Validé |
| Cette création est mise à disposition selon le Contrat Paternité - Pas d'Utilisation Commerciale - Partage des Conditions Initiales à l'Identique disponible en ligne http://creativecommons.org/licenses/by-nc-sa/2.0/fr/ ou par courrier postal à Creative Commons, 559 Nathan Abbott Way, Stanford,California 94305, USA. |
Documentation generated by DocFlex |