| Package | urlkit.rules |
| Class | public class UrlValueRule |
| Inheritance | UrlValueRule UrlBaseRule flash.events.EventDispatcher |
| Subclasses | UrlNavigatorRule |
Ultimately UrlValueRules (or their subclasses such as UrlNavigatorRules) are the places where parts of the URL are connected to specific pieces of state in the application.
This may be done by setting this rule's stringValue property and listening for "change" events indicating that the browser has changed this property, or more conveniently by specifying the sourceValue property as a dot-delimited binding expression for a scalar String, Number or Boolean property of the current MXML document to be bidirectionally bound to this rule.
The defaultValue property of a UrlValueRule permits the rule to both generate and match an empty URL when its value is equal to some value. This is useful when the rule is typically expected to have some default value and it's not desirable to take up space in the URL with that value. So if defaultValue is set to "foo" and the stringValue of the rule is also "foo", then no URL is generated. Conversely, setting an empty URL into such a rule is permitted, and is considered to be an assignment of the string value "foo".
To create a UrlValueRule which simply matches the empty string and isn't bound to any application state (often useful in situations involving UrlNavigatorRules or alternative choices), set the defaultValue to "".
| Property | Defined by | ||
|---|---|---|---|
| active : Boolean [read-only]
| UrlValueRule | ||
| booleanValue : Boolean
Boolean property providing transparent URL encoding of values.
| UrlValueRule | ||
![]() | containerUrl : String
Set the URL for this rule based on some or all of a URL passed in from the containing browser.
| UrlBaseRule | |
| defaultValue : Object
A default value for this rule which is to be mapped to an absent or empty URL value.
| UrlValueRule | ||
| doesMatchUrl : Boolean [read-only]
| UrlValueRule | ||
![]() | enabled : Boolean
Get the value of the enabled flag, gating whether this rule is ever
capable of reflecting or contributing state in the application .
| UrlBaseRule | |
![]() | matchUrlBeginning : Boolean | UrlBaseRule | |
| numberValue : Number
Numeric property providing transparent URL encoding of values
| UrlValueRule | ||
![]() | parent : IUrlRule
Set the parent rule of this rule.
| UrlBaseRule | |
![]() | ready : Boolean
Get a flag indicating whether this rule is sufficiently initialized
to propagate its browser-determined state to the application.
| UrlBaseRule | |
| sourceValue : String [write-only]
Provides this rule with a dot-delimited binding expression
that references a Bindable property accessible from the containing MXML document.
| UrlValueRule | ||
| stringValue : String
An application state property that is bidirectionally coupled to the value-related
portion of this rule's URL, as determined by its urlPattern and urlFormat properties.
| UrlValueRule | ||
![]() | title : String
Get the title component string associated with this rule, to be used
in determining the overall application window title.
| UrlBaseRule | |
![]() | url : String
Get the URL component associated with this rule, representing its
encoding of the current application state.
| UrlBaseRule | |
![]() | urlFormat : String
A string that determines the URL generated by this rule.
| UrlBaseRule | |
![]() | urlPattern : String
A regular expression that will restrict this rule to only be active
for a URL that matches it.
| UrlBaseRule | |
![]() | urlPatternRegEx : RegExp | UrlBaseRule | |
| Property | Defined by | ||
|---|---|---|---|
| defaultStringValue : String [read-only]
| UrlValueRule | ||
![]() | _document : UIComponent Document as passed in via IMXMLObject.initialize()
| UrlBaseRule | |
![]() | _title : String Storage property for title.
| UrlBaseRule | |
![]() | valid : Boolean
Get a flag indicating
| UrlBaseRule | |
| Method | Defined by | ||
|---|---|---|---|
| UrlValueRule | |||
![]() |
defaultPatternFromFormat(f:String):String
[static]
| UrlBaseRule | |
![]() |
exec(url:String):Array
| UrlBaseRule | |
|
initialized(document:Object, id:String):void
| UrlValueRule | ||
![]() |
invalidateState():void
Invalidate the application state of this rule, which ultimately requests the browser
to update its location bar from the top-level rule's URL.
| UrlBaseRule | |
|
matchUrlPrefix(url:String):String
| UrlValueRule | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
applyUrlFormat(stringValue:String):String
| UrlBaseRule | |
![]() |
checkReadiness(e:Event):void
Check this rule to determine whether it's ready, setting the
ready property to reflect this. | UrlBaseRule | |
|
commitBrowserChange():void
Commit a browser change to this rule by altering its string value, subject to
parsing determined by the rule's urlFormat and urlPattern properties.
| UrlValueRule | ||
|
computeApplicationState():void
Compute the application state by encoding this rule's string value as this rule's URL
subject to formatting determined by the rule's urlFormat property.
| UrlValueRule | ||
|
setObjectValue(o:Object):void
| UrlValueRule | ||
|
setRhsSite(o:Object):void
| UrlValueRule | ||
|
setupWatcher():void
| UrlValueRule | ||
![]() |
validateState():void
Validate this rule such that its URL and title correspond to the
application state, as determined by whatever URL/state mapping
this rule defines.
| UrlBaseRule | |
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| This event is dispatched when the URL component for this value changes. | UrlValueRule | |||
![]() | This event is dispatched when the URL component for this value changes. | UrlBaseRule | ||
| active | property |
active:Boolean [read-only]Implementation
public function get active():Boolean
| booleanValue | property |
booleanValue:Boolean [read-write]Boolean property providing transparent URL encoding of values. Note that for brevity in the URL, the characters 't' and 'f' are used to represent the constants true and false.
This property can be used as the source for data binding.
Implementation public function get booleanValue():Boolean
public function set booleanValue(value:Boolean):void
| defaultStringValue | property |
defaultStringValue:String [read-only]Implementation
protected function get defaultStringValue():String
| defaultValue | property |
defaultValue:Object [read-write]A default value for this rule which is to be mapped to an absent or empty URL value.
Implementation public function get defaultValue():Object
public function set defaultValue(value:Object):void
| doesMatchUrl | property |
doesMatchUrl:Boolean [read-only]Implementation
public function get doesMatchUrl():Boolean
| numberValue | property |
numberValue:Number [read-write]Numeric property providing transparent URL encoding of values
This property can be used as the source for data binding.
Implementation public function get numberValue():Number
public function set numberValue(value:Number):void
| sourceValue | property |
sourceValue:String [write-only]Provides this rule with a dot-delimited binding expression that references a Bindable property accessible from the containing MXML document. If provided, this rule will automatically listen for change events on that property and trigger the appropriate browser URL changes; it will also apply browser-initiated URL changes by setting this property when necessary.
Implementation public function set sourceValue(value:String):void
| stringValue | property |
stringValue:String [read-write]An application state property that is bidirectionally coupled to the value-related portion of this rule's URL, as determined by its urlPattern and urlFormat properties.
This property can be used as the source for data binding.
Implementation public function get stringValue():String
public function set stringValue(value:String):void
| UrlValueRule | () | constructor |
public function UrlValueRule()
| commitBrowserChange | () | method |
protected override function commitBrowserChange():voidCommit a browser change to this rule by altering its string value, subject to parsing determined by the rule's urlFormat and urlPattern properties. If no value was explicitly supplied in the URL then the default value for this rule is used.
| computeApplicationState | () | method |
protected override function computeApplicationState():voidCompute the application state by encoding this rule's string value as this rule's URL subject to formatting determined by the rule's urlFormat property. If the string value equals the defaultStringValue for this rule, then that URL is always computed as the empty string (so that defaulted values do not take up space in the URL).
| initialized | () | method |
public override function initialized(document:Object, id:String):voidParameters
document:Object |
|
id:String |
| matchUrlPrefix | () | method |
public override function matchUrlPrefix(url:String):StringParameters
url:String |
String |
| setObjectValue | () | method |
protected function setObjectValue(o:Object):voidParameters
o:Object |
| setRhsSite | () | method |
protected function setRhsSite(o:Object):voidParameters
o:Object |
| setupWatcher | () | method |
protected function setupWatcher():void
| change | event |
flash.events.Event
This event is dispatched when the URL component for this value changes.