FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "Selected pizza: " + pizza, null);
FacesContext.getCurrentInstance().addMessage(null, msg);
}
public void onPizzaRemove(DragDropEvent event) {
DataList dataList = (DataList) event.getComponent().findComponent("orderedPizza");
dataList.invokeOnComponent(FacesContext.getCurrentInstance(), event.getDragId(), new ContextCallback() {
public void invokeContextCallback(FacesContext fc, UIComponent component) {
HtmlPanelGroup panelGroup = (HtmlPanelGroup) component;
String pizza = panelGroup != null ? (String) panelGroup.getAttributes().get("pizza") : "";