As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
I've created a simple button widget that fires an action, passing a String to the action:
<div
xmlns="http://www.w3.org/1999/xhtml" xmlns:nxthemes="http://nuxeo.org/nxthemes" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:nxu="http://nuxeo.org/nxweb/util" xmlns:nxdir="http://nuxeo.org/nxdirectory" xmlns:nxl="http://nuxeo.org/nxforms/layout" xmlns:c="http://java.sun.com/jstl/core" xmlns:a4j="http://richfaces.org/a4j">
<a4j:commandButton id="#{widget.id}_btn_besPMPTOT" value="Stop Prep" action="#{besPMPTOT.pmpStop('Prep')}" styleClass="button"> </a4j:commandButton>
I've used the Advanced Widget section in Studio to insert this widget into an edit view of a document. The associated JAVA action was generated with nuxeo IDE. I changed the accept() in the generated action class method to return false so I did not see the tabs. The button works except any message generated by the JAVA actions to facesMessages is not displayed. An error of: [javax.enterprise.resource.webcontainer.jsf.lifecycle] jsf.non_displayed_message is displayed in the log file.
Did setting the return value on the accept method(filter) turn off the ability to send messages to "faces" for display to the user? Do I need a different category in the action .xml file? I currently have the standard SUBVIEW_UPPER_LIST as the category. Should I be using the Nuxeo nxa4j instead of a4j in my button widget?
hi,
sorry, not sure i understood correctly what you're trying to do, but that kind of message shows that a component is not re-rendered. Adapting the corresponding attribute on the a4j link so the component with a message is rendered should do the trick
I am trying to issue a message, using Java facesMessages, to the user, from inside custom action linked to a button generated by the widget above. In this case the custom action is
Ok, you can issue a global message, or attach it to a JSF component using its id.