示例#1
0
  @SetupRender
  public void init() {

    sorterPersist = sorter;
    selected = null;
    if (!componentResources.isBound("hideIfEmpty")) {
      hideIfEmpty = true;
    }

    if (!componentResources.isBound("toggleNeeded")) {
      toggleNeeded = false;
    }
  }
示例#2
0
  private void bindParameterFromTemplate(ComponentPageElement component, AttributeToken token) {
    String name = token.getName();
    ComponentResources resources = component.getComponentResources();

    // If already bound (i.e., from the component class, via @Component), then
    // ignore the value in the template. This may need improving to just ignore
    // the value if it is an unprefixed literal string.

    if (resources.isBound(name)) return;

    // Meta default of literal for the template.

    String defaultBindingPrefix =
        determineDefaultBindingPrefix(component, name, BindingConstants.LITERAL);

    Binding binding =
        findBinding(
            loadingElement,
            component,
            name,
            token.getValue(),
            defaultBindingPrefix,
            token.getLocation());

    if (binding != null) {
      component.bindParameter(name, binding);

      Map<String, Binding> bindingMap = componentIdToBindingMap.get(component.getCompleteId());
      bindingMap.put(name, binding);
    }
  }
 /**
  * Get the DataTableModel. If the dataTableModel parameter is not bound, we will use the default
  * implementation
  *
  * @return the DataTableModel
  */
 public DataTableModel getDataTModel() {
   if (resources.isBound("dataTableModel")) {
     return getDataTableModel();
   }
   return getDefaultDataTableModel();
 }