【发布时间】:2017-12-11 22:37:49
【问题描述】:
每次我在数据表中添加新行(通过命令按钮“新反馈”)时,它都会添加到数据表的底部。如何添加它并确保它出现在顶部?
<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>
【问题讨论】: