2011-09-24 81 views

回答

0

只需將它作爲通常的Java方法的方法參數傳遞即可。你可以在動作方法中做到這一點。

E.g.

<h:form> 
    <h:inputText value="#{bean.input}" /> 
    <h:commandButton value="Submit" action="#{bean.submit}" /> 
</h:form> 

private String input; // +getter +setter 

public void submit() { 
    YourAnotherClass yourAnotherClass = new YourAnotherClass(); 
    yourAnotherClass.process(input); 
} 
相關問題