You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Carlos Ortiz <co...@coral-technologies.com> on 2007/05/16 16:30:10 UTC

Navegation Problem

Well when i debug the method call be action is never call,(ecplise wtp 
and Netbeans) ,
i need that the page reloads but also call the method of search (for 
example)


the code method Code is:


    public String logon(){
       
          Pattern p = Pattern.compile("[^A-Za-z0-9\\.\\@_\\-~#]+");
          Matcher m = p.matcher(usrName);
   
        
          if(m.find()){
              usr= 
Bootstrap.getIWAPI().getSecuMnrg().webUserAuthentification(usrName, 
MD5.encriptar(usrPass));
              usrPass="";
          }else{
              
usr=Bootstrap.getIWAPI().getSecuMnrg().userAuthentification(usrName, 
usrPass);
              usrPass="";
          }
          if(usr==null){
              isLoged= false;
              return "NOTFOUND";
          }
          else{
              isLoged=true;
              return "FOUND";
          }
    }

the jsf code:

<f:subview id="securityMenu" >
                                <h:form id="frmLogin" enctype=""  >
                           
                                        <p>Username:&nbsp;
                                               
                                                <t:inputText  
styleClass="textinlog" id="txt_UserName" forceId="true" 
value="#{logingBean.usrName}" />
                                                &nbsp; Password:&nbsp;
                                                <t:inputSecret  
styleClass="textinlog" id="txt_PassName" forceId="true" 
value="#{logingBean.usrPass}" />
                                                &nbsp;
                                                <t:commandButton 
action="#{logingBean.logon}" value="Login" />
                                            </p>
                                   
                                           
                                    </h:form>
                                </f:subview>





the navegation Rules:

<navigation-rule>
    <from-view-id>/inc/Header.inc.jsp</from-view-id>   
   <navigation-case>
      <from-outcome>NOTFOUND</from-outcome>
      <to-view-id>/login.jsf</to-view-id>
      <redirect />
    </navigation-case>
     <navigation-case>
      <from-outcome>dummy</from-outcome>
      <to-view-id>www.google.co.cr</to-view-id>
      <redirect />
    </navigation-case>
  </navigation-rule>
 

<navigation-rule>
    <from-view-id>/inc/Header.inc.jsf</from-view-id>   
   <navigation-case>
      <from-outcome>NOTFOUND</from-outcome>
      <to-view-id>/login.jsf</to-view-id>
      <redirect />
    </navigation-case>
     <navigation-case>
      <from-outcome>dummy</from-outcome>
      <to-view-id>www.google.co.cr</to-view-id>
      <redirect />
    </navigation-case>
  </navigation-rule>
 
  <navigation-rule>
    <from-view-id>/sales.jsp</from-view-id>   
   <navigation-case>
      <from-outcome>NOTFOUND</from-outcome>
      <to-view-id>/login.jsf</to-view-id>
      <redirect />
    </navigation-case>
     <navigation-case>
      <from-outcome>dummy</from-outcome>
      <to-view-id>www.google.co.cr</to-view-id>
      <redirect />
    </navigation-case>
  </navigation-rule>
   
   
     
  <navigation-rule>
    <from-view-id>/sales.jsf</from-view-id>   
   <navigation-case>
      <from-outcome>NOTFOUND</from-outcome>
      <to-view-id>/login.jsf</to-view-id>
      <redirect />
    </navigation-case>
      <navigation-case>
      <from-outcome>dummy</from-outcome>
      <to-view-id>www.google.co.cr</to-view-id>
      <redirect />
    </navigation-case>
  </navigation-rule>

none of thoses work...
im just getting a page reload.,dont call the method any idea

Carlos Ortiz
pd
    FOUND does not have navegation case but the reload on success is the 
goal.

thx










Sorin Silaghi escribió:
> yes... it is working... if you are getting a page refresh it's because 
> the outcome dose not fit with any navigation rule... can you post more 
> details please ?
>
> On 5/15/07, * Carlos Ortiz* <cortiz@coral-technologies.com 
> <ma...@coral-technologies.com>> wrote:
>
>     Hi ,
>     Is the Navagation working , I'm just getting a page refresh ¡?
>
>
>