Opened 13 years ago

Closed 12 years ago

#1491 closed defect (wontfix)

Widget templates containing widget declarations not rendered correctly

Reported by: egor.margineanu@… Owned by: liucougar
Priority: high Milestone: 0.9
Component: Widgets Version: 0.3
Keywords: Cc: egor.margineanu@…
Blocked By: Blocking:

Description

Widget template containing widget declaration of the same type (but with different template) not rendered due to too much recursion error.

Change History (11)

comment:1 Changed 13 years ago by egor.margineanu@…

This is template code for widget X. Depends on frameset attribute value:

Widget X template (frameset="test"):

<div style="height:100%;width:100%;">
   <div dojoType="egmar:Splitcontainer" orientation="horizontal" sizerWidth="2" activeSizing="1" style="height:100%;width:100%;margin:0;padding:0;">
      <div dojoType="ContentPane" widgetId="" sizeShare="49" sizeType="%">
         <div dojoType="egmar:Frameset" frameset="lt"></div>
      </div>
      <div dojoType="ContentPane" widgetId="" sizeShare="51" sizeType="%">
         <div dojoType="egmar:Frameset" frameset="lt"></div>
      </div>
   </div>
</div>

Widget X template (frameset="lt"):

<div style="height:100%;width:100%;">
   <div dojoType="egmar:Splitcontainer" orientation="horizontal" sizerWidth="2" activeSizing="1" style="height:100%;width:100%;margin:0;padding:0;">
      <div dojoType="ContentPane" widgetId="" sizeShare="20" sizeType="%"></div>
      <div dojoType="ContentPane" widgetId="" sizeShare="80" sizeType="%">
         <div dojoType="egmar:Frameset" frameset="ts"></div>
      </div>
   </div>
</div>

Widget X template (frameset="ts"):

<div style="height:100%;width:100%;">
   <div dojoType="egmar:Splitcontainer" orientation="vertical" sizerWidth="2" activeSizing="1" style="height:100%;width:100%;margin:0;padding:0;">
      <div dojoType="ContentPane" widgetId="" sizeShare="20" sizeType="%"></div>
      <div dojoType="ContentPane" widgetId="" sizeShare="80" sizeType="%"></div>
   </div>
</div>

comment:2 Changed 13 years ago by bill

Owner: changed from bill to liucougar

comment:3 Changed 13 years ago by liucougar

Resolution: invalid
Status: newclosed
Version: 0.40.3

one widget can only have one template

if you want different templates, than make more than one widgets.

close this as invalid

comment:4 Changed 13 years ago by egor.margineanu@…

Resolution: invalid
Status: closedreopened

If we talk in terms of widgets powered by templates your point of view is wrong. Widget templates can be generated on server side depending on multiple factors. And from point of view of developer your point of view is wrong. I'm not crazy to have 5-6 widgets with the same code but different name. Seems you don't understand complexity of managing code changes in this case.

comment:5 Changed 13 years ago by liucougar

I can not come up with a workaround for this

feel free to contribute patch

comment:6 Changed 13 years ago by liucougar

and I don't really see why you can't make them different widgets (rather than sharing the same name)

comment:7 Changed 13 years ago by egor.margineanu@…

Because I don't know how many levels i'll have. may be 2 or may be 10. all I know is that there is no recursion.

comment:8 Changed 13 years ago by liucougar

Milestone: 0.40.5
severity: majornormal

comment:9 Changed 13 years ago by dylan

Component: WidgetsEditor

comment:10 Changed 13 years ago by liucougar

Component: EditorWidgets

this is definitely not Editor related ;)

comment:11 Changed 12 years ago by bill

Resolution: wontfix
Status: reopenedclosed
Summary: Widget templates containing widget declarions not rendered correctlyWidget templates containing widget declarations not rendered correctly

You can always make multiple widget definitions with different templates but sharing the same code (this is what javascript prototypes are for), and in Dijit 0.9 we will have mechanisms like the WidgetDefinition? widget that make this really simple.

Note: See TracTickets for help on using tickets.