2012-12-02 86 views
0

我有屬性爲「newItemInfo」的Bean「RichFacesTreeNodeBean」,我用inputTextArea調用模態面板,它必須包含該屬性的實際值,但它始終包含屬性的第一個值。這裏的index.xhtml部分:如何更新richfaces中的inputTextarea

<rich:popupPanel id="editPanel"> 
    <h:form> 
     <h:inputTextarea value="#{richFacesTreeNodeBean.newItemInfo}" /> 
     <!-- some buttons --> 
    </h:form> 
</rich:popupPanel> 

而且RichFacesTreeNodeBean.java:

@ManagedBean 
@ViewScoped 
public class RichFacesTreeNodeBean { 
    private String newItemInfo; 

public String getNewItemInfo() { 
    return newItemInfo; 
} 

如何解決這一問題?

回答

0
<h:form> 
    <a4j:outputPanel layout="block" ajaxRendered="true"> 
     <h:inputTextarea value="#{richFacesTreeNodeBean.newItemInfo}" /> 
    </a4j:outputPanel> 
</h:form> 

它的工作原理。