Eric Clayberg wrote:You will need to isolate any code using a RemoteService with an isDesignTime() check. Here's an example of how to use it...
Why is this necessary only when inheriting a service and not when a service is instantiated and used directly in a widget itself? What's the difference?
Using the example I presented earlier. If the LoginPanel, or any of our panels for that matter, instantiate a service themselves, we do not see this problem.
- Code: Select all
class LoginPanel extends BasePanel
{
CommonServiceAsync commonService =
CommonService.Util.getInstance();
<Use common service code here>
}
Designer will only fail on the inherited service. Using the example I used previously. If I extend BasePanel from Composite, thereby removing the inherited service from the BaseWidget, I have no errors and no problems using Designer, no matter now many services I use in the same widget.