Opened 14 years ago
Closed 14 years ago
#1491 closed defect (wontfix)
Widget templates containing widget declarations not rendered correctly
Reported by: | Owned by: | liucougar | |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | Widgets | Version: | 0.3 |
Keywords: | Cc: | [email protected]… | |
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 14 years ago by
comment:2 Changed 14 years ago by
Owner: | changed from bill to liucougar |
---|
comment:3 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Version: | 0.4 → 0.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 14 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
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 14 years ago by
I can not come up with a workaround for this
feel free to contribute patch
comment:6 Changed 14 years ago by
and I don't really see why you can't make them different widgets (rather than sharing the same name)
comment:7 Changed 14 years ago by
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 14 years ago by
Milestone: | 0.4 → 0.5 |
---|---|
severity: | major → normal |
comment:9 Changed 14 years ago by
Component: | Widgets → Editor |
---|
comment:10 Changed 14 years ago by
Component: | Editor → Widgets |
---|
this is definitely not Editor related ;)
comment:11 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Summary: | Widget templates containing widget declarions not rendered correctly → Widget 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.
This is template code for widget X. Depends on frameset attribute value:
Widget X template (frameset="test"):
Widget X template (frameset="lt"):
Widget X template (frameset="ts"):