myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christina Sickelco" <csicke...@gmail.com>
Subject Re: inputCalendar conversion error not using error css class
Date Tue, 11 Nov 2008 15:16:02 GMT
Hi all, just wanted to follow up on this issue. Should I add my notes to the
JIRA issue (is it possible to re-open it?) Or am I the only one experiencing
this behavior, in which case maybe it's a setup problem on my side?

Thanks,
Christina

On Mon, Nov 3, 2008 at 3:46 PM, Christina Sickelco <csickelco@gmail.com>wrote:

> I am using the tomahawk input calendar, and I specify different css classes
> for fatal, error, warn, and info messages so that, for example, I can show
> error messages in a red box, and info messages in a green box. I noticed
> that when a user enters an invalid date for the input calendar and a
> conversion error is thrown, it doesn't seem to use the error class. In fact,
> it looks like it's using the info class because the green box pops up.
>
> I found a MyFaces issue already dedicated to this problem:
> http://issues.apache.org/jira/browse/MYFACES-421, but it states that it
> was fixed in 1.1.0. I am using 1.1.6 for the myfaces api, impl, and
> tomahawk as well (also tried tomahawk 1.1.7, same thing). Just wondering if
> anyone else has run across this, or if I am doing some incorrectly. Here's a
> snippet of my code. If it's helpful, I can also package up my project (it
> just has 1 page to demontrate this problem).
>
> Here's the JSP code:
>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
>
>   <head>
>     <title>Test Program</title>
>     <meta http-equiv="pragma" content="no-cache">
>     <meta http-equiv="cache-control" content="no-cache">
>     <meta http-equiv="expires" content="0">
>
>     <link rel="stylesheet" type="text/css" href="screen.css" media="screen"
> title="Screen" />
>
>   </head>
>
>   <body>
>         <f:view>
>             <h:form>
>                  <t:inputCalendar
>                     value="#{testBean.dateTo}"
>                     renderAsPopup="true" />
>                 <t:commandButton
>                     value="Submit"
>                     action="#{testBean.actionDoWork}"/>
>                 <t:div id="flash">
>                     <t:messages
>                         showDetail="true"
>                         fatalClass="fatal"
>                         errorClass="error"
>                         warnClass="warn"
>                         infoClass="info" />
>                 </t:div>
>             </h:form>
>         </f:view>
>     </body>
> </html>
>
>
> Here's my css class:
> .fatal {
>     color: #fff;
>     border: 4px #000 solid;
>     background: #f00;
> }
> .error {
>     color: #fff;
>     border: 4px #900 solid;
>     background: #f00;
> }
> .warn {
>     color: #000;
>     border: 4px #960 solid;
>     background: #f90;
> }
> .info {
>     color: #030;
>     border: 4px #090 solid;
>     background: #0c0;
> }
>
> #flash ul li span {
>     padding: 10px;
>     margin: 10px;
>     display: block;
>     width: 50%;
>     font-size: 110%;
>     font-weight: bold;
> }
>
> #flash ul { list-style-type: none; margin-left: 0;}
>
> Thanks in advance!
>
>

Mime
View raw message