2013-12-13 43 views
0

我正在從JSF 1.1遷移到JSF 2.0,我的一個自定義組件有這段代碼。替換爲com.sun.faces.util.Util.createConstantMethodBinding(String action);

MethodBinding mb = com.sun.faces.util.Util.createConstantMethodBinding(
         String action 
        ); 
((XYZComponent)component).setAction(mb); 

因爲這是來自Sun jar我沒有在JSF 2.0中的確切替代。如果我繼續並將其更改爲createMethodExpression(..),這是否是一種正確的方法?

如果不是,請建議我爲此的替代方法。

回答

0

這裏是你的代碼,但使用JSF MethodExpression。

​​
+0

謝謝您的回覆。 – Mahesh

+0

@Mahesh:不用客氣,如果這回答了你的問題,那麼請將它標記爲已接受 –