-
1. Re: Can't navigate to another page using a4j:commandLink
rpa_rio Oct 10, 2007 4:58 PM (in response to rpa_rio)I'm using richfaces 3.1.1-GA
-
2. Re: Can't navigate to another page using a4j:commandLink
sergeysmirnov Oct 10, 2007 5:39 PM (in response to rpa_rio)may be validation is fail or you use immediate together with ajaxSingle.
You said nothing yet about your case. So, no particular suggestion what is wrong in your code. -
3. Re: Can't navigate to another page using a4j:commandLink
rpa_rio Oct 11, 2007 9:23 AM (in response to rpa_rio)I'm not using immediate or ajaxSingle, there's no validators on the page o required fields, I'd the same issue previously and I could see the next view being returned via XHR but the view couldn't be loaded on the browser.
-
4. Re: Can't navigate to another page using a4j:commandLink
rpa_rio Oct 11, 2007 4:14 PM (in response to rpa_rio)Any ideas about what's wrong and where I should look on Richfaces source code to fix it?
-
5. Re: Can't navigate to another page using a4j:commandLink
sergeysmirnov Oct 11, 2007 6:01 PM (in response to rpa_rio)try to fix problem in your code.
-
6. Re: Can't navigate to another page using a4j:commandLink
rpa_rio Oct 11, 2007 9:24 PM (in response to rpa_rio)I could solve this problem previously by using h:commandLink instead of a4j:commandLink, but now I really need a4j:commandLink to call the bean method and then navigate to another view in ajax way depending of returned outcome.
I really tried to solve this problem on my code in many ways, like upgrade/downgrade a4j/richfaces versions but no success. -
7. Re: Can't navigate to another page using a4j:commandLink
sergeysmirnov Oct 11, 2007 9:58 PM (in response to rpa_rio)what code you speak about?
-
8. Re: Can't navigate to another page using a4j:commandLink
rpa_rio Oct 11, 2007 11:31 PM (in response to rpa_rio)I'm talking about the jsf code below:
<h:form style="display: inline;">
<a4j:region>
<a4j:outputPanel id="painelBotoesEncerrar" >
<a4j:commandLink action="#{mainPage.encerrarSessao}"
status="status">
<h:graphicImage value="images/end.gif" border="0"/>
</a4j:commandLink>
</a4j:outputPanel>
</a4j:region>
</h:form>
And inside MainPage.java I have the following method:
public String encerrarSessao(){
//cartoesNaoConcluidos is an ArrayList
if (cartoesNaoConcluidos.size() < 1){
return "login";
}else{
return null;
}
}
I put a breakpoint on my java code and the correct outcome is correctly returned but the login page isn't showed on browser.
My navigation rule for login outcome:
<navigation-rule>
<navigation-case>
<from-outcome>login</from-outcome>
<to-view-id>/login.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
This code is related to logout feature of application.
FYI:
The current view that I'm trying to unload (main.xhtml) has something 11 compositions (3000 lines of html + jsf code) and the view to be loaded (login.xhtml) has something about 174 lines of html + jsf code.
Why the main.xhtml is so big? Because the user of Delphi version of the same application are completely familiar with current application UI and the costumer doesn't want a different UI.
The jsf code mentioned at the top of this topic reply is a very small portion of main.xhtml page.
I'll try to find a simplified way to reproduce the same issue without some costumer database and/or mainframe calls. -
9. Re: Can't navigate to another page using a4j:commandLink
ilya_shaikovsky Oct 12, 2007 5:02 AM (in response to rpa_rio)Try to use in the navigation rule.
-
10. Re: Can't navigate to another page using a4j:commandLink
rpa_rio Oct 12, 2007 3:45 PM (in response to rpa_rio)I can't use in the navigation rule because the bean action will perform a test to determine which outcome will be returned.
-
11. Re: Can't navigate to another page using a4j:commandLink
ilya_shaikovsky Oct 15, 2007 10:32 AM (in response to rpa_rio)sorry I'm lost the text
I mean try to use<redirect/> in your rule in config.
-
12. Re: Can't navigate to another page using a4j:commandLink
rpa_rio Oct 18, 2007 9:42 AM (in response to rpa_rio)Ok, thx, I'll try, but I have anothe information about this problem, I always get this behaviour when the commandLink is inside modalPanel, if I call the same action placed anywhere on the page and outside an modalPanel the action is called and the next view is correctly loaded.