Class: ReferenceElement

Inherits:
ValueElement show all
Defined in:
lib/fxmlloader/real_elts.rb

Overview

Element representing a reference

Instance Attribute Summary collapse

Attributes inherited from ValueElement

#fx_id

Attributes inherited from Element

#current, #eventHandlerAttributes, #instancePropertyAttributes, #lineNumber, #loadListener, #parent, #parentLoader, #staticPropertyAttributes, #staticPropertyElements, #value, #valueAdapter, #xmlStreamReader

Instance Method Summary collapse

Methods inherited from ValueElement

#getListValue, #processCharacters, #processEndElement, #processStartElement, #processValue

Methods inherited from Element

#add, #addEventHandler, #applyProperty, #callz, #getProperties, #getValueAdapter, #initialize, #isBidirectionalBindingExpression, #isBindingExpression, #isCollection, #isTyped, #populateArrayFromString, #populateListFromString, #processCharacters, #processEndElement, #processEventHandlerAttributes, #processInstancePropertyAttributes, #processPropertyAttribute, #processStartElement, #processValue3, #resolvePrefixedValue, #set, #staticLoad, #updateValue, #warnDeprecatedEscapeSequence

Constructor Details

This class inherits a constructor from Element

Instance Attribute Details

#sourceObject

Returns the value of attribute source.



256
257
258
# File 'lib/fxmlloader/real_elts.rb', line 256

def source
  @source
end

Instance Method Details

#constructValueObject



277
278
279
280
281
282
283
284
285
286
287
288
# File 'lib/fxmlloader/real_elts.rb', line 277

def constructValue()
  if (source == nil)
    raise LoadException.new(FXL::REFERENCE_SOURCE_ATTRIBUTE + " is required.");
  end

  path = KeyPath.parse(source);
  if (!Expression.isDefined(parentLoader.namespace, path))
    raise LoadException.new("Value \"" + source + "\" does not exist.");
  end

  return Expression.get(parentLoader.namespace, path);
end

#processAttribute(prefix, localName, value) ⇒ Object



259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# File 'lib/fxmlloader/real_elts.rb', line 259

def processAttribute(prefix, localName, value)
dputs callz + "processing attrib"
dp prefix, localName, value
  if (prefix == nil)
    if (localName == (FXL::REFERENCE_SOURCE_ATTRIBUTE))
      if (loadListener != nil)
        loadListener.readInternalAttribute(localName, value);
      end
      dputs callz + "SAVING SOURCES"
      @source = value;
    else
      super(prefix, localName, value);
    end
  else
    super(prefix, localName, value);
  end
end