I am using server RPC for this delegation but nothing is fired.
step 1 : create server rpc .
public interface UploadServerRpc extends ServerRpc{
public void clicked(String buttonName);
}
step 2 : create connector class
@Connect(UploadComponent.class)
public class UploadComponentConnector extends UploadConnector {
UploadServerRpc rpc = RpcProxy.create(UploadServerRpc.class, this);
public UploadComponentConnector(){
if(getWidget().isSubClick()) {
rpc.clicked(getWidget().getNotificationName());
}
}
}
step 3 : server side class:
public class UploadComponent extends Upload{
private UploadServerRpc srpc = new UploadServerRpc(){
@Override
public void clicked(String name) {
Notification notification = new Notification(name);
UI.getCurrent().getPage().showNotification(notification);
}
};
public UploadComponent() {
registerRpc(srpc);
}
Note : inside VUpload class hanling some restriction itsworking but cannot delegate notification messsage
Nothing happened …when i clicked vaadin Upload button .