Details
-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.8DR#1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:All
Description
Similarly to ICE-3454, we want to test the component's saveState and restoreState functionality. But in this case, we want to simply look at every field that's non-static, non-final, and non-transient, give them all unique values, save and restore the components, and see if the fields still retain those values.
Issue Links
- blocks
-
ICE-3442 Component saveState restoreState
- Closed
- depends on
-
ICE-3303 Make InputFile's FileInfo Serializable
- Closed
-
ICE-3695 TreeNode do saveState restoreState
- Closed
-
ICE-3701 Tree navigatedNode currentNode state saving
- Closed
-
ICE-3702 SelectInputText selectedItem itemMap state saving
- Closed
-
ICE-3666 Non serialized properties of the components need to be defined as transient
- Closed
Show 1 more links (1 depends on)
Activity
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #17831 | Mon Oct 27 11:45:11 MDT 2008 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/component/test/java/com/icesoft/faces/mock/test/TestDataProvider.java
MODIFY /icefaces/trunk/icefaces/component/test/java/com/icesoft/faces/mock/test/CompPropsUtils.java ADD /icefaces/trunk/icefaces/component/test/java/com/icesoft/faces/mock/test/data/MockMethodBinding.java ADD /icefaces/trunk/icefaces/component/test/java/com/icesoft/faces/mock/test/SerializedViewFieldTest.java |
Mark Collette
created issue -
Mark Collette
made changes -
Field | Original Value | New Value |
---|---|---|
Assignee | Mark Collette [ mark.collette ] |
Mark Collette
made changes -
Fix Version/s | 1.8DR#2 [ 10142 ] | |
Assignee Priority | P1 |
Mark Collette
made changes -
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #17833 | Mon Oct 27 13:11:21 MDT 2008 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/component/build.xml
MODIFY /icefaces/trunk/icefaces/component/test/java/com/icesoft/faces/mock/test/SerializedViewFieldTest.java |
Mark Collette
made changes -
Mark Collette
made changes -
Mark Collette
made changes -
Mark Collette
made changes -
Mark Collette
made changes -
Mark Collette
made changes -
Mark Collette
made changes -
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #17849 | Tue Oct 28 11:36:43 MDT 2008 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/component/test/java/com/icesoft/faces/mock/test/SerializedViewFieldTest.java
|
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #18072 | Tue Dec 16 15:36:40 MST 2008 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/component/test/java/com/icesoft/faces/mock/test/TestDataProvider.java
MODIFY /icefaces/trunk/icefaces/component/test/java/com/icesoft/faces/mock/test/SerializedViewFieldTest.java |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #18073 | Tue Dec 16 15:39:02 MST 2008 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/component/test/java/com/icesoft/faces/mock/test/TestDataProvider.java
|
Ken Fyten
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Assignee Priority | P1 | |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 1.8 [ 10161 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee | Mark Collette [ mark.collette ] |
Initially I implemented utility methods that use reflection, to do the state saving and restoration, which each of the components could use, so that adding or removing fields to/from a component would automatically result in the state saving doing the right thing. The problem was that the reflection code was noticeably slower than the hard coding approach. I tested several iterations of saving and restoring ice:commandButton 10,000 times. With hard coding it would usually take 0 milliseconds, and sometimes take 16 milliseconds. With reflection, the first few "lifecycles" of 10,000 iterations (where I'm simulating a component tree with 10,000 components), would take several hundred milliseconds. After, it would drop down to taking between 40 and 70 milliseconds. We deemed that too expensive in CPU time.
Next, we explored the idea of generating code, for each component class, so that we'd have the best of automatic correctness and fast execution. The problem was that we'd complicate the build process noticeably. As well, it would complicate debugging, since you'd effectivel have two sets of source files and class files, which we thought would be a problem for our users.
There was also the sub-option of code generation, which is class file modification, where we add state saving byte-codes to the class files, without intermediate source files. This still complicates things, and adds a certain degree of black magic, that could cause problems for users.
So, the current solution is to write a solid test platform, to verify the hard coding. It's not as automatic, but is very straightforward, and gives the most flexibility with the greatest simplicity.