Thank you for your message.
I guess you have this problem because your initial backing bean property is null.
So, I think a simpler fix is to never have userData properties null.
I just changed the UserData constructor to set the time to now if the backing bean is null.

On Thu, 2005-02-03 at 14:19 +0000, Andrew Thornton wrote:
Hi,

I'm currently trying to use the x:inputDate tag and unless I set the 
type to "both" (or something other than type and date.) I find that the 
parse() method of the UserData innerclass will always throw a 
ParseException. Having looked at the HtmlDateRenderer source code I have 
decided that this occurs because the Renderer never sets the values of 
the Day Month Year -- if type is time -- or Minute Hour Second -- if the 
type is date. This results in them remaining null and hence failing when 
the parse occurs.

I think the correct place to fix this is in 
HtmlDateRenderer.encodeEnd(), and I attach a patch which should fix it. 
The only issue I can see at the moment, is if someone was to dynamically 
change the type of the input it would lose the old information.

Thanks,
andy

PS Do know your mail archives for January are broken?

--
Andrew Thornton
[EMAIL PROTECTED]
plain text document attachment (patch)
diff -r1.14 HtmlDateRenderer.java
268c268,272
<         }
---
>         } else {
>           userData.setDay("01");
>           userData.setMonth("01");
>           userData.setYear("1970");
>       }
274c278,282
<         }
---
>         } else {
>           userData.setHours("00");
>           userData.setMinutes("00");
>           userData.setSeconds("00");
>       }

Reply via email to