hide prompt always for performCustomOperation

Hi,

I’m setting RPCManager.setShowPrompt(false) in my onModuleLoad() but doing a form.getDataSource().performCustomOperation(id, record, callback, properties) still shows the prompt. Does it not work for custom operations?

The properties object is not an RPCRequest, but a DSRequest.

I set the properties.setShowPrompt(false) manually to test, and then it’s gone. The method’s javadoc does mention that it overrides the default RPCManager.setShowPrompt.

tia

SmartGWT EE 2010-10-17

There are multiple levels at which this can be set - RPCManager, DataSource and DS/RPCRequest. For your use case it’s probably best to set it on the request.

I would have liked it to follow the default set in the RPCManager class, but I guess I’ll need my own DSRequest class anyway and can set it there then.

Again, what you’re seeing is cascading defaults. You’ve set the prompt off at the system-wide RPCManager level, but it’s still on (by default) for the DataSource involved, and that takes precedence.