Templated dojox.form.Manager problem!!!

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Templated dojox.form.Manager problem!!!

Bass
Hi,

I'm trying to build a form widget extending [dojox.form.Manager,dijit._templated] by providing a templateString of my form with a top <form> node.
It renders with no problems and can access extended functionalities except that the parser is not identifying included widgets in template as form elements. and if you wondering, I did set widgetsInTemplate to true.

any help from the Dojo team would be greatful!
Reply | Threaded
Open this post in threaded view
|

Re: Templated dojox.form.Manager problem!!!

neonstalwart
my first guess is that you have not designated a node as your  
containerNode.  in dojox.form.Manager::buildRendering it automatically  
sets the containerNode as the domNode if it has not been set.  
however, dijit._Templated is going to override that and doesn't call  
this.inherited so you will have to designate a containerNode yourself.

a simple fix is to add a dojoAttachPoint="containerNode" to one of the  
nodes (probably the form element) in your template.

i'm not certain this is your problem but it sounds like it might be.

ben...

On Jun 20, 2010, at 4:16 AM, Bass wrote:

>
> Hi,
>
> I'm trying to build a form widget extending
> [dojox.form.Manager,dijit._templated] by providing a templateString  
> of my
> form with a top <form> node.
> It renders with no problems and can access extended functionalities  
> except
> that the parser is not identifying included widgets in template as  
> form
> elements. and if you wondering, I did set widgetsInTemplate to true.
>
> any help from the Dojo team would be greatful!
> --
> View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Templated-dojox-form-Manager-problem-tp908864p908864.html
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Templated dojox.form.Manager problem!!!

Bass
adding dojoAttachPoint="containerNode" on the form node worked like a charm...throwing away 2 days of work coming up with a workaround :)

but after using my [dojox.form.Manager,dijit._Templated] inherited widget another problem occurred on the destroyRendering causing an infinite loop of all other widgets' destroyRendering caused by the overwriting of "dijit._Templated.prototype.destroyRendering" done by dojox.form.Manager, but I got around it by making my form widget inherit directly the dojox.form.manager mixins+dijit._Templated skipping the overwrite.

a little about the destroy event that's causing this:

I wrote a widget extending the dojox FloatingPane which contains in its turn a BorderContainer holding a datagrid in the top and the form widget at the bottom. so after including dojox.form.manager in the inheritance of my form widget, when the FloatingPane is closed it triggers the infinite loop I mentioned above and finally throwing an error "stack overflow" halting the destroyRendering event of all widgets except the ones included within my form.

again thank you for your previous help, for I knew that I was missing something!

cheers!

Bass
Reply | Threaded
Open this post in threaded view
|

Re: Templated dojox.form.Manager problem!!!

Eugene Lazutkin
In reply to this post by Bass
The real problem is that you started from the wrong end:
dojox.form.Manager is a widget that intentionally bypasses templates in
order to use its children:
http://dojotoolkit.org/reference-guide/dojox/form/Manager.html

Please take a look at its code --- you will see that it does some stuff
similar to _Templated reusing _Templated's methods. If you want it to
work on plain vanilla templated widget you just mix in manager's mixins
to it, not the other way around.

Example of a plain vanilla templated widget derived from dojox.form.Manager:

dojo.declare("my.form.TemplatedManager", [
  // our plain vanilla templated widget foundation
  dijit._Widget,
  dijit._Templated,
  // now include form manager mixins
  // include only needed ones!
  dojox.form.manager._Mixin,
  dojox.form.manager._NodeMixin,
  //dojox.form.manager._FormMixin,
  dojox.form.manager._ValueMixin,
  //dojox.form.manager._EnableMixin,
  //dojox.form.manager._DisplayMixin,
  dojox.form.manager._ClassMixin
  // just to show how it is done
  // I commented out some mixins
], {
  // here goes my template
  templateString: dojo.cache("my",
    "form/templates/TemplatedManager.html)
  // your methods go there
});

Or something to this effect.

Cheers,

Eugene

On 6/20/10 3:16 AM, Bass wrote:

>
> Hi,
>
> I'm trying to build a form widget extending
> [dojox.form.Manager,dijit._templated] by providing a templateString of my
> form with a top <form> node.
> It renders with no problems and can access extended functionalities except
> that the parser is not identifying included widgets in template as form
> elements. and if you wondering, I did set widgetsInTemplate to true.
>
> any help from the Dojo team would be greatful!

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Templated dojox.form.Manager problem!!!

vtsuper
Dear all, I am doing something close to this case.
I want to create a template with 1 toolbar(with button) and  a dojox.form.manager with submit and reset button, finally my code like this

//js-------------------------------
dojo.provide("custom.app.Master");

dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dojox.form.manager._Mixin");
dojo.require("dojox.form.manager._NodeMixin");
dojo.require("dojox.form.manager._FormMixin");
dojo.require("dojox.form.manager._ValueMixin");
dojo.require("dojox.form.manager._EnableMixin");
dojo.require("dojox.form.manager._DisplayMixin");
dojo.require("dojox.form.manager._ClassMixin");
dojo.require("dijit.Toolbar");
dojo.require("dijit.form.Button");

dojo.declare("custom.app.Master", [dijit._Widget, dijit._Templated
        /* I am not extend from these obj so I commented out some mixins
        ,dojox.form.manager._Mixin,
        dojox.form.manager._NodeMixin,
        dojox.form.manager._FormMixin,
        dojox.form.manager._ValueMixin,
        dojox.form.manager._EnableMixin,
        dojox.form.manager._DisplayMixin,
        dojox.form.manager._ClassMixin
        */
], {
    widgetsInTemplate:true,
    templateString : dojo.cache("custom","templates/app.Master.html"),

//template--------------------------------------
<div>
    <div id="toolbar_${id}" dojoType="dijit.Toolbar">
        <button dojoType="dijit.form.Button"></button>
    </div>
    <form id="frm_${id}" dojoType="dojox.form.Manager" dojoAttachPoint="frmManager">
        <div dojoAttachPoint='containerNode'></div>
        <div>
            <input id="submitBtn_${id}" type="submit" dojoType="dijit.form.Button"" />  
            <input dojoAttachPoint="resetBtn" type="reset" dojoType="dijit.form.Button" name="resetBtn" />
        </div>
    </form>
</div>

My case is like this, these code will generate following errors if  widgetsInTemplate to true
Error: Tried to register widget with id==frm_test_0 but that id is already registered
Error parsing in _ContentSetter#Setter_addForm_6
Error: Tried to register widget with id==frm_test_0 but that id is already registered
Error undefined running custom onLoad code: This deferred has already been resolved

if a change the widgetsInTemplate to false, then no error will be generate but the dijit.form.button for example reset button will have no response after clicked

Reply | Threaded
Open this post in threaded view
|

Re: Templated dojox.form.Manager problem!!!

Eugene Lazutkin
Sounds like a bug prompted by recent changes in Dijit. Could you file it
at htttp://bugs.dojotoolkit.org/?

Cheers,

Eugene Lazutkin
Dojo Toolkit, Committer
http://lazutkin.com/

On 04/11/2011 06:18 AM, vtsuper wrote:

> Dear all, I am doing something close to this case.
> I want to create a template with 1 toolbar(with button) and  a
> dojox.form.manager with submit and reset button, finally my code like this
>
> //js-------------------------------
> dojo.provide("custom.app.Master");
>
> dojo.require("dijit._Widget");
> dojo.require("dijit._Templated");
> dojo.require("dojox.form.manager._Mixin");
> dojo.require("dojox.form.manager._NodeMixin");
> dojo.require("dojox.form.manager._FormMixin");
> dojo.require("dojox.form.manager._ValueMixin");
> dojo.require("dojox.form.manager._EnableMixin");
> dojo.require("dojox.form.manager._DisplayMixin");
> dojo.require("dojox.form.manager._ClassMixin");
> dojo.require("dijit.Toolbar");
> dojo.require("dijit.form.Button");
>
> dojo.declare("custom.app.Master", [dijit._Widget, dijit._Templated
> /* I am not extend from these obj so I commented out some mixins
> ,dojox.form.manager._Mixin,
> dojox.form.manager._NodeMixin,
> dojox.form.manager._FormMixin,
> dojox.form.manager._ValueMixin,
> dojox.form.manager._EnableMixin,
> dojox.form.manager._DisplayMixin,
> dojox.form.manager._ClassMixin
> */
> ], {
>     widgetsInTemplate:true,
>
> //template--------------------------------------
>
>    
>
>        
>    
>
>    
>        
>
>        
>
>             &nbsp;&nbsp;
>            
>        
>
>    
>
>
> My case is like this, these code will generate following errors if
> widgetsInTemplate to true
> Error: Tried to register widget with id==frm_test_0 but that id is already
> registered
> Error parsing in _ContentSetter#Setter_addForm_6
> Error: Tried to register widget with id==frm_test_0 but that id is already
> registered
> Error undefined running custom onLoad code: This deferred has already been
> resolved
>
> if a change the widgetsInTemplate to false, then no error will be generate
> but the dijit.form.button for example reset button will have no response
> after clicked
>
>
>
> --
> View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Templated-dojox-form-Manager-problem-tp908864p2806150.html
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Templated dojox.form.Manager problem!!!

vtsuper
I just try to change the version back to 1.5.1rc1, but the error was occur too.
Anything I can do now?



P.S. since I'm not sure it is a bug or not so I not yet submit it to bugs.dojotoolkit.org
Reply | Threaded
Open this post in threaded view
|

Re: Templated dojox.form.Manager problem!!!

vtsuper
before I found the bugs, I found another problem.

my template is like this
<div>
    <div id="toolbar_${id}" dojoType="dijit.Toolbar">
        <button dojoType="dijit.form.Button"></button>
        <button dojoType="dijit.form.Button"></button>
    </div>

    <form id="frm_${id}" name="frm_${id}" dojoType="dojox.form.Manager">
        <div dojoAttachPoint='containerNode'></div>
        <div style="text-align:center;">
            <input dojoAttachPoint="submitBtn" type="submit" dojoType="dijit.form.Button" name="submitBtn" />
            <input dojoAttachPoint="resetBtn" type="reset" dojoType="dijit.form.Button" name="resetBtn"  />
        </div>
    </form>
</div>


and here are the markup
<form dojoType="custom.form.manager">
    <input type="text" />
    <input type="text" />
    <input type="text" />
</form>

What I want to do is put this 3 textbox into containerNode. Everything work perfect but when I disable the whole form, the last 2 button will be ignored. And then I found the reason should be here, in _mixin.js, the function 'registerWidgetDescendants' call
var widgets = dojo.map(widget.getDescendants(), registerWidget, this);
to register all widget, but I found that the widget.getDescendants() only register widget within containerNode. So the last 2 button will not belongs to the dojox.form.manager

So would you pls give me some advise?
Reply | Threaded
Open this post in threaded view
|

Re: Templated dojox.form.Manager problem!!!

Eugene Lazutkin
What exactly the problem? Can't you put all widgets inside the
containerNode?

Cheers,

Eugene Lazutkin
Dojo Toolkit, Committer
http://lazutkin.com/

On 04/13/2011 10:52 PM, vtsuper wrote:

> before I found the bugs, I found another problem.
>
> my template is like this
>
>    
>
>        
>        
>    
>
>
>    
>        
>
>        
>
>            
>            
>        
>
>    
>
>
>
> and here are the markup
>
>    
>    
>    
>
>
> What I want to do is put this 3 textbox into containerNode. Everything work
> perfect but when I disable the whole form, the last 2 button will be
> ignored. And then I found the reason should be here, in _mixin.js, the
> function 'registerWidgetDescendants' call
> var widgets = dojo.map(widget.getDescendants(), registerWidget, this);
> to register all widget, but I found that the widget.getDescendants() only
> register widget within containerNode. So the last 2 button will not belongs
> to the dojox.form.manager
>
> So would you pls give me some advise?
>
> --
> View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Templated-dojox-form-Manager-problem-tp908864p2818928.html
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Templated dojox.form.Manager problem!!!

vtsuper
accroding to the same markup, I got different result if I put the containerNode in different position

<script> var test = new custom.form.Manager({},'test'); code = new dijit.form.TextBox({},'code'); name = new dijit.form.TextBox({},'name'); new dijit.form.SimpleTextarea({name:"desc"},'desc'); </script>
<form id="test">
    <fieldset>
        <legend>Basic Information</legend>
                                                                                                                                                                                                                                                                                                       
Code:<input type="text" id="code"/>
Name:<input type="text" id="name'/>
Description:<textarea id="desc"></textarea>
    </fieldset>
</form>


CASE 1 : I guess the 2 button was replace by the new container node
    <form id="frm_${id}" dojoType="dojox.form.Manager" dojoAttachPoint="fm" dojoAttachPoint='containerNode' >
        <div style="text-align:center;">
            <input type="submit" dojoType="dijit.form.Button" name="submitBtn" label="submit" />  
            <input dojoAttachPoint="resetBtn" type="reset" dojoType="dijit.form.Button" name="resetBtn" abel="reset" />
        </div> 
    </form>
case 1



CASE 2 : the new widgent attach to the end of containernode
    <form id="frm_${id}" dojoType="dojox.form.Manager" dojoAttachPoint="fm" >
        <div dojoAttachPoint='containerNode' >   
            <div style="text-align:center;">
                <input type="submit" dojoType="dijit.form.Button" name="submitBtn" label="submit" />  
                <input dojoAttachPoint="resetBtn" type="reset" dojoType="dijit.form.Button" name="resetBtn" abel="reset" />
            </div> 
        </div> 
    </form>
case2



CASE 3 : the widget position is correct by the container node ignore this 2 button so I can't disabled by form manager
    <form id="frm_${id}" dojoType="dojox.form.Manager" dojoAttachPoint="fm" >
        <div dojoAttachPoint='containerNode' ></div>    
        <div style="text-align:center;">
            <input type="submit" dojoType="dijit.form.Button" name="submitBtn" label="submit" />  
            <input dojoAttachPoint="resetBtn" type="reset" dojoType="dijit.form.Button" name="resetBtn" abel="reset" />
        </div> 
    </form>
case 3

so I dont know how to handle the containerNode
Reply | Threaded
Open this post in threaded view
|

Re: Templated dojox.form.Manager problem!!!

Eugene Lazutkin
dojox.form.Manager is used solely for inline (static) node/widget
placement similar to Dijit templating. It doesn't define nor support any
useful methods, other than defined in mixins.

You can find the official documentation on dojox.form.Manager
(apparently it got lost while transitioning to dojotoolkit.org) here:
http://docs.dojocampus.org/dojox/form/Manager

Other components (mixins) and concepts are introduced here:
http://docs.dojocampus.org/dojox/form/manager

While you can treat Manager as a container (in a dijit.Container sense),
you'll be on your own. Most probably you want to construct your own
widget using available mixins to manage form components, and implement
other methods on your own using existing dijit components.

Cheers,

Eugene Lazutkin
Dojo Toolkit, Committer
http://lazutkin.com/

On 04/16/2011 12:52 AM, vtsuper wrote:

> accroding to the same markup, I got different result if I put the
> containerNode in different position
>
>
>
> <form id="test">
>     <fieldset>
>         <legend>Basic Information</legend>
>                 <table>
>                     <tr>
>                         <td>Code:</td>
>                         <td><input type="text" id="code"/></td>
>                     </tr>
>                     <tr>
>                         <td>Name:</td>
>                         <td><input type="text" id="name'/></td>
>                     </tr>
>                     <tr>
>                         <td>Description:</td>
>                         <td></td>
>                     </tr>
>                 </table>
>     </fieldset>
> </form>
>
>
> CASE 1 : I guess the 2 button was replace by the new container node
>     &lt;form id=&quot;frm_${id}&quot;
> dojoType=&quot;dojox.form.Manager&quot; dojoAttachPoint=&quot;fm&quot;
> dojoAttachPoint='containerNode' &gt;
>         <div style="text-align:center;">
>             <input type="submit" dojoType="dijit.form.Button"
> name="submitBtn" label="submit" />&nbsp;&nbsp;
>             <input dojoAttachPoint="resetBtn" type="reset"
> dojoType="dijit.form.Button" name="resetBtn" abel="reset" />
>         </div>
>     </form>
> http://dojo-toolkit.33424.n3.nabble.com/file/n2827285/case1.jpg 
>
>
>
> CASE 2 : the new widgent attach to the end of containernode
>     <form id="frm_${id}" dojoType="dojox.form.Manager" dojoAttachPoint="fm"
>>
>         <div dojoAttachPoint='containerNode' >  
>             <div style="text-align:center;">
>                 <input type="submit" dojoType="dijit.form.Button"
> name="submitBtn" label="submit" />&nbsp;&nbsp;
>                 <input dojoAttachPoint="resetBtn" type="reset"
> dojoType="dijit.form.Button" name="resetBtn" abel="reset" />
>             </div>
> </div>
>     </form>
> http://dojo-toolkit.33424.n3.nabble.com/file/n2827285/case2.jpg 
>
>
>
> CASE 3 : the widget position is correct by the container node ignore this 2
> button so I can't disabled by form manager
>     <form id="frm_${id}" dojoType="dojox.form.Manager" dojoAttachPoint="fm"
>>
>         <div dojoAttachPoint='containerNode' ></div>    
>         <div style="text-align:center;">
>             <input type="submit" dojoType="dijit.form.Button"
> name="submitBtn" label="submit" />&nbsp;&nbsp;
>             <input dojoAttachPoint="resetBtn" type="reset"
> dojoType="dijit.form.Button" name="resetBtn" abel="reset" />
>         </div>
>     </form>
> http://dojo-toolkit.33424.n3.nabble.com/file/n2827285/case3.jpg 
>
> so I dont know how to handle the containerNode
>
> --
> View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Templated-dojox-form-Manager-problem-tp908864p2827285.html
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Templated dojox.form.Manager problem!!!

dylanks
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

on 4/16/11 12:49 AM (GMT-07:00) Eugene Lazutkin said the following:
> dojox.form.Manager is used solely for inline (static) node/widget
> placement similar to Dijit templating. It doesn't define nor support any
> useful methods, other than defined in mixins.
>
> You can find the official documentation on dojox.form.Manager
> (apparently it got lost while transitioning to dojotoolkit.org) here:
> http://docs.dojocampus.org/dojox/form/Manager

> Other components (mixins) and concepts are introduced here:
> http://docs.dojocampus.org/dojox/form/manager

I believe the problem here is that the URLs are upper and lower case but
otherwise have the same url.

That said, I would suggest the following URLs:

http://dojotoolkit.org/reference-guide/dojox/form/Manager.html
http://dojotoolkit.org/api/1.6/dojox/form/manager
http://dojotoolkit.org/api/1.6/dojox/form/Manager

We're strongly encouraging the usage of the Dojo site and not the campus
site for all docs whenever possible to prevent confusion about which
source is definitive. I'm not sure what to suggest about the content for
Manager vs. manager that's on campus, other than this overloading is
causing the small amount of missing content on dtk.

Regards,
- -Dylan

> While you can treat Manager as a container (in a dijit.Container sense),
> you'll be on your own. Most probably you want to construct your own
> widget using available mixins to manage form components, and implement
> other methods on your own using existing dijit components.
>
> Cheers,
>
> Eugene Lazutkin
> Dojo Toolkit, Committer
> http://lazutkin.com/
>
> On 04/16/2011 12:52 AM, vtsuper wrote:
>> accroding to the same markup, I got different result if I put the
>> containerNode in different position
>>
>>
>>
>> <form id="test">
>>     <fieldset>
>>         <legend>Basic Information</legend>
>>                 <table>
>>                     <tr>
>>                         <td>Code:</td>
>>                         <td><input type="text" id="code"/></td>
>>                     </tr>
>>                     <tr>
>>                         <td>Name:</td>
>>                         <td><input type="text" id="name'/></td>
>>                     </tr>
>>                     <tr>
>>                         <td>Description:</td>
>>                         <td></td>
>>                     </tr>
>>                 </table>
>>     </fieldset>
>> </form>
>>
>>
>> CASE 1 : I guess the 2 button was replace by the new container node
>>     &lt;form id=&quot;frm_${id}&quot;
>> dojoType=&quot;dojox.form.Manager&quot; dojoAttachPoint=&quot;fm&quot;
>> dojoAttachPoint='containerNode' &gt;
>>         <div style="text-align:center;">
>>             <input type="submit" dojoType="dijit.form.Button"
>> name="submitBtn" label="submit" />&nbsp;&nbsp;
>>             <input dojoAttachPoint="resetBtn" type="reset"
>> dojoType="dijit.form.Button" name="resetBtn" abel="reset" />
>>         </div>
>>     </form>
>> http://dojo-toolkit.33424.n3.nabble.com/file/n2827285/case1.jpg 
>>
>>
>>
>> CASE 2 : the new widgent attach to the end of containernode
>>     <form id="frm_${id}" dojoType="dojox.form.Manager" dojoAttachPoint="fm"
>>         <div dojoAttachPoint='containerNode' >  
>>             <div style="text-align:center;">
>>                 <input type="submit" dojoType="dijit.form.Button"
>> name="submitBtn" label="submit" />&nbsp;&nbsp;
>>                 <input dojoAttachPoint="resetBtn" type="reset"
>> dojoType="dijit.form.Button" name="resetBtn" abel="reset" />
>>             </div>
>> </div>
>>     </form>
>> http://dojo-toolkit.33424.n3.nabble.com/file/n2827285/case2.jpg 
>>
>>
>>
>> CASE 3 : the widget position is correct by the container node ignore this 2
>> button so I can't disabled by form manager
>>     <form id="frm_${id}" dojoType="dojox.form.Manager" dojoAttachPoint="fm"
>>         <div dojoAttachPoint='containerNode' ></div>    
>>         <div style="text-align:center;">
>>             <input type="submit" dojoType="dijit.form.Button"
>> name="submitBtn" label="submit" />&nbsp;&nbsp;
>>             <input dojoAttachPoint="resetBtn" type="reset"
>> dojoType="dijit.form.Button" name="resetBtn" abel="reset" />
>>         </div>
>>     </form>
>> http://dojo-toolkit.33424.n3.nabble.com/file/n2827285/case3.jpg 
>>
>> so I dont know how to handle the containerNode
>>
>> --
>> View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Templated-dojox-form-Manager-problem-tp908864p2827285.html
>> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
>> _______________________________________________
>> FAQ: http://dojotoolkit.org/support/faq
>> Book: http://docs.dojocampus.org
>> [hidden email]
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>>
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2pUHMACgkQ1E2HcBNypM759wCdH/ApHVkt8qkw8su/ow5IgSIP
8HYAn1Sc64Hzu67lk2E5CVqkokney1jD
=Yq75
-----END PGP SIGNATURE-----
_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://docs.dojocampus.org
[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Co-Founder, Dojo Toolkit
CEO, SitePen, Inc.  http://www.sitepen.com/
Reply | Threaded
Open this post in threaded view
|

Re: Templated dojox.form.Manager problem!!!

vtsuper
In reply to this post by Eugene Lazutkin
After my investigation, I have some conclution about the errs I report before. If no one know the reason then I will report it as a bugs.

my custom widget is like this

dojo.provide("custom.app.Master2");

dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dojox.form.manager._Mixin");
dojo.require("dijit.form.Button");

dojo.declare("custom.app.Master2", [dijit._Widget, dijit._Templated, dojox.form.manager._Mixin], {
    widgetsInTemplate:true,
    templateString :'<div><button dojoType="dijit.form.Button" label="save"></button><form dojoType="dojox.form.Manager"><div dojoAttachPoint="containerNode"></div></form></div>'
});


this widget is work without any errors. BUT if you use it inside a dojox.layout.contentPane and the parseOnLoad:true(no erros if I set it to false), then the error occurs

new dojox.layout.ContentPane({
    id:tabID,
    parseOnLoad:true,
    preventCache:true,
    scriptHasHooks:true,
    href:'xxx/xxx.php'
});

the error is like this, these error occurs in FF,Chrome and dojo1.5.1,1.6 and 1.6.1

Error: Tried to register widget with id==fm_frm_0 but that id is already registered
// The name of a module, or the name of a module file or a specific
bootstrap.js (line 495)

Error: Tried to register widget with id==fm_frm_0 but that id is already registered
// The name of a module, or the name of a module file or a specific
bootstrap.js (line 495)

Error parsing in _ContentSetter#Setter_addForm_6
Error: Tried to register widget with id==fm_frm_0 but that id is already registered
[Break On This Error] // The name of a module, or the name of a module file or a specific
bootstrap.js (line 495)
bootstrap.js (line 1041)

Error undefined running custom onLoad code: This deferred has already been resolved
(915 out of range 290)