binding data

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

binding data

gr8coat
This post has NOT been accepted by the mailing list yet.
Hello,
I subscribe but it seems as if it tells me I am not. However, I am logged
into the user forum ?

My question:

I wish to attach userData to my custom component.  I attach it to my object
by putting it into the UserData dictionary.
Now  I wish to get it.  however I wish to have my constructor parse some of
it for display so that the skin comes up with it.  So it isn't a simple
setThis.  I am not sure the best way to do this. Can someone suggest?

I have so far :

MyComponent myComponent = new MyComponent();
mycomponent.getUserData.put("file", file);


now in my constructor :

MyComponent() {
installSkin(MyComponent.class);
file = (File)this.getUserData().get("file");
parseData();  ??????
}

File file;


...
but this bad form since the constructor is building the class as I would be
called a method of the class.
So If I remove parseData from the constructor and make it a public method I
can call :

myComonent.parseData();

However I am unsure how to get my parsed data entries into the user
directory without explicitly putting them in. i would like acccess the same
way that the styles dictionary works, ie. the setThis(), setThat()
methodology where This and That are then styles in the Styles dictionary.
Does UserData dictionary have an equivalent.

thanks

(ps when I post from the web interface, mailer-daemon sends back a message I am not subscribed even though I am registered and logged into my subscribed account.  why is this?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: binding data

Sandro Martini
Hi,

> ps when I post from the web interface, mailer-daemon sends back a message I am not subscribed even though I am registered and logged into my subscribed account.  why is this?
Nabble is a service that get Apache mailing lists and publish them in a web frontend, but it's not strictly related to Apache.

You should subscribe to Apache Pivot mailing list/s (in your case our User mailing list should be enough for now), so then even when writing posts from here, Nabble will be able to forward your posts to Apache mailing lists ...

Some info here:
http://pivot.apache.org/lists.html


Bye,
Sandro

Loading...