[prev in list] [next in list] [prev in thread] [next in thread]
List: struts-user
Subject: Re: shale "convertDateTime" problem (timeZone)
From: gvanmatre () comcast ! net (Gary VanMatre)
Date: 2006-06-30 17:16:30
Message-ID: 063020061716.6260.44A55C6E000876A80000187422068246930A9D9B0E03020E9009 () comcast ! net
[Download RAW message or body]
> From: Daniel del Río <dani@programaria.com>
>
> Hello,
> I have a problem with the timezone attribute in a "convertDateTime"
> component. The clay-config looks like:
>
> ...
> <component jsfid="iniciColumn" extends="column" id="inici">
> <element renderId="1" jsfid="outputText">
> <attributes>
> <set name="value" value="#{t.dataInici}" />
> <set name="immediate" value="true"/>
> </attributes>
> <converter jsfid="convertDateTime">
> <attributes>
> <set name="pattern" value="dd/MM/yy, HH:mm" />
> <set name="timeZone" value="GMT+01" />
> </attributes>
> </converter>
> </element>
> </component>
> ...
>
>
>
> I get the following error:
>
> javax.faces.convert.ConverterException: You have requested a conversion for
> type java.util.TimeZone, but there is no by-type converter registered for
> this type
>
> I use the last version of shale, someone have detected the same problem or
> knows what is wrong?
>
This is a bug. Please create a JIRA issue \
(http://issues.apache.org/struts/secure/Dashboard.jspa).
The attributes are pushed to the component using a handy utility, \
"org.apache.shale.util.ConverterHelper", that uses the JSF converters to handle \
changing the string type to the target property value. There is not a JSF converter \
registered for the TimeZone class.
There is another way to handle this but I think the best option is to add a TimeZone \
converter. You can register your own common chains command to handle creating the \
target JSF components.
http://svn.apache.org/viewvc/struts/shale/trunk/shale-clay/src/main/resources/org/apache/shale/clay/component/chain/shale-clay-config.xml?view=log
There is a "PluggableLookupCommand" that looks for custom commands registered in the \
"clayCustomization" catalog. You can register your custom catalog using the context \
listener in the web.xml.
<command className = "org.apache.shale.clay.utils.PluggableLookupCommand"
catalogName = "clayCustomization"
name = "preprocessAddConverter"
optional = "true"/>
I won't go into the details here because I don't think you should have to do anything \
special for one of the runtime converters but thought it would be worth mentioning.
Gary
> bye.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic