Custom Mashlet ExtJS Problem - RadioGroup

nzblue_fish
nzblue_fish's picture
User offline. Last seen 2 weeks 4 days ago. Offline
Joined: 09/30/2009
Points: 1165

Hi mashers,

Does any one in the Community have some experience in using ExtJS for building custom mashlets?  I need some help with a problem trying to create a RadioGroup for a custom mashlet. I've posted to one of the ExtJS forums (no answer yet), but wondered if this might have been a Presto/ExtJS issue.

I'm trying to create a RadioGroup to allow the user to choose between one or other of two databases as the target for a search. Their choice will allow me to tailor the SQL in the EMML for the lookup.

I get the following error when trying to construct the RadioGroup in the mashlet container: Error: _b51[_b5c.xtype || _b5d] is not a constructor

Here's the code snippet from the experimental mashlet:

        var clinicRadGrp = {
                bodyStyle: 'padding-left:5px;',
                xtype: 'fieldset',
                title: 'RxWorks Database',
                autoHeight: true,
                //defaultType: 'radio',
                items : [{
                    xtype: 'radiogroup',
                    fieldLabel: 'Which database',
                    items:[{boxLabel: 'Item 1', name: 'rb-auto', inputValue: 1},
                           {boxLabel: 'Item 2', name: 'rb-auto', inputValue: 2, checked: true}]
                }]
                };

 Now, I've since discovered that the RadioGroup was only added in to ExtJS 2.2.  Is this error because Presto DE is using an older version of ExtJS maybe?  If so, can I upgrade it or do I need to find another way to allow the user to pick the database?

Have I overlooked something else?

Many thanks, Innes

 

0
Your rating: None
jeremy.pitten
jeremy.pitten's picture
User offline. Last seen 2 weeks 6 days ago. Offline
Joined: 09/22/2008
Points: 275

You are right, the current Presto DE uses Ext2.1 so this Ext2.2 component isnt available.

Rather than trying to upgrade Presto DE to use Ext2.2 you could try including the Ext2.2 javascript code for components Ext.form.RadioButton and its superclass Ext.form.CheckBoxGroup as part of your mashlet and hope that the Ext2.1 base class Ext.form.Field is compatible.

nzblue_fish
nzblue_fish's picture
User offline. Last seen 2 weeks 4 days ago. Offline
Joined: 09/30/2009
Points: 1165

Hi Jeremy,

thanks for confirming that. I've built a workaround in the meantime, but will try your suggestion and see what happens.

I'll keep you posted.

Cheers, Innes