3
我要延長下列元素的複合組件屬性最簡單的方法是使用JSF組件?所以,我創建了以下內容:繼承組分,其中延伸的現有JSF組件
<!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:composite="http://java.sun.com/jsf/composite">
<head>
<title>Not present in rendered output</title>
</head>
<body>
<composite:interface>
<composite:attribute name="depressImage" required="false" />
</composite:interface>
<composite:implementation>
<h:commandButton onmousedown="[some JS here to change the img src to the value of #{cc.attrs.depressImage}]" />
</composite:implementation>
</body>
</html>
我的問題是,不必鍵入所有可能attruibutes和映射EL是有辦法來自動填充它們(例如命令按鈕的動作和價值等。 )?