Firefox stylesheet problem
ccode Apr 30, 2007 5:52 AMi have an application including myfaces + a4j. When i used a4j there is no problem if it cant pass standart (jsf included) validators all messages are displaying fine. But when it passes the validators and the process fails i am forwarding the request to the same page. (login.jsp) Firefox cant use the stylesheet or cant see where it is. opera and ie are working fine.
if i dont use a4j and use standart jsf components firefox is working fine.
i tried a4j 1.06 and 1.1 result is same.
<%@ page language="java" contentType="text/html; charset=UTF-8"
 pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
<f:loadBundle basename="resource" var="res" />
<f:view>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
 @import url(../includes/mainsite.css);
</style>
<title>
Panel
</title>
</head>
<body>
<div align="center">
 <h:form id="loginform">
 <table cellspacing="5" class="logintable">
 <tr>
 <td colspan="2"> </td>
 </tr>
 <tr>
 <td class="tdlogincentered" colspan="2"><h:graphicImage
 alt="Login Logo" value="/images/mainsite/loginlogo.jpg" /></td>
 </tr>
 <tr>
 <td class="tdloginright" valign="top" width="50%"><h:outputText
 value="#{res.usernameLabel}" ></h:outputText> </td>
 <td class="tdloginleft" width="50%"><h:inputText
 styleClass="logininput" required="true" id="username"
 maxlength="20" size="20" value="#{loginBean.username}" tabindex="1">
 <f:validateLength minimum="4" maximum="20" />
 </h:inputText> <br>
 <h:message styleClass="loginerror" for="username" />
 <h:message styleClass="loginerror" for="loginform" />
 </td>
 </tr>
 <tr>
 <td valign="top" class="tdloginright" width="50%"><h:outputText
 value="#{res.passwordLabel}" > </h:outputText>  </td>
 <td class="tdloginleft" width="50%"><h:inputSecret
 styleClass="logininput" required="true" id="password"
 maxlength="20" size="20" value="#{loginBean.password}" tabindex="2">
 <f:validateLength minimum="4" maximum="22" />
 </h:inputSecret> <br>
 <h:message styleClass="loginerror" for="password" />
 <h:message styleClass="loginerror" for="loginform" />
 </td>
 </tr>
 <tr>
 <td class="tdloginright" width="50%"></td>
 <td class="tdloginleft" width="50%">
 <h:commandButton id="login" styleClass="submit"
 action="#{loginBean.login}" value="Giri? Yap" title="Giri? Yap">
 </h:commandButton>
 </td>
 </tr>
 <tr>
 <td colspan="2"> </td>
 </tr>
 <tr>
 <td colspan="2" class="tdloginleft">
 <ul>
 <a class="white" href="../"
 title="Bilgisayar Mühendisli?i ?nternet Sitesi">Anasayfaya dön</a>
 <br>
 <a class="white" href="forgetpass.jsf"
 title="?ifrenizi mi unuttunuz?">?ifrenizi mi unuttunuz?</a>
 </ul>
 </td>
 </tr>
 <tr>
 <td colspan="2"> </td>
 </tr>
 </table>
 </h:form>
 </div>
</body>
</html>
</f:view>
public String login() {
 FacesContext context = FacesContext.getCurrentInstance();
 LoginBean lb = (LoginBean) context.getApplication().createValueBinding(
 "#{loginBean}").getValue(context);
 UserDAO ud=new UserDAO();
 User u=ud.getUserByUsernameAndPassword(lb.getUsername(), MD5.getHashString(lb.getPassword()));
 if(u==null){
 ResourceBundle bundle =
 ResourceBundle.getBundle("resource",
 context.getViewRoot().getLocale());
 String msg = bundle.getString("invalidlogin");
 context.addMessage ("loginform", new FacesMessage("loginform",msg));
 return "fail";
 }else{
 return "success";
 }
 }when it fails problem occures.
<navigation-rule> <from-view-id>/login/login.jsp</from-view-id> <navigation-case> <from-outcome>success</from-outcome> <to-view-id>/panel/userhome.jsp</to-view-id> </navigation-case> <navigation-case> <from-outcome>fail</from-outcome> <to-view-id>/login/login.jsp</to-view-id> </navigation-case> </navigation-rule>