HI: Below code is from RequestFactoryEditorDriver:
/**
* Returns a new array containing the request paths.
*
* @return an array of Strings
*/
String[] getPaths();
My question is,
- When and in what place to use this method, there is no place to set paths to the RequestFactoryEditorDriver, is the paths generated when creating the driver? if so, what’s the rule of “generating paths”?
-
I think the client should provide the paths themselves, such as:
factory.find( proxyId ).with( myPaths).fire(…)
other than from RequestFactoryEditorDriver#getPaths(), if the paths get from 1 is not specified.
The paths are computed from the editor hierarchy. The list basically includes all the properties being edited that are not simple values (primitives, strings, dates, etc.)
If you have the following:
getPathswould return"manager", "address".The idea is that you can pass the value directly to
with()and you’ll retrieve all the objects needed by the editor. If you add or remove a subeditor down the hierarchy, you don’t have to change your request code, thegetPathsvalue will be different and contain what’s needed by the editor.