FB: Cannot read property 'setAttribute' of undefined when pasting form #2860

ebruchez opened this Issue Aug 3, 2016 · 2 comments


None yet

1 participant

ebruchez commented Aug 3, 2016

Pasting appraisal.xhtml from here causes this JavaScript error.

@ebruchez ebruchez added this to the 2.10.3 milestone Aug 3, 2016
@ebruchez ebruchez self-assigned this Aug 3, 2016
ebruchez commented Aug 4, 2016 edited

Seems to be happening as a result of <fr:alert-dialog id="message-dialog"> present in the form definition. This causes a dialog to be initialized with:


Where control points to an element with id fb≡message-dialog≡dialog. Seems ok so far.

But within _dialog(), yuiDialog.element doesn't seem to contain all it should contain.

<div class="yui-panel-container yui-dialog yui-overlay-hidden" id="fb≡message-dialog≡dialog_c" style="visibility: hidden;">
    <div id="fb≡message-dialog≡dialog" class="yui-module yui-overlay yui-panel" style="visibility: inherit;"></div>
ebruchez commented Aug 4, 2016

This seems to be due to the fact that _dialog() is called twice:

  1. As a result of
    • ORBEON.xforms.FullUpdate.onFullUpdateDone()
    • ORBEON.xforms.Init.insertedElement()
  2. As a result of running xxf:inner-html/xxf:init.

Further, insertedElement() only handles .xforms-dialog at this point. No other controls are initialized with that.

Since, for full updates, we already generate the xxf:inner-html/xxf:init initializations, including dialogs, the entire insertedElement() logic can and must be removed.

@ebruchez ebruchez modified the milestone: 2016.2, 2.10.3 Aug 4, 2016
@ebruchez ebruchez closed this in 41a2234 Aug 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment