You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jose Luis Cetina (Created) (JIRA)" <de...@myfaces.apache.org> on 2012/03/10 15:38:57 UTC
[jira] [Created] (EXTCDI-275) The posibility of show an error
message in the @InitView method when the page load for the first time
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
[jira] [Resolved] (EXTCDI-275) The posibility of show an error
message in the @InitView method when the page load for the first time
Posted by "Gerhard Petracek (Resolved) (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/EXTCDI-275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gerhard Petracek resolved EXTCDI-275.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.0.5
> 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, JEE-JSF20-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
> Assignee: Gerhard Petracek
> Fix For: 1.0.5
>
>
> 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