Opened 14 years ago
Closed 9 years ago
#3214 closed enhancement (wontfix)
StackContainer: publish event for unselect
Reported by: | guest | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | future |
Component: | Dijit | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Hi dojo team,
Two enhancement proposal regarding StackContainer:
First idea:
when the 'selectChild' method of StackContainer is called, the following event is published:
dojo.event.topic.publish(this.widgetId+"-selectChild", page);
It would be interesting to have a similar event published just before changing with the old page, e.g.
dojo.event.topic.publish(this.widgetId+"-unselectChild", this.selectedChildWidget);
This would allow the developer to take action such as stopping a timer, or changing the focus...
Second idea:
Another idea would be to programmatically be able to reject the request to change the current page is some condition is not met (data not saved...)
Thanks
Yann
Change History (9)
comment:1 Changed 14 years ago by
Component: | General → Dijit |
---|---|
Milestone: | → 1.0 |
Owner: | changed from anonymous to Adam Peller |
comment:2 Changed 13 years ago by
Milestone: | 1.0 → 1.1 |
---|
comment:3 Changed 13 years ago by
Milestone: | 1.1 → 2.0 |
---|
comment:5 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Milestone: | 1.3 → future |
comment:7 Changed 10 years ago by
Owner: | set to bill |
---|
comment:8 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Summary: | enhancement request:: page container should publish an event for unselect → StackContainer: publish event for unselect |
Hmm, well
StackContainer.watch("selectedChild", function(name, o, n){ ... })
will tell you the old child and the new child, but it's not exactly the same since the timing probably happens after the transition is complete.
I'm moving away from the subscribe/publish model for notification, but consider adding a notificatication like
StackContainer.on("unselect-child", ...)
comment:9 Changed 9 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Besides watch()'ing StackContainer.selectedChild, you can also watch "selected" for an individual child. Given that I want to move away from topics in 2.0 anyway, I think that's enough.
Sounds reasonable.
Also, I'm wondering if we should just have one event (named after the widget id) that has a field specifying a subtype (startup, select, deselect, addChild, removeChild)