07-20-2012 01:36 PM
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?
07-30-2012 11:22 AM
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
07-30-2012 02:38 PM
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
07-31-2012 11:44 AM
Ok, you can issue a global message, or attach it to a JSF component using its id.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.