The posibility of show an error message in the @InitView method when the page
load for the first time
-----------------------------------------------------------------------------------------------------
Key: EXTCDI-275
URL: https://issues.apache.org/jira/browse/EXTCDI-275
Project: MyFaces CODI
Issue Type: Improvement
Components: JEE-JSF12-Module
Environment: JDK 7u3, JEE6, Glassfish 3.1.2, CODI 1.0.4, Mojarra
2.1.6,
Netbeans 7.1.1, Windows 7, Google Chrome,
Reporter: Jose Luis Cetina
How can i show an error message when the page load for the first time, this
only work if i go to another page and back to the original (this) then the
message in index.xhml show.
This only work's in the second request!!!
@Named(value="myBean")
@ViewAccessScoped
@Model
@View(Index.class)
public class MyBean implements Serializable{
@InitView
public void init(){
//do something if something its wrong then:
FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(FacesMessage.SEVERITY_INFO, "msg", "msg detail"));
}
Thanks.
Email by Gerhard Petracek
hi jose,
since we need an initial redirect to add the window-id to the url, you
don't see it on the very first page which is displayed in a window (because
you only see the result of the 2nd request).
please file a jira issue. for now you can provide a custom implementation
of JsfModuleConfig and override #isInitialRedirectEnabled to change the
default behaviour.
regards,
gerhard
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira