on 12-28-2006 9:50 PM
Hi all,
I have created java bean with date (currency, etc.) attribute and then i have imported this bean as a model in my Web Dynpro project. I want to bind data from this model directly to table UI element, but before I want to format date value using specific customer requirements.
Now I use secondary context structure of string elements, fill it from that model and create table binding from structure. So I want to explore easier way - is there place for formatting routine after creating binding?
Regards,
Michal
Michal,
Sure, you can use solution mentioned by Bharathwaj (@Bharathwaj: thanks for refering my blog).
However, if/when you have control of JavaBean model it's better to add formatting right here as property -- with calculated attributes you have to duplicate these calculated attributes in every non-mapped node. If you are using formatted output only for display you may use read-only properties (getter only). Otherwise just create something like getPhoneFormatted / setPhoneFormatted right into your JavaBean (same logic as for getter/setter in blog post).
After adding properties to JavaBean you have either to re-import model or add properties manually to corresponding Model Classes generated by wizard. Follow standard naming convention in later case: <i>String getPhoneFormatted()</i> becomes property <i>phoneFormatted</i> of built-in DDIC type <i>string</i>.
Valery Silaev
SaM Solutions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have you explored the possibility of using calculated attributes for this requirement !
<a href="/people/valery.silaev/blog/2005/11/29/800format-your-way Data - Valery 's Weblog</a>
Search for calculated attributes in help.sap.
This might help.
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.