Hi everyone!

The problem was that our property type was not set to "Date" but "String".

Thanks to Boris Kraft for pointing that out - I feel a bit stupid. This hint 
solved our problem.

I still have 2 comments about this though:

1. It would be good to mention this in the documentation, under 
"http://documentation.magnolia-cms.com/reference/controls.html#date"; - we 
actually checked the documentation there, but of course did not find the answer 
to our problem.

2. If it is possible to save a date value to a string property via DialogDate, 
then it should also be possible to read the value from a string property. The 
current situation is confusing - either throw an exception right away, on 
saving, or allow loading the value from a string (perhaps using a configurable 
format, as suggested in my comment in the JIRA issue). But permitting the save 
and then failing on load is inconsistent.

Thanks again for pointing out our error though!

Regards from Vienna,

Richard Unger



-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Unger, Richard
Gesendet: Dienstag, 07. Dezember 2010 11:55
An: Magnolia User-List
Betreff: AW: [magnolia-user] Problem with DateControl


Hi Grégory!

Thanks, issue now posted to JIRA.

http://jira.magnolia-cms.com/browse/MAGNOLIA-3454

Regards from Vienna,

Richard Unger

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Grégory Joseph
Gesendet: Freitag, 03. Dezember 2010 16:23
An: Magnolia User-List
Betreff: Re: [magnolia-user] Problem with DateControl


Hey Richard,

Which version are you using ? Is this something you've seen working before ? 
Either way, it's probably worth an issue on Jira yes.

-g

On 03 Dec 2010, at 15:16, Unger, Richard wrote:

> Hi Magnolians!
> 
> We're seeing the following error (see attached stacktrace) when using a 
> date-control (DialogDate) for one of our dialogs.
>  
> Basically, we can add a new paragraph of our type, set the date in the date 
> field, the date is saved to JCR, but the next time we want to edit the 
> paragraph, we get a blank dialog, and see the attached exception in the 
> background.
>  
> It seems that DialogDate. doBeforeDrawHtml() calls getDate() on the NodeData 
> for the property, which is implemented in DefaultNodeData, and in turn calls 
> javax.jcr.Property.getDate(), which can't parse the format that was saved.
>  
> ·         Am I doing something stupid?
> ·         Is it maybe locale-related?
> ·         Is this a known bug, or should I file in JIRA?
>  
> If it's a bug, it is pretty bad, since it makes the date-control unuseable.
>  
> Input would be greatly appreciated!
>  
> Thanks!
>  
> Regards from Vienna,
>  
> Richard
> 
> 
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
> <trace.txt>



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------





----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------





----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to