| Summary: | [protocol] update non-widget protocol object-types handling | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Tim Buschtoens <tbuschto> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | tbuschto |
| Version: | 2.0 | ||
| Target Milestone: | 2.0 M3 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Tim Buschtoens
These changes will not be in M2. However, commit b30230d5b887bfeda8f6907eee114341fffdf6c3 implements a temporary workaround for history, which in some cases might require sending operations without having been created yet. My suggestion would be to have a flag in the client protocol adapters like "static : true" or "isStatic : true". ("static" would have to be in "", which we currently don't do for keys in adapters.) Then AdapterRegistry or some util class could create entries for these objects in the ObjectRegistry when System.js is processed. The type would be the id. Create operations would be illegal for these types.
Alternatively, a new key like "staticId" or "customId" or "predefinedId" or just "id" could be used to explicitly assign a pre-defined id. Unlike the other approach, this does not set the relationship between type and id in store, which could be good or bad. (I think it's bad, the id should not be able to be any random value).
Fixed with commit 86804e679b0eb58d8ac9d5b208f54c6abe710ab5. Client-side protocol adapter can have a field "service" set to true. In that case the object can not be created, but will be available without creation with the id identical to the type. This pattern is now used for JSExecuter, UICallBack and BrowserHistory. I also renamed the types to include "client" in the namespace. GC, Display are not yet renamed. TextSizeDeterminatation does not yet exist as a type, it's still part of Display. commit e02cbf37a6dd0d6294a3de1861d465d59c19d172 also fixes GC and Display naming. TextSizeDetermination will be dealt with in Bug 388731 . |