[MAGNOLIA-3583] node2bean: support for java.util.MessageFormat and java.util.regex.Pattern Created: 03/Mar/11  Updated: 26/Feb/13  Resolved: 17/Oct/12

Status: Closed
Project: Magnolia
Component/s: content2bean, core
Affects Version/s: None
Fix Version/s: 5.0

Type: New Feature Priority: Neutral
Reporter: Magnolia International Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File MAGNOLIA-3583-bis.patch     Text File MAGNOLIA-3583.patch    
Issue Links:
relation
is related to MAGNOLIA-3861 node2bean: support for SimpleUrlPattern Closed
is related to MGNLIMG-82 Register a node2bean transformer for ... Closed
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Date of First Response:

 Description   

Often times, I have components which have MessageFormat configurable String. With the current n2b, it's a bit of a pita, as I have to have a setMyFormat(String s) and convert it manually every time. It's never clear if/how/when/where I should convert this string in a MessageFormat instance. N2B could simply convert it for me. See attached patch.

A very similar patch could be applied to support java.util.regex.Pattern.



 Comments   
Comment by Magnolia International [ 19/Aug/11 ]

Here's a patch that also includes the functionality to transform Pattern s automatically.

One thing that's still missing - but I don't see how to do this without magic - is the ability to set flags on the converted Pattern. (however, flags are usually settable via the pattern itself with the (?f) notation, ie (?i) for case-insentivity)

Generated at Mon Feb 12 03:47:50 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.