Hi,
To be more clear, I need to build something like "customise your
homepage" panel on http://www.bbc.co.uk/. Check it please, I need
exactly to reload my home page when the Save button is clicked.
Best regards.
On Oct 30, 1:08 pm, Muhannad <[EMAIL PROTECTED]> wrote:
> I'm afraid that I'm not that professional in GWT yet. Would you please
> tell me what changes should I do in pseudo code at least?
> I mean, how would I do set fire events to MyDataStructure and how to
> register MyObject to handle it??
>
> On Oct 30, 12:48 pm, Thomas Broyer <[EMAIL PROTECTED]> wrote:
>
> > On 30 oct, 10:35, Muhannad <[EMAIL PROTECTED]> wrote:
>
> > > On Oct 30, 12:12 pm, Thomas Broyer <[EMAIL PROTECTED]> wrote:
>
> > > > (I'm really wondering what use case you have to need reloading your
> > > > module *and* get a hint about the reload count)
>
> > > Well, my application needs to do the following:
> > > 1. OnModuleLoad()
> > > a. load data from data base into data structure let's say
> > > MyDataStructure
> > > for example:
> > > private MyDataStructure my_data = new MyDataStructure();
>
> > > public void OnModuleLoad(){
> > > MyDataStructure = load_data_from_db();
> > > .....
>
> > > b. pass this data structure to a child (not in terms of
> > > inheritance, composition maybe) object (let's say MyObject) that could
> > > manipulate this data structure (set some attributes to that data)
> > > ...
> > > MyObject my_object = new MyObject(my_data);
> > > ...
>
> > > c. display that object (MyObject) in some container, taking into
> > > account its data (already passed by its parent)
> > > ...
> > > Panel my_panel = new Panel();
> > > my_panel.add(my_object);
> > > ...
>
> > > 2. on MyObject class
>
> > > public class MyObject extends Composite{
> > > private MyDataStructure my_data = new MyDataStructure();
>
> > > public MyObject(MyDataStructure my_data){
> > > this.my_data = my_data;
> > > }
>
> > > //here somewhere and depending on some actions MyObject class
> > > could add some attributes to its data e.g. setVisible(false)...
>
> > > }
>
> > > So, I need, depending on an action button to reflect that changes on
> > > that displayed object on the panel but I don't need the whole data to
> > > be reloaded .. how could I do that?
>
> > Tell your MyObject that the MyDataStructure has changed and that it
> > should refresh. To do that, you could have MyDataStructure "fire
> > events" and MyObject register to handle them.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---