Here are the examples of the java api com.vaadin.server.Extension.getClass() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
18
Source : MGrid.java
with Apache License 2.0
from ijazfx
with Apache License 2.0
from ijazfx
/**
* Manually forces refresh of all visible rows. ListContainer backing
* MGrid/MTable don't support property change listeners (to save memory and
* CPU cycles). This method explicitly forces Grid's row cache invalidation.
*/
public void refreshVisibleRows() {
Collection<Extension> extensions = getExtensions();
for (Extension extension : extensions) {
// Calling with reflection for 7.6-7.5 compatibility
if (extension.getClreplaced().getName().contains("RpcDataProviderExtension")) {
try {
Method method = extension.getClreplaced().getMethod("refreshCache");
method.invoke(extension);
break;
} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
Logger.getLogger(MGrid.clreplaced.getName()).log(Level.SEVERE, null, ex);
}
}
}
}
18
Source : MGrid.java
with Apache License 2.0
from ijazfx
with Apache License 2.0
from ijazfx
/**
* Manually forces refresh of the row that represents given enreplacedy.
* ListContainer backing MGrid/MTable don't support property change
* listeners (to save memory and CPU cycles). In some case with Grid, if you
* know only certain row(s) are changed, you can make a smaller client side
* change by refreshing rows with this method, instead of refreshing the
* whole Grid (e.g. by re-replacedigning the bean list).
* <p>
* This method is automatically called if you use "editor row".
*
* @param bean the bean whose row should be refreshed.
*/
public void refreshRow(T bean) {
Collection<Extension> extensions = getExtensions();
for (Extension extension : extensions) {
// Calling with reflection for 7.6-7.5 compatibility
if (extension.getClreplaced().getName().contains("RpcDataProviderExtension")) {
try {
Method method = extension.getClreplaced().getMethod("updateRowData", Object.clreplaced);
method.invoke(extension, bean);
break;
} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
Logger.getLogger(MGrid.clreplaced.getName()).log(Level.SEVERE, null, ex);
}
}
}
}