[
http://www.stripesframework.org/jira/browse/STS-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Frederic Daoud closed STS-297.
------------------------------
Resolution: Duplicate
See STS-701
> A mechanism to pass parameters to TypeConverters
> ------------------------------------------------
>
> Key: STS-297
> URL: http://www.stripesframework.org/jira/browse/STS-297
> Project: Stripes
> Issue Type: New Feature
> Components: Validation
> Reporter: Andy
>
> The canonical example is the ability to have a BigDecimal type converter that
> will automatically truncate the number down to the required scale. For
> example, you might want to be able to write something like:
> @Validate(converterParams=@Param(name="scale" value="2") BigDecimal
> dollarAmount;
> @Validate(converterParams=@Param(name="scale" value="0") BigDecimal
> liraAmount;
> I don't particularly like the syntax that I've written above, but it would
> need to be something flexible since each converter make take a different set
> of parameters. Also, might need to deal with type issues - the parameter
> above is obviously a number but the value is expressed as a string. Perhaps
> it could work with:
> @Param(name="foo", [numValue=N|stringValue="N"|etc.]?
> Also would need to figure out how to make the type converter aware of these
> parameters. Do we try to inject them using setters? Or just pass across a
> map of key/value pairs?
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development