Panels and instantiations.

6 messages Options
Embed this post
Permalink
Tómas Guðmundsson

Panels and instantiations.

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi all.

 

I am trying to figure out how and where widget‘s like TaskPane and Legend.js get instantiated ? Is it onely from ApplicationDefinition.xml  or is it somewhere called in fusion.js or fusion.combined.js ? Any help to how to construct a Panel Widget would be very helpful.

 

Regards

Tómas from the very recently earthquake shooken Iceland.


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Jason Fournier

RE: Panels and instantiations.

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi Tomas,

 

If I follow you correctly I seem to recall Panels getting created in Jx and then applying a content.id to attach to a widget in the AppDef:

 

    var p1 = new Jx.Panel({label: 'Legend'});

    p1.content.id = 'Legend';

 

in your AppDef you’d have a widget with Name Legend.

 

This was a while ago so things might have changed since.

 

Best regards,

Jason

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Tómas Guðmundsson
Sent: Friday, May 30, 2008 7:24 AM
To: [hidden email]
Subject: [fusion-users] Panels and instantiations.

 

Hi all.

 

I am trying to figure out how and where widget‘s like TaskPane and Legend.js get instantiated ? Is it onely from ApplicationDefinition.xml  or is it somewhere called in fusion.js or fusion.combined.js ? Any help to how to construct a Panel Widget would be very helpful.

 

Regards

Tómas from the very recently earthquake shooken Iceland.


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Paul Spencer-2

Re: Panels and instantiations.

Reply Threaded More More options
Print post
Permalink
In reply to this post by Tómas Guðmundsson
Tómas,

the panel part is actually external to fusion at this time.  If you  
look in the index.html file, you will find some start up code that  
sets up the page layout using Jx.Layout and creates some other Jx-
specific containers such as Jx.Splitter, Jx.Panel etc.  The content  
areas of these are assigned ids that match the <Name> of a widget in  
the ApplicationDefinition.xml so Fusion creates the widgets inside  
these containers.

This means that a Widget is not inherently a Panel but can be placed  
*in* a Panel.

I think that there is work that could be done in the  
ApplicationDefinition structure to define more Container types and  
eventually manage the page layout through the ApplicationDefinition -  
but I don't want to remove the flexibility that we have now so it  
would definitely be optional!

Cheers

Paul

On 30-May-08, at 7:23 AM, Tómas Guðmundsson wrote:

> Hi all.
>
> I am trying to figure out how and where widget‘s like TaskPane and  
> Legend.js get instantiated ? Is it onely from  
> ApplicationDefinition.xml  or is it somewhere called in fusion.js or  
> fusion.combined.js ? Any help to how to construct a Panel Widget  
> would be very helpful.
>
> Regards
> Tómas from the very recently earthquake shooken Iceland.
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://www.dmsolutions.ca/

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Tómas Guðmundsson

RE: Panels and instantiations.

Reply Threaded More More options
Print post
Permalink
In reply to this post by Jason Fournier
Some javascript/style in this post has been disabled (why?)

Hi Jason.

 

Yes this was what I was looking for. Just got back from lunch so I’ll look into it.  It looks to me like that is how you get a new Widget *in* to a panel like Paul talked about. I have currently mastered the Jx.Panels and done something cool with them. I thought of an idea that might be bad it might be good, don’t know 100% how this was designed. But if some widget’s like the Legend would Inherit or extend a Jx.Panel so functionality of a panel might be configurable / controllable by the widget itself. For instance, when a panel is maximized (which I think is no way for the widget Legend to find out) it might call for a selection in the map and do something with that. Just wandering right now, there might be some hidden functionality in there.

 

Regards,

Tómas.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jason Fournier
Sent: 30. maí 2008 11:44
To: [hidden email]
Subject: RE: [fusion-users] Panels and instantiations.

 

Hi Tomas,

 

If I follow you correctly I seem to recall Panels getting created in Jx and then applying a content.id to attach to a widget in the AppDef:

 

    var p1 = new Jx.Panel({label: 'Legend'});

    p1.content.id = 'Legend';

 

in your AppDef you’d have a widget with Name Legend.

 

This was a while ago so things might have changed since.

 

Best regards,

Jason

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Tómas Guðmundsson
Sent: Friday, May 30, 2008 7:24 AM
To: [hidden email]
Subject: [fusion-users] Panels and instantiations.

 

Hi all.

 

I am trying to figure out how and where widget‘s like TaskPane and Legend.js get instantiated ? Is it onely from ApplicationDefinition.xml  or is it somewhere called in fusion.js or fusion.combined.js ? Any help to how to construct a Panel Widget would be very helpful.

 

Regards

Tómas from the very recently earthquake shooken Iceland.


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Tómas Guðmundsson

RE: Panels and instantiations.

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hey all.

 

I’m getting errors with a pretty much empty widget.

 

Fusion Error: WARNING: Error occurred in AJAX callback. TypeError: widget.paramRegister is undefined File: undefined (77) xx)

 

When I do console.log(widget.paramRegister) for Legend.js I get undefined. I don’t know what this is about.

 

This is what I have in AppDef.xml

 

     <Widget xsi:type="WidgetType">

       <Name>Information</Name>

       <Type>Information</Type>

       <StatusItem/>    

     </Widget>

 

And my stuff get’s called, I’m just getting this error. Seems like one more thing is missing for it to work properly.

 

Information.js

Fusion.Widget.Information = Class.create();

Fusion.Widget.Information.prototype =

{

    initialize : function(widgetTag) {

        console.log('InformationPanel.initialize');

        var json = widgetTag.extension;

        console.log(widgetTag); // logs  = Object type=Information name=Information location=widgets/

    },

}

 

Cheers

Tómas

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Tómas Guðmundsson
Sent: 30. maí 2008 13:15
To: Jason Fournier
Cc: [hidden email]
Subject: RE: [fusion-users] Panels and instantiations.

 

Hi Jason.

 

Yes this was what I was looking for. Just got back from lunch so I’ll look into it.  It looks to me like that is how you get a new Widget *in* to a panel like Paul talked about. I have currently mastered the Jx.Panels and done something cool with them. I thought of an idea that might be bad it might be good, don’t know 100% how this was designed. But if some widget’s like the Legend would Inherit or extend a Jx.Panel so functionality of a panel might be configurable / controllable by the widget itself. For instance, when a panel is maximized (which I think is no way for the widget Legend to find out) it might call for a selection in the map and do something with that. Just wandering right now, there might be some hidden functionality in there.

 

Regards,

Tómas.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jason Fournier
Sent: 30. maí 2008 11:44
To: [hidden email]
Subject: RE: [fusion-users] Panels and instantiations.

 

Hi Tomas,

 

If I follow you correctly I seem to recall Panels getting created in Jx and then applying a content.id to attach to a widget in the AppDef:

 

    var p1 = new Jx.Panel({label: 'Legend'});

    p1.content.id = 'Legend';

 

in your AppDef you’d have a widget with Name Legend.

 

This was a while ago so things might have changed since.

 

Best regards,

Jason

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Tómas Guðmundsson
Sent: Friday, May 30, 2008 7:24 AM
To: [hidden email]
Subject: [fusion-users] Panels and instantiations.

 

Hi all.

 

I am trying to figure out how and where widget‘s like TaskPane and Legend.js get instantiated ? Is it onely from ApplicationDefinition.xml  or is it somewhere called in fusion.js or fusion.combined.js ? Any help to how to construct a Panel Widget would be very helpful.

 

Regards

Tómas from the very recently earthquake shooken Iceland.


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Chris Claydon

RE: Panels and instantiations.

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi Tómas,

 

I think your widget needs to inherit from the base Widget class…

 

    initialize : function(widgetTag) {

        Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);

 

 ‘paramRegister’ is defined in that base class.

 

Chris.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Tómas Guðmundsson
Sent: May 30, 2008 9:32 AM
To: [hidden email]
Subject: RE: [fusion-users] Panels and instantiations.

 

Hey all.

 

I’m getting errors with a pretty much empty widget.

 

Fusion Error: WARNING: Error occurred in AJAX callback. TypeError: widget.paramRegister is undefined File: undefined (77) xx)

 

When I do console.log(widget.paramRegister) for Legend.js I get undefined. I don’t know what this is about.

 

This is what I have in AppDef.xml

 

     <Widget xsi:type="WidgetType">

       <Name>Information</Name>

       <Type>Information</Type>

       <StatusItem/>    

     </Widget>

 

And my stuff get’s called, I’m just getting this error. Seems like one more thing is missing for it to work properly.

 

Information.js

Fusion.Widget.Information = Class.create();

Fusion.Widget.Information.prototype =

{

    initialize : function(widgetTag) {

        console.log('InformationPanel.initialize');

        var json = widgetTag.extension;

        console.log(widgetTag); // logs  = Object type=Information name=Information location=widgets/

    },

}

 

Cheers

Tómas

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Tómas Guðmundsson
Sent: 30. maí 2008 13:15
To: Jason Fournier
Cc: [hidden email]
Subject: RE: [fusion-users] Panels and instantiations.

 

Hi Jason.

 

Yes this was what I was looking for. Just got back from lunch so I’ll look into it.  It looks to me like that is how you get a new Widget *in* to a panel like Paul talked about. I have currently mastered the Jx.Panels and done something cool with them. I thought of an idea that might be bad it might be good, don’t know 100% how this was designed. But if some widget’s like the Legend would Inherit or extend a Jx.Panel so functionality of a panel might be configurable / controllable by the widget itself. For instance, when a panel is maximized (which I think is no way for the widget Legend to find out) it might call for a selection in the map and do something with that. Just wandering right now, there might be some hidden functionality in there.

 

Regards,

Tómas.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jason Fournier
Sent: 30. maí 2008 11:44
To: [hidden email]
Subject: RE: [fusion-users] Panels and instantiations.

 

Hi Tomas,

 

If I follow you correctly I seem to recall Panels getting created in Jx and then applying a content.id to attach to a widget in the AppDef:

 

    var p1 = new Jx.Panel({label: 'Legend'});

    p1.content.id = 'Legend';

 

in your AppDef you’d have a widget with Name Legend.

 

This was a while ago so things might have changed since.

 

Best regards,

Jason

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Tómas Guðmundsson
Sent: Friday, May 30, 2008 7:24 AM
To: [hidden email]
Subject: [fusion-users] Panels and instantiations.

 

Hi all.

 

I am trying to figure out how and where widget‘s like TaskPane and Legend.js get instantiated ? Is it onely from ApplicationDefinition.xml  or is it somewhere called in fusion.js or fusion.combined.js ? Any help to how to construct a Panel Widget would be very helpful.

 

Regards

Tómas from the very recently earthquake shooken Iceland.


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users