示例#1
0
  @Override
  protected void setValueImpl(String value) {

    // FIXME - We should implement value select for users

    // if mail or organization, use only first value of multivalue attribute
    if (getItemData() != null
        && getItemData().getFormItem() != null
        && ("mail".equals(getItemData().getFormItem().getFederationAttribute())
            || "o".equals(getItemData().getFormItem().getFederationAttribute()))) {

      if (isOnlyPreview()) {

        Span span = new Span();
        span.setText(value.split(";")[0]);
        getPreview().add(span);

      } else {
        getBox().setValue(value.split(";")[0]);
      }

    } else {

      if (isOnlyPreview()) {
        Span span = new Span();
        span.setText(value);
        getPreview().add(span);
      } else {
        getBox().setValue(value);
      }
    }
  }
 @Override
 public DataSetSummary.View showStatusPanel(
     final Boolean backendCacheStatus, final Boolean pushEnabled, final Boolean _refreshStatus) {
   if (backendCacheStatus != null) {
     configureStatusIcon(backendStatusIcon, backendCacheStatus);
     backendStatus.setVisible(true);
   } else {
     backendStatus.setVisible(false);
   }
   if (pushEnabled != null) {
     configureStatusIcon(pushEnabledIcon, pushEnabled);
     pushStatus.setVisible(true);
   } else {
     pushStatus.setVisible(false);
   }
   if (_refreshStatus != null) {
     configureStatusIcon(refreshEnabledIcon, _refreshStatus);
     refreshStatus.setVisible(true);
   } else {
     refreshStatus.setVisible(false);
   }
   return this;
 }
示例#3
0
 public String getText() {
   return span.getText();
 }
示例#4
0
 public void setText(final String text) {
   span.setText(text);
 }