Hi Luis,
Not sure what you scenario is but here’s one…
I want to select some rows of products that’s displayed in a view and take some key information over to another view or to another async table in the same view for example…see the getFacesContext in use.
- Add an action to your page bean - I called it addNewProducts
- Open the page source and update the following logic -
public String addNewProducts() {
String productid = null;
try {
productid = this.getCreateNewProduct().getParameters().getCreateNewProduct().getPRODUCTID();
this.getCreateNewProduct().refresh();
getFacesContext().addMessage(null, new FacesMessage("New Products added with productid: " + productid));
} catch (Exception e) {
getFacesContext().addMessage(null, new FacesMessage(e.getLocalizedMessage()));
}
return OUTCOME_OK;
}
Obviously,
- you will have to import javax.faces.application.FacesMessage;
- you must have your web service CreateNewProduct with it’s necessary parameters
Hope this helps
Vikash
#webMethods#MWS-CAF-Task-Engine#webMethods-BPMS