Tapestry data format conversion and storage of the study between 1
1, the user can see the gender is "male" and stored in the database is "0" - This type of data is code data;
2, the number of users is "1214235.30", and is stored in the database, "1214235.3" - This type of data format belongs to the control, may be associated with localization-related.
The above data for display and storage on the differences in how tapestry Design and resolved it? Please read on ...
First, data formatting
1, enter the domain user can input data components, such as: TextField.
Set translator property needs, if it is data conversion code is inherited from AbstractTranslator, if the data format conversion is inherited from FormatTranslator.
If it is inherited from AbstractTranslator, you need to achieve parseText methods methods and formatObject.
FormatObject which method is carried out in order to show the conversion, it is converted to string objects, because the client is shown in the string;
parseText method is to store and carry out background processing and conversion, it is to convert a string to object, because the background objects are handled.
2, the output domain user can not input data components, such as: Insert
Insert the format attribute set for the sub-class Examples java.text.Format.
Second, data storage format
This situation occurred in the imported components. Please refer to the first note of the parseText.
Therefore, Tapestry formatting of data processing through the translator and the format in two ways to deal with.
tapestry & hivemind Articles
- Tapestry Developer's Guide (6)
- Tapestry Developer's Guide (5)
- Tapestry Developer's Guide (3)
- Tapestry Developer's Guide (2)
- Tapestry Developer's Guide (1)
- Tapestry sub-page to identify and resolve issues
- 5 Cart tapestry, let us try to do some small
- tapestry Cart 4, the purchase of the amount of statistics
- 3 Cart tapestry to buy fruit
- 2 Cart tapestry, fruit shop
- 1 Cart tapestry, landing
- Wap Application Development Tapestry (Original)
- tapestry environmental structures
- Tapestry4 refused the injection (Inject) function
- Tapestry template technology into
- tapestry of research and application of binding
- Tapestry framework to expand research
- Exception Handling Tapestry modify page
- Tapestry data format conversion and storage of the study between the 2
- Tapestry data format conversion and storage of the study between 1
Can't Find What You're Looking For?
Rating: Not yet rated