0
每次我在我的數據表中添加一個新行(通過commandbutton「new Feedback」),它被添加到數據表的底部。我怎樣才能添加它,並確保它會出現在頂部?如何在JSF的數據表頂部添加新行?
<h:form>
<h:inputText value="#{helloBean.content}" ></h:inputText>
<h:commandButton value="send message"
action="#{helloBean.multiAufruf}">
</h:commandButton>
<h:commandButton value="new Feedback"
action="#{helloBean.gettingFeedbackMulti}">
</h:commandButton>
<h:dataTable value="#{helloBean.sentMessagesList}" var="message">
<h:column>
<h:inputText value="#{message.content}"></h:inputText>
</h:column>
<h:column>
<h:outputText value="#{message.time}"></h:outputText>
</h:column>
<h:column>
<h:outputText value="#{message.idList}"></h:outputText>
</h:column>
<h:column>
<h:outputText value="#{message.feedbackz}"></h:outputText>
</h:column>
</h:dataTable>
</h:form>
感謝您的快速回復,它w orked! – SilverFullbuster