|
|
|
gwt и сериализация
|
|||
|---|---|---|---|
|
#18+
объект1. объект2. всё расширяет IsSerializable. объект1 влючает в себя объект2 как проперти. имеем: Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. хотя по идее не должно, т.к. всё соблюдено: Serializable Types Method parameters and return types must be serializable, which means they must conform to certain restrictions. GWT tries really hard to make serialization as painless as possible, so while the rules regarding serialization are subtle, in practice the behavior becomes intuitive very quickly. A type is serializable and can be used in a service interface if it * is primitive, such as char, byte, short, int, long, boolean, float, or double; * is String, Date, or a primitive wrapper such as Character, Byte, Short, Integer, Long, Boolean, Float, or Double; * is an array of serializable types (including other serializable arrays); * is a serializable user-defined class; or * has at least one serializable subclass Serializable User-defined Classes A user-defined class is serializable if 1. it is assignable to IsSerializable or Serializable, either because it directly implements one of these interfaces or because it derives from a superclass that does 2. all non-final, non-transient instance fields are themselves serializable, and 3. it has a public default (zero argument) constructor The transient keyword is honored, so values in transient fields are not exchanged during RPCs. Fields that are declared final are also not exchanged during RPCs, so they should generally be marked transient as well. так же в объекте1 при объявлении проперти для объекта2 написано Код: plaintext 1. 2. 3. 4. где грабли? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 08.11.2007, 19:06:35 |
|
||
|
|

start [/forum/topic.php?fid=59&fpage=597&tid=2144063]: |
0ms |
get settings: |
8ms |
get forum list: |
18ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
35ms |
get topic data: |
10ms |
get forum data: |
3ms |
get page messages: |
37ms |
get tp. blocked users: |
2ms |
| others: | 346ms |
| total: | 467ms |

| 0 / 0 |
