1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:composite="http://java.sun.com/jsf/composite"> <composite:interface> <composite:attribute name="image" required="true"/> <composite:actionSource name="link" targets="#{cc.clientId}:iconForm:link"/> <composite:clientBehavior name="click" event="action" targets="#{cc.clientId}:iconForm:link"/> </composite:interface> <composite:implementation> <div id="#{cc.clientId}"> <h:form id="iconForm"> <h:commandLink id="link" immediate="true"> <h:graphicImage value="#{cc.attrs.image}"/> </h:commandLink> </h:form> </div> </composite:implementation> </html> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:corejsf="http://corejsf.com" xmlns:util="http://java.sun.com/jsf/composite/util"> <h:head> <hutputStylesheet library="css" name="styles.css"/> <title>#{msgs.windowTitle}</title> </h:head> <h:body> <hutputStylesheet library="css" name="styles.css"/> <hutputText value="#{msgs.fontSizeHeading}" style="padding-left: 30px; font-size: 2em;"/> <h:panelGrid columns="3" style="padding-left: 80px;"> <util:icon id="minus" image="#{resource['images:minus.gif']}"> <f:ajax event="click" render=":readout :fontPreview"/> <f:actionListener for="link" type="com.clarity.FontSelectionListener"/> </util:icon> <util:icon id="plus" image="#{resource['images:plus.gif']}"> <f:ajax event="click" render=":readout :fontPreview"/> <f:actionListener for="link" type="com.clarity.FontSelectionListener"/> </util:icon> <hutputText id="readout" value="#{fontSettings.size}em"/> </h:panelGrid> <hutputText id="fontPreview" value="Aa" style="font-size: #{fontSettings.size}em; font-style: italic"/> </h:body> </html> |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |