Im a bit perplexed...
Ive got a list of orders each having a "cancel" button. Once the order is canceled, I then add a message "order canceled + orderNumber". With <s:button> I get the correct response. With <a:commandButton> I only get "order canceled" and no order number.
<s:button action="#{orderList.cancel}" value="Cancel"/> <a:commandButton type="submit" value="Cancel" reRender="orders" action="#{orderList.cancel}"/>
<a:outputPanel ajaxRendered="true"> <h:messages styleClass="message" globalOnly="true"/> </a:outputPanel>
@DataModelSelection private Order order; public void cancel() { log.info("Cancel order: #{order.orderNumber}"); Order cancelled = em.find(Order.class, order.getId()); if (cancelled!=null) { em.remove( cancelled ); } getOrders(); FacesMessages.instance().add("Order cancelled for order number #{order.orderNumber}"); }
by adding a jsf facesmessage to seams facesmessages I was able to resolve the issue.