Search in sources :

Example 6 with JsonResponse

use of org.eclipse.scout.rt.ui.html.json.JsonResponse in project scout.rt by eclipse.

the class JsonFormField method handleModelPropertyChange.

@Override
protected void handleModelPropertyChange(PropertyChangeEvent event) {
    // [Similar code exist in JsonAction]
    if (IFormField.PROP_VISIBLE.equals(event.getPropertyName()) && !getModel().isVisibleGranted()) {
        JsonResponse response = getUiSession().currentJsonResponse();
        if (response.containsAdapter(this) && response.isWritable()) {
            dispose();
            return;
        }
        LOG.warn("Setting visibleGranted=false has no effect, because JsonAdapter {} ({}) is already sent to the UI.", getId(), getModel());
    }
    super.handleModelPropertyChange(event);
}
Also used : JsonResponse(org.eclipse.scout.rt.ui.html.json.JsonResponse)

Aggregations

JsonResponse (org.eclipse.scout.rt.ui.html.json.JsonResponse)6 Test (org.junit.Test)3 JsonEvent (org.eclipse.scout.rt.ui.html.json.JsonEvent)2 TableWith3Cols (org.eclipse.scout.rt.ui.html.json.table.fixtures.TableWith3Cols)2 ITable (org.eclipse.scout.rt.client.ui.basic.table.ITable)1 IColumn (org.eclipse.scout.rt.client.ui.basic.table.columns.IColumn)1 IDesktop (org.eclipse.scout.rt.client.ui.desktop.IDesktop)1 JsonAdapterRegistryTest (org.eclipse.scout.rt.ui.html.json.JsonAdapterRegistryTest)1 DesktopWithOneOutline (org.eclipse.scout.rt.ui.html.json.desktop.fixtures.DesktopWithOneOutline)1 JsonForm (org.eclipse.scout.rt.ui.html.json.form.JsonForm)1 FormWithOneField (org.eclipse.scout.rt.ui.html.json.form.fixtures.FormWithOneField)1 JSONObject (org.json.JSONObject)1