Your posting has ModelLocator in the subject.
If you had an additional level between the user object and the binding
(like the ModelLocator of Cairngorm), it would work as well.
?xml version=1.0 encoding=utf-8?
mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
For me too but you dont change the user during runtime.
?xml version=1.0 encoding=utf-8?
mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:Script
![CDATA[
[Bindable]
private var userBind : User = User.getInstance();
private function changeUser():void{
User.setUser(new
You are binding to the concrete instance of the User. If you change
the instance, the binding is lost.
If you change the content of the bound User object, it should work.
Cheers
Ralf
On Nov 24, 2007 4:55 PM, nxzone [EMAIL PROTECTED] wrote:
For me too but you dont change the user during
Yes, the binding is lost because it now working. But do you know how
to do this? Now i'm doing this with a watcher and is working. Anybody
have another suggestion?
Thank you
--- In flexcoders@yahoogroups.com, Ralf Bokelberg
[EMAIL PROTECTED] wrote:
You are binding to the concrete instance of
Is fullname declared as bindable as well?
Cheers
Ralf.
On Nov 23, 2007 8:05 PM, nxzone [EMAIL PROTECTED] wrote:
Thank you for you answer. But is not working...
I tried this:
In User.AS
public static function setUser(u:User):void{
loggedUser=u;
}
public static function
Thank you for you answer. But is not working...
I tried this:
In User.AS
public static function setUser(u:User):void{
loggedUser=u;
}
public static function getInstance():User{
if(loggedUser==null){
loggedUser= new User(0,Pas,
}
return loggedUser;
}
In Myapp.mxml
[Bindable]
private
Should i user a observer/watcher
--- In flexcoders@yahoogroups.com, nxzone [EMAIL PROTECTED] wrote:
Why databinding is not working? User class in bindable. When I set the
new user, with setUser the fullname in Myapp in not changed.
In User.AS
public static function
Binding is based on the name of a property, it doesn't work if there
is a method call involved.
Assign the model returned by getInstance to a local bindable property
and bind to it instead.
Cheers
Ralf.
On Nov 23, 2007 5:42 PM, nxzone [EMAIL PROTECTED] wrote:
Should i user a
Yes, all the class
--- In flexcoders@yahoogroups.com, Ralf Bokelberg
[EMAIL PROTECTED] wrote:
Is fullname declared as bindable as well?
Cheers
Ralf.
On Nov 23, 2007 8:05 PM, nxzone [EMAIL PROTECTED] wrote:
Thank you for you answer. But is not working...
I tried this:
The following code works for me
?xml version=1.0 encoding=utf-8?
mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:Script
![CDATA[
[Bindable]
private var userBind : User = User.getInstance();
]]
/mx:Script
mx:Button label={
But if there is no setter function...
protected var _testVar:uint = 10;
[Bindable]
public function get testVar():uint
{
return _testVar;
}
...then my class can only modify testVar through the protected
_testVar property - which isn't bindable and therefore does not cause
data
But testVar is only read-only to outside users - I still want to
modify it within my class and have the changes broadcast to anyone
that wants to bind to it!
Anyone?
Nick.
--- In flexcoders@yahoogroups.com, Paul DeCoursey [EMAIL PROTECTED] wrote:
For read-only properties yu don't set them
On Thursday 08 Mar 2007, durnelln wrote:
...then my class can only modify testVar through the protected
_testVar property - which isn't bindable and therefore does not cause
data bindings to update!
Have your update code dispatchEvent() and do it that way ?
--
Tom Chiverton
Helping to
Thanks Tom,
I've now changed my class to inherit from EventDispatcher and I
manually dispatch a named event when testVar changes. The definition
of testVar is now:
protected var _testVar:uint = 10;
[Bindable(properyChange)]
public function get testVar():uint
{
return _testVar;
On Thursday 08 Mar 2007, durnelln wrote:
simple combination of [Bindable]/getter/setter methods to get Flex
Builder to do all this automatically but ho hum...!
FB is very GUI orientated, one reason I don't miss it that much on Linux.
Now I see the next rev. will have things like refactoring
simple combination of [Bindable]/getter/setter methods to get Flex
Builder to do all this automatically but ho hum...!
FB is very GUI orientated, one reason I don't miss it that much on Linux.
Now I see the next rev. will have things like refactoring support, so it
might
become a bit more of a
On Thursday 08 Mar 2007, Troy Gilbert wrote:
It's got nothing to do with Flex Builder
FB lacks handy code orientated wizards, such as one to create various types of
get/set accessors, choosing instead to focus on GUI building wizards.
Just to be clear- this is a perfectly fine thing for Adobe
For read-only properties yu don't set them as Bindable
Because the data binding from a read-only property occurs only once
at application start up, you omit the [Bindable] metadata tag for the
read-only property.
Paul
--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:
XMLListCollection is the XML-based equivalent of ArrayCollection and
provides a getItemAt() method as well.
HTH,
Ben
--- In flexcoders@yahoogroups.com, iko_knyphausen [EMAIL PROTECTED] wrote:
I am binding a text control to an XML (e4x) node via index. Looks
something like
mx:Text
Thanks Ben.
I may be trying the wrong thing here, but this is the only workingway I came up with:
mx:XMLListCollection id="xlcReportGrid" source="{XMLList(cbReportInfoName.selectedItem.lineItems.columns.column)}"/ and then the Text control that binds to
Here is a real quick proto I wrote for you where I stuff your
textInputs everything into an object. Click the Set Text button to c
the data binded to the texfield. If you have any questions shoot a reply.
Thanks,
-Augie Marcello III
!* RecordData.as *
import
Hi Doug,
binding is a one way connection. You need to bind in the other
direction as well.
If you instantiate your model with mxml you can use the same syntax as
in your textfields.
model:RecordData id=record
model:firstName{firstName.text}/model:firstName
This is a known binding issue with B3. For now, you can refresh the
tree with:
tree.invalidateList();
-TH
--- In flexcoders@yahoogroups.com, Rick Schmitty [EMAIL PROTECTED]
wrote:
Thank you for the reply!
Sorry, I wasnt sure of the exact question because I wasnt sure
what I
was
I'm not exactly sure what the question is, but it seems you're asking
if changes to data pulled from the Tree will be seen in the
original data structure?
If that's what you mean, then you don't need binding, the Tree control
already uses (and returns) your data by reference. If you get a
Thank you for the reply!
Sorry, I wasnt sure of the exact question because I wasnt sure what I
was looking for. So yes the data does update, but the visual
component itself does not.
For example, if you expand the tree, and edit controls, when you
click on controls in the list view, the
Sorry to hijack this thread.
Thanks for the example Tracy. I have somewhat changed
it for Flex2 and run into a small issue. I am using 2 ArrayCollections, one for
the combobox and one for the datagrid:
[Bindable]public var
cbDP:ArrayCollection;[Bindable]public var
@yahoogroups.com
Subject: RE: [flexcoders] Re: databinding issue for combobox
Here is a sample app that migh approach what you want. It assumes
the
item object structures are the same for both controls.
Tracy
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http
@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Stefan Richter
Sent: Thursday, March 30, 2006
4:30 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re:
databinding issue for combobox
Sorry to hijack this thread.
Thanks for the example Tracy. I have somewhat changed
a new
object.
Tracy
From:
flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of Stefan
RichterSent: Thursday, March
30, 2006 4:30 AMTo:
flexcoders@yahoogroups.comSubject: RE: [flexcoders] Re: databinding
issue for combobox
Sorry
;
}//copyObject
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Stefan Richter
Sent: Thursday, March 30, 2006
2:57 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re:
databinding issue for combobox
Good point.
Any idea how that's best
Basically I am calling a query that will populate a combobox. Then
the user will be able to use a click event that will send that value
from the combo box to a datagrid. Right now it sends a value from the
combobox to the datagrid, but what is displayed is [object Object]
instead of the
And you are looking
for
cmbDept.selectedItem.data or
cmbDept.selectedItem.label?
- Original Message -
From:
rgwilson26
To: flexcoders@yahoogroups.com
Sent: Wednesday, March 29, 2006 10:15
AM
Subject: [flexcoders] Re: databinding
issue for combobox
are looking for
cmbDept.selectedItem.data or cmbDept.selectedItem.label?
- Original Message -
From: rgwilson26
To: flexcoders@yahoogroups.com
Sent: Wednesday, March 29, 2006 10:15 AM
Subject: [flexcoders] Re: databinding issue for combobox
Basically I am calling
?
- Original Message -
From: rgwilson26
To: flexcoders@yahoogroups.com
Sent: Wednesday, March 29, 2006 10:15 AM
Subject: [flexcoders] Re: databinding issue for combobox
Basically I am calling a query that will populate a combobox.
Then
the user will be able to use
[mailto:[EMAIL PROTECTED] On
Behalf Of rgwilson26
Sent: Wednesday, March 29, 2006 10:16 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: databinding issue for combobox
Basically I am calling a query that will populate a combobox. Then
the user will be able to use a click event
object.Perhaps you just want:dgResources.addItem(cmbDept.selectedItem);
Tracy-Original Message-From:
flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] OnBehalf Of rgwilson26
Sent: Wednesday, March 29, 2006 10:16 AMTo:
flexcoders@yahoogroups.comSubject: [flexcoders] Re: databinding
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: databinding issue for combobox
Basically I am calling a query that will populate a combobox. Then
the user will be able to use a click event that will send that
value
from the combo box to a datagrid. Right now it sends a value from
Sent: Wednesday, March 29, 2006 8:32 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: databinding issue for combobox
Here is a sample app that migh approach what you want. It assumes the
item object structures are the same for both controls.
Tracy
?xml version=1.0 encoding=utf-8
it may be possible that you sending full object to Datagrid. not
sure but it may posible that u need to send the specific element from
your object from combo-box to datagrid with specific column id...i
mean object.columnID
An object automatically settle to data grid with column name while
39 matches
Mail list logo