You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Steven Gollery (JIRA)" <de...@myfaces.apache.org> on 2007/05/30 23:04:15 UTC

[jira] Created: (TOMAHAWK-1014) HTMLInputDate ignores custom converters

HTMLInputDate ignores custom converters
---------------------------------------

                 Key: TOMAHAWK-1014
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1014
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Date
    Affects Versions: 1.1.5
            Reporter: Steven Gollery


Setting a custom converter on HTMLInputDate fails. HTMLDateRenderer.getConvertedValue does not use the converter from the component, but instead uses UserData.parse.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-1014) HTMLInputDate ignores custom converters

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608053#action_12608053 ] 

Mike Kienenberger commented on TOMAHAWK-1014:
---------------------------------------------

Leave it open.   It's a bug, not a feature, that a UIInput component ignores the specification of a converter.


> HTMLInputDate ignores custom converters
> ---------------------------------------
>
>                 Key: TOMAHAWK-1014
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1014
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Date
>    Affects Versions: 1.1.5
>            Reporter: Steven Gollery
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.7-SNAPSHOT
>
>
> Setting a custom converter on HTMLInputDate fails. HTMLDateRenderer.getConvertedValue does not use the converter from the component, but instead uses UserData.parse.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TOMAHAWK-1014) HTMLInputDate ignores custom converters

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved TOMAHAWK-1014.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.9-SNAPSHOT

Changed decode and encodeEnd to allow Converter interface, but preserve old behavior if no converter is used.

Now, the documentation of getConverter looks like this:
    /**
     * Retrieve the converter used by this component. 
     * <p>
     * If no converter is selected, submitted values are converted to 
     * its inner class UserData on decode method.
     * </p>
     * <p>
     * If some converter is used, submitted values are decoded as
     * a String with the following format:
     * </p>
     * <p></p>
     * <p>year=yyyy</p>
     * <p>month=mm</p>
     * <p>day=dd</p>
     * <p>hours=hh</p>
     * <p>minutes=mm</p>
     * <p>seconds=ss</p>
     * <p>ampm=ampm</p>
     * <p></p>
     * <p>
     * Note that submitted values could be wrong and it is necessary to
     * restore values on render response phase. The converter receive 
     * a string with this format on getAsObject method and it is expected
     * the converter encode it on getAsString method, so the renderer can
     * restore the submitted values correctly.
     * </p>
     * 
     * @JSFProperty
     */

> HTMLInputDate ignores custom converters
> ---------------------------------------
>
>                 Key: TOMAHAWK-1014
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1014
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Date
>    Affects Versions: 1.1.5
>            Reporter: Steven Gollery
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.9-SNAPSHOT
>
>
> Setting a custom converter on HTMLInputDate fails. HTMLDateRenderer.getConvertedValue does not use the converter from the component, but instead uses UserData.parse.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-1014) HTMLInputDate ignores custom converters

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607783#action_12607783 ] 

Leonardo Uribe commented on TOMAHAWK-1014:
------------------------------------------

Allow define custom converter on inputDate requires rewrite some parts of the component (specially its decode method, and all related to UserData inner class and usage). 

Maybe it's better to let is as open and try to rewrite its code when we have some free time. (My priority right now is clean the issue stack of tomahawk solving as many issues as I can, so we can do a good release).

> HTMLInputDate ignores custom converters
> ---------------------------------------
>
>                 Key: TOMAHAWK-1014
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1014
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Date
>    Affects Versions: 1.1.5
>            Reporter: Steven Gollery
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.7-SNAPSHOT
>
>
> Setting a custom converter on HTMLInputDate fails. HTMLDateRenderer.getConvertedValue does not use the converter from the component, but instead uses UserData.parse.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-1014) HTMLInputDate ignores custom converters

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607442#action_12607442 ] 

Leonardo Uribe commented on TOMAHAWK-1014:
------------------------------------------

Checking the code several times, inputDate component uses its inner class UserData to store, and convert the values submitted. It does not allow any converter set, so converter property should be excluded from its tld.

On decode() method, the submitted value is converted to UserData, so any converter that some user want to use should convert to UserData, in other words do the same.

The solution to this issue should be exclude converter property from its tld.

> HTMLInputDate ignores custom converters
> ---------------------------------------
>
>                 Key: TOMAHAWK-1014
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1014
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Date
>    Affects Versions: 1.1.5
>            Reporter: Steven Gollery
>
> Setting a custom converter on HTMLInputDate fails. HTMLDateRenderer.getConvertedValue does not use the converter from the component, but instead uses UserData.parse.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-1014) HTMLInputDate ignores custom converters

Posted by "Mario Ivankovits (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607465#action_12607465 ] 

Mario Ivankovits commented on TOMAHAWK-1014:
--------------------------------------------

at least t:inputCalendar allows to use the converter="" property (we use it here),  and so should inputDate too no?
The custom converter just inherits from the special inputCalendar converter.

This is required to e.g. allow to plug in any other date library like Joda-DateTime.

I'll reopen this bug, please close it again if I got things wrong.

Ciao,
Mario

> HTMLInputDate ignores custom converters
> ---------------------------------------
>
>                 Key: TOMAHAWK-1014
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1014
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Date
>    Affects Versions: 1.1.5
>            Reporter: Steven Gollery
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.7-SNAPSHOT
>
>
> Setting a custom converter on HTMLInputDate fails. HTMLDateRenderer.getConvertedValue does not use the converter from the component, but instead uses UserData.parse.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (TOMAHAWK-1014) HTMLInputDate ignores custom converters

Posted by "Mario Ivankovits (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mario Ivankovits reopened TOMAHAWK-1014:
----------------------------------------


> HTMLInputDate ignores custom converters
> ---------------------------------------
>
>                 Key: TOMAHAWK-1014
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1014
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Date
>    Affects Versions: 1.1.5
>            Reporter: Steven Gollery
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.7-SNAPSHOT
>
>
> Setting a custom converter on HTMLInputDate fails. HTMLDateRenderer.getConvertedValue does not use the converter from the component, but instead uses UserData.parse.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.