unplugged / unplugged-controls

7 stars 9 forks source link

FormEditor - Hide/Show Problem - partial refresh? #393

Closed andikress closed 10 years ago

andikress commented 10 years ago

Info: Unplugged Controls 3.1 Webbrowser: Google Chrome

Hi, we create a "FormEditor" with a field(combobox) with values like:

  1. Type A
  2. Type B
  3. Type C

In the onchange event of the combobox we have a partial refresh to a panel located underneath the combobox panel. that panel includes 3 more panels, panel_A,panel_B,panel_C.

These panels should be visible/rendered depending on the selection of the combobox. Type A should load panel_A(inputfield_a_1,inputfield_a_2,inputfield_a_1,...) Type B should load panel_B(inputfield_b_1,inputfield_b_2,inputfield_b_1,...) Type C should load panel_C(inputfield_c_1,inputfield_c_2,inputfield_c_1,...)

I tried many different ways but i´m not get it working to only render the needed panel on selection. Do you see a way to do it? Also without a full refresh? -> there are more fields above the combobox which will be filled out, so a full refresh will reload and destroy the data input.

Any help appreciated.

andikress commented 10 years ago

Hi, anyone with same issue or a solution? Thanks

RichSharpe commented 10 years ago

Hi. I have an example of this working but before I post in detail I'll ask... Do you load the UnpFormEditor via AJAX (editPageWithAjax in the UnpFormViewer)? If so this will not work as the FormEditor is loaded via AJAX and your xp: bindings are lost. If you are loading the FormEditor from a FormViewer, set the editPageWithAjax to no (you may need to import the unplugged.css and a UnpHeader/UnpFooter in your xpage with the UnpFormEditor) but this should work. Reply here if it does not and I'll mail you a working example.

andikress commented 10 years ago

Issue can be closed, got it working with loading the doc without AJAX. Thanks for support.