Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Unexpected Y.WidgetStdMod + Y.WidgetButtons behavior #601

Open
jslayer opened this Issue Apr 11, 2013 · 0 comments

Comments

Projects
None yet
1 participant

jslayer commented Apr 11, 2013

Summary

I'm unable to get expected results while rendering one widget inside another. http://jsfiddle.net/jslayer/emSJk/33/

Description

Check out http://jsfiddle.net/jslayer/emSJk/33/ example.

There are two widget there Main and Child. The instance of Main widget is rendered into body. Also, there are two instances of Child widget. On is rendered into body, and the second if rendered into body section of Main instance.

The Child instance which is rendered into body works as expected (under the


tag). But the inner Child instance rendering doesn't create any visible result.

There are 2 commented monkey patching modules in example.

widget-stdmod-patches

  • _syncUIStdMod is block execution of _uiSetStdMod with empty content value (so the section will be removed if the [header|body|footer]Content attribute is empty;
  • _uiSetStdMod do not allow to erase the section of there are some nodes inside it

widget-buttons-patches

  • _getButtonContainer change the containerSelector selector string value, so the widget will try to find his own container, but not any other inner widgets buttons containers.

Uncomment both patches and you will see the expected Child instance rendering result inside the Main instance.

I'm really likes the concept of these modules, but without possibility of nested rendering, they just less useful.

Type

"Defect"

Component

widget-stdmod + widget-buttons

Observed in Version

v 3.9.1

@jslayer jslayer added a commit to jslayer/yui3 that referenced this issue Apr 11, 2013

@jslayer jslayer yui/yui3 #601 issue ade2136

@jslayer jslayer added a commit to jslayer/yui3 that referenced this issue Apr 12, 2013

@jslayer jslayer #601 - fix content replacement 0ce31d4

@jslayer jslayer added a commit to jslayer/yui3 that referenced this issue Apr 19, 2013

@jslayer jslayer #601 - replace Y.each with Y.Array.each dbe5626

@jslayer jslayer added a commit to jslayer/yui3 that referenced this issue Apr 19, 2013

@jslayer jslayer #601 - make the better search of existing buttons container at _getBu…
…ttonContainer
42b1b39

@jslayer jslayer added a commit to jslayer/yui3 that referenced this issue May 7, 2013

@jslayer jslayer #601 - replace with bac20cb

@jslayer jslayer added a commit to jslayer/yui3 that referenced this issue Jun 17, 2013

@jslayer jslayer #601 - Create unit test for getStdModNode inside renderUI e6aafbf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment